]> git.gir.st - subscriptionfeed.git/blob - app/reddit/templates/reddit.html.j2
fix reddit 'more' button
[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 <details style="margin:1em"><summary>Sort</summary><div id="container">
16 <a href="?s=hot">hot</a> |
17 <a href="?s=new">new</a> |
18 <a href="?s=rising">rising</a> |
19 <a href="?s=controversial">controversial</a> |
20 top (
21 <a href="?s=top&t=hour">hour</a>
22 <a href="?s=top&t=day">day</a>
23 <a href="?s=top&t=week">week</a>
24 <a href="?s=top&t=month">month</a>
25 <a href="?s=top&t=year">year</a>
26 <a href="?s=top&t=all">all</a>
27 )
28 </div></details>
29
30 <div class="cards">
31 {% for row in rows %}
32 {% set karma = '&#x2191;' ~ row.n_karma|trim3 %}
33 {% set alt = row.n_karma~' karma, '~row.n_comments~' comments' %}
34 {{ '<span class=bad>' if 1 >= row.n_karma|int(10) }}
35 {% call macros.card(row.video_id, row.title, karma, row.pinned, alt, row.url, badge=row.length,ts=row.timestamp) %}
36 <a href="{{ url_for('reddit.reddit', subreddit=row.subreddit) }}">
37 /r/{{ row.subreddit | lower | e }}
38 </a>
39 {% endcall %}{{ '</span>' if 1>=row.n_karma|int(10) }}
40 {% endfor %}
41 {{ macros.dummycard() }}
42 </div>
43
44 <div class="pagination-container">
45 {{ macros.more({'after':after}) if after }}
46 </div>
47 {% endblock %}
48
49 {% block footer %}
50 <hr>
51 <a href="/manage/subreddits">Manage Subreddits</a>
52 {% for subreddit in subreddits %}
53 {{ "||" if loop.first else "|"}}
54 <a href="/r/{{ subreddit }}">/r/{{ subreddit }}</a>
55 {% endfor %}
56 {% endblock %}
Imprint / Impressum