]> git.gir.st - subscriptionfeed.git/blob - app/youtube/templates/index.html.j2
better pagination
[subscriptionfeed.git] / app / youtube / templates / index.html.j2
1 {% extends "base.html.j2" %}
2 {% import 'macros.imp.j2' as macros %}
3
4 {% block title %}Subscriptions {#for {{ current_user.name | e }}#}{% endblock %}
5
6 {% block content %}
7 {{ super() }}
8 <div class="cards">
9 {% for row in rows %}
10 {% call macros.card(row.video_id, row.title, row.published|format_date, row.pinned, row.video_id) %}
11 {{ macros.infobar_subscriptions(row.video_id, row.channel_id, row.author) }}
12 {% endcall %}
13 {% if row.pinned and not rows[loop.index].pinned %}
14 {{ macros.dummycard() }}
15 <hr>
16 {% endif %}
17 {% endfor %}
18 {{ macros.dummycard() }}
19 </div>
20
21 {% if not rows|length %}no more results{% endif %}
22
23 <div class="pagination-container">
24 {% if page > 0 %}
25 {{ macros.pagination("newer", {'page':(-1,0)}, -1) }}
26 {% endif %}
27 {% if rows|length %}
28 {{ macros.pagination("older", {'page':(+1,0)}, +1) }}
29 {% endif %}
30 </div>
31
32 {% endblock %}
33
34 {% block footer %}
35 <hr><a href="/manage/subscriptions">Manage Subscriptions</a>
36 {% endblock %}
Imprint / Impressum