HTMLify
home.html
Views: 475 | Author: abh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <!DOCTYPE html> <html> <head> <title>HTMLify your dreams</title> {% include "stylesheet.html" %} </head> <body> <h1>HTMLify your dreams</h1> {% include "search-bar.html" %} {% include "nav-bar.html" %} <form class="filter-form" action="" method="POST"> <div class="filter-label">Filter Options:</div> <label class="filter-option"> <input type="checkbox" name="file-modes" value="p" {% if 'p' in session["filter-file-modes"] %}checked{% endif %}> Parse </label> <label class="filter-option"> <input type="checkbox" name="file-modes" value="s" {% if 's' in session["filter-file-modes"] %}checked{% endif %}> Show </label> <label class="filter-option"> <input type="checkbox" name="file-modes" value="r" {% if 'r' in session["filter-file-modes"] %}checked{% endif %}> Raw </label> <button class="filter-button" type="submit">Filter</button> </form> {% for file in files %} <div class="search-result"> <img style="width: 12px; height: 12px;" src="/media/dp/{{ file.owner }}.jpg"> <span>{{ file.name }}</span> | <span>Owner: <a href="/{{ file.owner }}">{{ file.owner }}</a></span> | Views: {{ file.views }} | Comments: {{ file.comments | length }} | <a href="{{ file.path }}">Open</a>/ <a href="/src/{{ file.path }}">Source</a>{% if session.get("user") and file.owner == session["user"]["username"] %}| <a href="/edit?filepath={{ file.path[file.owner|length + 1:] }}">Edit</a>{% endif %} {{ file.sizef() }}<br> <hr> {% if file.type == "text" %} <p>{{ file.content[:128] }}</p> {% endif %} </div> {% endfor %} </body> </html> |