50 lines
No EOL
2 KiB
HTML
50 lines
No EOL
2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block meta %}
|
|
<link rel="stylesheet" href="/static/search.css" />
|
|
<link rel="stylesheet" href="/static/home.css" />
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<form action="/search" method="get">
|
|
<div class="grid-selection">
|
|
<b>Sort by:</b>
|
|
<select name="sort">
|
|
<option value="time" {% if "time" == request.args.get('sort') %}selected="selected"{% endif %}>Import Time</option>
|
|
<option value="az" {% if "az" == request.args.get('sort') %}selected="selected"{% endif %}>A-Z</option>
|
|
<option value="za" {% if "za" == request.args.get('sort') %}selected="selected"{% endif %}>Z-A</option>
|
|
<option value="size" {% if "size" == request.args.get('sort') %}selected="selected"{% endif %}>Archive Size</option>
|
|
</select>
|
|
</div>
|
|
<div class="grid-selection">
|
|
<b>Category:</b>
|
|
<select name="category">
|
|
{% for i in categories %}
|
|
<option value="{{i[0]}}" {% if i[0] == request.args.get('category')|int %}selected="selected"{% endif %}>{{i[1]}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
{% if request.args.get('q') %}
|
|
<input type="text" name="q" value="{{request.args.get('q')}}" placeholder="Keywords">
|
|
{% else %}
|
|
<input type="text" name="q" placeholder="Keywords">
|
|
{% endif %}
|
|
<input type="submit" value="Search!">
|
|
<div class="grid-selection"></div>
|
|
</form>
|
|
{% if archives|length > 0 %}
|
|
<div class="grid-container">
|
|
<div class="grid-header"><b>ARCHIVE</b></div>
|
|
<div class="grid-header"><b>SIZE</b></div>
|
|
<div class="grid-header"><b>IMPORTED</b></div>
|
|
{% for arch in archives %}
|
|
<a class="grid-item" href="/view/{{arch[0]}}"><div class="grid-item clickable"><b>{{arch[1]}}</b></div></a>
|
|
<div class="grid-item"><p> {{arch[2]|spacer}} </p></div>
|
|
<div class="grid-item"><p> {{arch[3]|ctime}} </p></div>
|
|
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p>No matching archives</p>
|
|
{% endif %}
|
|
{% endblock %} |