1 {% extends "base.html.j2" %}
2 {% import 'macros.imp.j2' as macros %}
3 {% block title %}{{ title | e }}{% endblock %}
7 <img height=200 align=left src="{{ channel_img[channel_img.largest] }}" style="margin:.5em">
9 <h1>{{ title | e }} <small>{{ macros.emoji_button("subscribe", channel_id, is_subscribed) if channel_id }}</small></h1>
10 <details><summary>About</summary><p style="white-space: pre-wrap">{{ channel_desc }}</details>
11 <div style=clear:both></div>
12 <div id="subpages" style="display:flex;margin:1em">
14 <a href="{{ url_for('browse.channel', channel_id=channel_id, subpage='videos') }}">videos</a> |
15 <a href="{{ url_for('browse.channel', channel_id=channel_id, subpage='playlists') }}">playlists</a> |
16 <form method=get style="display:inline" action="{{ url_for('browse.channel', channel_id=channel_id, subpage='search')}}">
17 <input style="background:0;color:#eee;border:0" type=text name=q value="{{ request.args.get('q', '')}}" placeholder="search channel">
18 <!-- <input type="submit" value=">"> -->
21 {% if subpage != "search" %}
22 <form method=get style="flex:1;text-align:right">
24 <input type="hidden" name="list" value="{{playlist_id}}">
27 <option value="">sort by...</option>
28 {% if subpage == "videos" %}
29 <option value="newest" {{ 'selected' if sort == 'newest' }}>newest first</option>
30 <option value="oldest" {{ 'selected' if sort == 'oldest' }}>oldest first</option>
31 <option value="popular" {{ 'selected' if sort == 'popular' }}>most popular</option>
32 {% elif subpage == "playlists" %}
33 <option value="newest" {{ 'selected' if sort == 'newest' }}>last created</option>
34 <option value="modified" {{ 'selected' if sort == 'modified' }}>last modified</option>
37 <input type="submit" value=">">
42 {% for card in rows %}
43 {{ macros.typed_card(card) }}
45 {{ macros.dummycard() }}
48 {% if not rows|length %}no more results{% endif %}
50 <div class="pagination-container">
51 {{ macros.pagination("previous", {'page':(-1,1)}, -1) if page > 1 }}
52 {{ macros.pagination("next", {'page':(+1,1)}, +1) if has_more}}