]> git.gir.st - subscriptionfeed.git/blob - app/browse/templates/channel.html.j2
browse: make selected channel subpage and sort order bold
[subscriptionfeed.git] / app / browse / templates / channel.html.j2
1 {% extends "base.html.j2" %}
2 {% import 'macros.imp.j2' as macros %}
3
4 {% block favicon %}
5 {{ super() }}
6 <link rel="stylesheet" href="{{ url_for('browse.static', filename="style.css") }}">
7 {% endblock %}
8
9 {% block title %}{{ title | e }}{% endblock %}
10
11 {% block content %}
12 <!--
13 <img height=200 align=left src="{{ channel_img[channel_img.largest] }}" style="margin:.5em">
14 -->
15 <h1>{{ title | e }} <small>{{ macros.emoji_button("subscribe", channel_id, is_subscribed) if channel_id }}</small></h1>
16 <details><summary>About</summary><p style="white-space: pre-wrap">{{ channel_desc }}</details>
17 <div style=clear:both></div>
18 <div id="subpages">
19 <div class="subpages">
20 {% set subpage_name = {'videos': 'videos', 'streams': 'livestreams', 'shorts': 'shorts', 'playlists': 'playlists'} %}
21 {% for _subpage in ('videos', 'streams', 'shorts', 'playlists') %}
22 <a class="{{'bold' if subpage == _subpage in request.path}}" href="{{ url_for('browse.channel', channel_id=channel_id, subpage=_subpage) }}">{{subpage_name[_subpage]}}</a> |
23 {% endfor %}
24 <form method=get action="{{ url_for('browse.channel', channel_id=channel_id, subpage='search')}}">
25 <input class="search-channel" type=text name=q value="{{ request.args.get('q', '')}}" placeholder="search channel">
26 <!-- <input type="submit" value=">"> -->
27 </form>
28 </div>
29 {% if subpage != "search" %}
30 <div class="sort-order">
31 {% if subpage in ("videos", "streams", "shorts") %}
32 <a href="?sort=newest" class="{{ 'bold' if sort == 'newest' }}">newest first</a> |
33 <a href="?sort=popular" class="{{ 'bold' if sort == 'popular' }}">most popular</a>
34 {% elif subpage == "playlists" %}
35 <a href="?sort=newest" class="{{ 'bold' if sort == 'newest' }}">last created</a> |
36 <a href="?sort=modified" class="{{ 'bold' if sort == 'modified' }}">last modified</a>
37 {% endif %}
38 </div>
39 {% endif %}
40 </div>
41 <div class="cards">
42 {% for card in rows %}
43 {{ macros.typed_card(card) }}
44 {% endfor %}
45 {{ macros.dummycard() }}
46 </div>
47
48 {% if not rows|length %}no more results{% endif %}
49
50 <div class="pagination-container">
51 {{ macros.more({'continuation': continuation}) if continuation }}
52 </div>
53 {% endblock %}
Imprint / Impressum