From 49ada0a954603dbcb25eb746d5172f332610ad93 Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 23 Apr 2023 15:17:14 +0000 Subject: [PATCH] browse: make selected channel subpage and sort order bold --- app/browse/__init__.py | 1 + app/browse/templates/channel.html.j2 | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/browse/__init__.py b/app/browse/__init__.py index b1946a3..6a6b1aa 100644 --- a/app/browse/__init__.py +++ b/app/browse/__init__.py @@ -110,6 +110,7 @@ def channel(channel_id, subpage="videos"): return render_template('channel.html.j2', title=title, subpage=subpage, + sort=sort_by, rows=rows, channel_id=channel_id, channel_img=thumb, diff --git a/app/browse/templates/channel.html.j2 b/app/browse/templates/channel.html.j2 index 35485e4..d293812 100644 --- a/app/browse/templates/channel.html.j2 +++ b/app/browse/templates/channel.html.j2 @@ -17,10 +17,10 @@
- videos | - livestreams | - shorts | - playlists | + {% set subpage_name = {'videos': 'videos', 'streams': 'livestreams', 'shorts': 'shorts', 'playlists': 'playlists'} %} + {% for _subpage in ('videos', 'streams', 'shorts', 'playlists') %} + {{subpage_name[_subpage]}} | + {% endfor %}
@@ -29,11 +29,11 @@ {% if subpage != "search" %}
{% if subpage in ("videos", "streams", "shorts") %} - newest first | - most popular + newest first | + most popular {% elif subpage == "playlists" %} - last created | - last modified + last created | + last modified {% endif %}
{% endif %} -- 2.39.3