diff options
Diffstat (limited to 'youtube/templates/channel.html')
-rw-r--r-- | youtube/templates/channel.html | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html index 294f1df..c43f488 100644 --- a/youtube/templates/channel.html +++ b/youtube/templates/channel.html @@ -1,21 +1,21 @@ {% if current_tab == 'search' %} {% set page_title = search_box_value + ' - Page ' + page_number|string %} {% else %} - {% set page_title = channel_name + ' - Channel' %} + {% set page_title = channel_name|string + ' - Channel' %} {% endif %} {% extends "base.html" %} {% import "common_elements.html" as common_elements %} {% block style %} - <link href="/youtube.com/static/message_box.css" rel="stylesheet"/> - <link href="/youtube.com/static/channel.css" rel="stylesheet"/> + <link href="/youtube.com/static/message_box.css" rel="stylesheet"> + <link href="/youtube.com/static/channel.css" rel="stylesheet"> {% endblock style %} {% block main %} <div class="author-container"> <div class="author"> - <img alt="{{ channel_name }}" src="{{ avatar }}"/> + <img alt="{{ channel_name }}" src="{{ avatar }}"> <h2>{{ channel_name }}</h2> </div> <div class="summary"> @@ -33,7 +33,7 @@ <hr/> <nav class="channel-tabs"> - {% for tab_name in ('Videos', 'Playlists', 'About') %} + {% for tab_name in ('Videos', 'Shorts', 'Streams', 'Playlists', 'About') %} {% if tab_name.lower() == current_tab %} <a class="tab page-button">{{ tab_name }}</a> {% else %} @@ -51,8 +51,11 @@ <ul> {% for (before_text, stat, after_text) in [ ('Joined ', date_joined, ''), - ('', view_count|commatize, ' views'), + ('', approx_view_count, ' views'), ('', approx_subscriber_count, ' subscribers'), + ('', approx_video_count, ' videos'), + ('Country: ', country, ''), + ('Canonical Url: ', canonical_url, ''), ] %} {% if stat %} <li>{{ before_text + stat|string + after_text }}</li> @@ -65,7 +68,11 @@ <hr> <ul> {% for text, url in links %} - <li><a href="{{ url }}">{{ text }}</a></li> + {% if url %} + <li><a href="{{ url }}">{{ text }}</a></li> + {% else %} + <li>{{ text }}</li> + {% endif %} {% endfor %} </ul> </div> @@ -73,8 +80,8 @@ <!-- new--> <div id="links-metadata"> - {% if current_tab == 'videos' %} - {% set sorts = [('1', 'views'), ('2', 'oldest'), ('3', 'newest')] %} + {% if current_tab in ('videos', 'shorts', 'streams') %} + {% set sorts = [('1', 'views'), ('2', 'oldest'), ('3', 'newest'), ('4', 'newest - no shorts'),] %} <div id="number-of-results">{{ number_of_videos }} videos</div> {% elif current_tab == 'playlists' %} {% set sorts = [('2', 'oldest'), ('3', 'newest'), ('4', 'last video added')] %} @@ -110,13 +117,9 @@ <hr/> <footer class="pagination-container"> - {% if current_tab == 'videos' and current_sort.__str__() == '2' %} - <nav class="next-previous-button-row"> - {{ common_elements.next_previous_ctoken_buttons(None, ctoken, channel_url + '/' + current_tab, parameters_dictionary) }} - </nav> - {% elif current_tab == 'videos' %} + {% if current_tab in ('videos', 'shorts', 'streams') %} <nav class="pagination-list"> - {{ common_elements.page_buttons(number_of_pages, channel_url + '/' + current_tab, parameters_dictionary, include_ends=(current_sort.__str__() == '3')) }} + {{ common_elements.page_buttons(number_of_pages, channel_url + '/' + current_tab, parameters_dictionary, include_ends=(current_sort.__str__() in '34')) }} </nav> {% elif current_tab == 'playlists' or current_tab == 'search' %} <nav class="next-previous-button-row"> |