]> git.gir.st - subscriptionfeed.git/blob - app/reddit/templates/reddit.html.j2
tweak reddit template
[subscriptionfeed.git] / app / reddit / templates / reddit.html.j2
1 <!DOCTYPE html>
2 <title>{{ title | e }}</title>
3 <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>'>
4 <link rel="stylesheet" href="/static/style.css">
5 <style>
6 .bad { opacity: 50% }
7 .bad img { filter: grayscale(100%) }
8 </style>
9
10 {% import 'macros.imp.j2' as macros %}
11 {% include 'messages.inc.j2' %}
12
13 <b style=font-size:large>{{ title | e }}</b><hr>
14
15 <article>
16 {% for row in rows %}{#
17 #}{% set meta = '+' ~ row.n_karma|trim3 ~ '/!' ~ row.n_comments|trim3 %}{#
18 #}{% set meta = '&#x2191;' ~ row.n_karma|trim3 %}{#
19 #}{{ '<span class=bad>' if 1 >= row.n_karma }}{#
20 #}{% call macros.card(row.video_id, row.title, meta) %}
21
22 <a href="https://old.reddit.com{{ row.url }}" title="{{ row.n_karma }} karma, {{ row.n_comments }} comments">
23 /r/{{ row.subreddit | lower | e }}
24 </a>
25 {% endcall %}{{ '</span>' if 1>=row.n_karma }}{#
26 #}{% endfor %}
27 </article>
28
29 {% if before %}
30 <a href="?count={{ count-25 }}&before={{ before }}">prev</a> |
31 {% endif %}
32 {% if after %}
33 <a href="?count={{ count+25 }}&after={{ after }}">next</a>
34 {% endif %}
35
36 <hr>
37 <a href="/manage/subreddits?{{ request.query_string.decode() | e }}">Manage Subreddits</a>
38 {% for subreddit in subreddits %}
39 {{ "||" if loop.first else "|"}}
40 <a href="/r/{{ subreddit }}">/r/{{ subreddit }}</a>
41 {% endfor %}
Imprint / Impressum