]> git.gir.st - subscriptionfeed.git/blob - app/dangerous/templates/search.html.j2
move search css into a stylesheet
[subscriptionfeed.git] / app / dangerous / templates / search.html.j2
1 {% extends "base.html.j2" %}
2 {% import 'macros.imp.j2' as macros %}
3
4 {% block favicon %}
5 {{ super() }}
6 <link rel="stylesheet" href="{{ url_for('dangerous.static', filename="style.css") }}">
7 {% endblock %}
8
9 {% block title %}
10 {% if rows is not none %}{{ query | e }} &mdash; Search results
11 {% else %}Search Youtube Videos{% endif %}
12 {% endblock %}
13
14 {% block content %}
15 <form method=get action=/search id="search">
16 <div id="main">
17 <input id="box" name=q placeholder="Search" value="{{ query | e if query }}">
18 <input id="go" type=submit value="&#x1F50D;&#xFE0E;" title="search!">
19 </div>
20 <details id="filters"><summary>Filters</summary><div id="container">
21 <select name="sort">
22 <option value="">sort by...</option>
23 <option value="relevance">relevance</option>
24 <option value="rating">rating</option>
25 <option value="date">date</option>
26 <option value="views">views</option>
27 </select>
28 <select name="date">
29 <option value="">upload date...</option>
30 <option value="hour">hour</option>
31 <option value="day">day</option>
32 <option value="week">week</option>
33 <option value="month">month</option>
34 <option value="year">year</option>
35 </select>
36 <select name="type">
37 <option value="">type...</option>
38 <option value="video">video</option>
39 <option value="channel">channel</option>
40 <option value="playlist">playlist</option>
41 <option value="movie">movie</option>
42 <option value="show">show</option>
43 </select>
44 <select name="len">
45 <option value="">duration...</option>
46 <option value="short">short</option>
47 <option value="long">long</option>
48 </select>
49 </div></details>
50 </form>
51
52 {% if rows is not none %}
53 {{ super() }}
54
55 {# TODO: this is mostly copy-pasted (changed video infobar) from watch.j2's info/endcard section -- dedup! #}
56 <!-- not implemented warning:--><div style="background:red">{%for x in rows|selectattr('content.error')%}{{x.content.error}}{%endfor%}</div>
57 <div class="cards">
58 {% for card in rows %}
59 {{ macros.typed_card(card) }}
60 {% endfor %}
61 {{ macros.dummycard() }}
62 </div>
63
64 <div class="pagination-container">
65 {% if page > 1 %}
66 {{ macros.pagination("previous", {'page':(-1,1)}, -1) }}
67 {% endif %}
68 {{ macros.pagination("next", {'page':(+1,1)}, +1) }}
69 </div>
70 {% else %}
71 please type a search query.
72 {% endif %}
73 {% endblock %}
74
75 {% block footer %}
76 <hr>
77 {% endblock %}
Imprint / Impressum