From 62ba1ecf4a409d0b9c6558a03e8c8fcb10ccf052 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 14 Nov 2021 19:48:03 +0700 Subject: [PATCH] handle empty playlist nav --- tubearchivist/home/templates/home/video.html | 60 ++++++++++---------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/tubearchivist/home/templates/home/video.html b/tubearchivist/home/templates/home/video.html index 59257df..c8aa419 100644 --- a/tubearchivist/home/templates/home/video.html +++ b/tubearchivist/home/templates/home/video.html @@ -72,39 +72,41 @@ {% endif %} -{% for playlist_item in playlist_nav %} -
- -

Playlist: {{ playlist_item.playlist_meta.playlist_name }}

-
-
-
- {% if playlist_item.playlist_previous %} - - previous thumbnail - -
-

Previous:

+{% if playlist_nav %} + {% for playlist_item in playlist_nav %} +
+ +

Playlist: {{ playlist_item.playlist_meta.playlist_name }}

+
+
+
+ {% if playlist_item.playlist_previous %} -

{{ playlist_item.playlist_previous.title }}

+ previous thumbnail
-
- {% endif %} -
-
- {% if playlist_item.playlist_next %} -
-

Next:

+ + {% endif %} +
+ - - previous thumbnail - - {% endif %} + {% endif %} +
-
-{% endfor %} + {% endfor %} +{% endif %} {% endblock content %} \ No newline at end of file