]> git.gir.st - subscriptionfeed.git/blob - app/reddit/templates/reddit.html.j2
allow pinning and hiding reddit posts
[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 with context %}
11 {{ macros.headerbar() }}
12
13 {% include 'messages.inc.j2' %}
14
15 <article>
16 <h1>{{ title | e }}</h1>
17 {% for row in rows %}{#
18 #}{% set karma = '&#x2191;' ~ row.n_karma|trim3 %}{#
19 #}{{ '<span class=bad>' if 1 >= row.n_karma|int(10) }}{#
20 #}{% call macros.card(row.video_id, row.title, karma, row.pinned, row.post_id) %}
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|int(10) }}{#
26 #}{% if row.pinned and not rows[loop.index].pinned %}
27 <hr>
28 {% endif %}{#
29 #}{% endfor %}
30 </article>
31
32 {% if before %}
33 <a href="?count={{ count-25 }}&before={{ before }}">prev</a> |
34 {% endif %}
35 {% if after %}
36 <a href="?count={{ count+25 }}&after={{ after }}">next</a>
37 {% endif %}
38
39 <hr>
40 <a href="/manage/subreddits">Manage Subreddits</a>
41 {% for subreddit in subreddits %}
42 {{ "||" if loop.first else "|"}}
43 <a href="/r/{{ subreddit }}">/r/{{ subreddit }}</a>
44 {% endfor %}
Imprint / Impressum