]> git.gir.st - subscriptionfeed.git/blob - app/reddit/templates/reddit.html.j2
undo reddit continuation/pagination harmonisation
[subscriptionfeed.git] / app / reddit / templates / reddit.html.j2
1 {% extends "base.html.j2" %}
2 {% import 'macros.imp.j2' as macros %}
3
4 {% block title %}{{ title | e }}{% endblock %}
5 {% block favicon %}
6 <link rel="shortcut icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300" fill="%23fff"><circle r="150" cx="150" cy="150" fill="%23f40"/><path d="m150 80l80 80h-40v40h-80v-40h-40l80-80"/></svg>'>
7 <style>
8 .bad { opacity: 50% }
9 .bad img { filter: grayscale(100%) }
10 </style>
11 {% endblock %}
12
13 {% block content %}
14 {{ super() }}
15 <div class="cards">
16 {% for row in rows %}
17 {% set karma = '&#x2191;' ~ row.n_karma|trim3 %}
18 {% set alt = row.n_karma~' karma, '~row.n_comments~' comments' %}
19 {{ '<span class=bad>' if 1 >= row.n_karma|int(10) }}
20 {% call macros.card(row.video_id, row.title, karma, row.pinned, alt, row.url, badge=row.length,ts=row.timestamp) %}
21 <a href="{{ url_for('reddit.reddit', subreddit=row.subreddit) }}">
22 /r/{{ row.subreddit | lower | e }}
23 </a>
24 {% endcall %}{{ '</span>' if 1>=row.n_karma|int(10) }}
25 {% endfor %}
26 {{ macros.dummycard() }}
27 </div>
28
29 <div class="pagination-container">
30 {{ macros.more({'after':after}) if continuation }}
31 </div>
32 {% endblock %}
33
34 {% block footer %}
35 <hr>
36 <a href="/manage/subreddits">Manage Subreddits</a>
37 {% for subreddit in subreddits %}
38 {{ "||" if loop.first else "|"}}
39 <a href="/r/{{ subreddit }}">/r/{{ subreddit }}</a>
40 {% endfor %}
41 {% endblock %}
Imprint / Impressum