]> git.gir.st - subscriptionfeed.git/blob - app/dangerous/templates/playlist.html.j2
support playlist end-of-list
[subscriptionfeed.git] / app / dangerous / templates / playlist.html.j2
1 {% extends "base.html.j2" %}
2 {% import 'macros.imp.j2' as macros %}
3 {% block title %}{{ title | e }} — {{ author | e }}{% endblock %}
4
5 {% block content %}
6 <h1>{{ title | e }}<br>
7 <small><a href="/channel/{{ channel_id }}">{{ author | e }}</a></small></h1>
8 <div class="cards">
9 {# TODO: copy pasted from dangerous/search.j2 #}
10 {% for card in rows %}
11 {% set c = card.content %}
12 {% if card.type == 'VIDEO' %}
13 {% call macros.card(c.video_id, c.title, c.length) %}
14 {{ macros.infobar_subscriptions(c.video_id, c.channel_id, c.author) }}
15 <small>{{ c.published if c.published }}&nbsp;</small>
16 {% endcall %}
17 {% elif card.type == 'CHANNEL' and c.channel_id != channel_id %}
18 {% call macros.card_generic("/channel/"~c.channel_id, c.icons[c.icons.largest] if 'icons' in c else '', c.title) %}
19 <span class=channel>Channel</span>
20 <span class=advanced>{{ c.subscribers }}</span>
21 {% endcall %}
22 {% elif card.type == 'PLAYLIST' %}
23 {% call macros.card_generic("/playlist?list="~c.playlist_id, "https://i.ytimg.com/vi/"~c.video_id~"/mqdefault.jpg", c.title) %}
24 <span class=channel>{{ c.author }}</span>
25 <span class=advanced>{{ c.n_videos }} videos</span>
26 {% endcall %}
27 {% elif card.type == 'WEBSITE' %}
28 {% call macros.card_generic(c.url, c.icons[c.icons.largest] if 'icons' in c else '', c.title) %}
29 <span class=channel>{{ c.domain }}</span>
30 {% endcall %}
31 {% endif %}
32 {% endfor %}
33
34 {{ macros.dummycard() }}
35 </div>
36 </article>
37
38 {% if not rows|length %}no more results{% endif %}
39
40 <div class="pagination-container">
41 {% if page is not none %}
42 {{ macros.pagination("previous", {'page':(-1,1)}, -1) if page > 1 }}
43 {{ macros.pagination("next", {'page':(+1,1)}, +1) if has_more }}
44 {% endif %}
45 </div>
46 {% endblock %}
Imprint / Impressum