HTMLify
search-result.html
Views: 417 | 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 35 36 37 | <!-- search-result.html --> <!DOCTYPE html> <html> <head> <title>HTMLify Search - {{ q }}</title> {% include "stylesheet.html" %} <style> </style> </head> <body> <h1>HTMLify</h1> {% include "nav-bar.html" %} {% include "search-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 result in results %} <div class="search-result"> <span>{{ result["name"] }}</span> | <span>Owner: {{ result["owner"] }}</span> | Views: {{ result["views"] }} | Comments: {{ result["comments"] | string }} | <a href="{{ result["path"] }}">Open</a>/ <a href="/src/{{ result["path"] }}">Source</a>{% if session.get("user") and result["owner"] == session["user"]["username"] %}| <a href="/edit?filepath={{ result["path"][result.owner|length + 1:] }}">Edit</a>{% endif %}<br> <hr> <p>{{ result["snippet"] | safe }}</p> </div> {% endfor %} <!-- impliment pagination --> </body> </html> |