aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/channel.html
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/templates/channel.html')
-rw-r--r--youtube/templates/channel.html39
1 files changed, 25 insertions, 14 deletions
diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html
index 294f1df..274b727 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,11 +80,15 @@
<!-- new-->
<div id="links-metadata">
- {% if current_tab == 'videos' %}
- {% set sorts = [('1', 'views'), ('2', 'oldest'), ('3', 'newest')] %}
- <div id="number-of-results">{{ number_of_videos }} videos</div>
+ {% if current_tab in ('videos', 'shorts', 'streams') %}
+ {% set sorts = [('3', 'newest'), ('4', 'newest - no shorts')] %}
+ {% if current_tab in ('shorts', 'streams') and not is_last_page %}
+ <div id="number-of-results">{{ number_of_videos }}+ videos</div>
+ {% else %}
+ <div id="number-of-results">{{ number_of_videos }} videos</div>
+ {% endif %}
{% elif current_tab == 'playlists' %}
- {% set sorts = [('2', 'oldest'), ('3', 'newest'), ('4', 'last video added')] %}
+ {% set sorts = [('3', 'newest'), ('4', 'last video added')] %}
{% if items %}
<h2 class="page-number">Page {{ page_number }}</h2>
{% else %}
@@ -110,13 +121,13 @@
<hr/>
<footer class="pagination-container">
- {% if current_tab == 'videos' and current_sort.__str__() == '2' %}
+ {% if current_tab in ('shorts', 'streams') %}
<nav class="next-previous-button-row">
- {{ common_elements.next_previous_ctoken_buttons(None, ctoken, channel_url + '/' + current_tab, parameters_dictionary) }}
+ {{ common_elements.next_previous_buttons(is_last_page, channel_url + '/' + current_tab, parameters_dictionary) }}
</nav>
{% elif current_tab == 'videos' %}
<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">