From 64434b02ca50c2a6324caa1355559bd881ba687e Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 6 Jul 2019 18:36:09 -0700 Subject: Convert channel page to flask framework --- youtube/templates/channel.html | 144 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 youtube/templates/channel.html (limited to 'youtube/templates/channel.html') diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html new file mode 100644 index 0000000..8a3f279 --- /dev/null +++ b/youtube/templates/channel.html @@ -0,0 +1,144 @@ +{% extends "base.html" %} +{% block page_title %}{{ channel_name + ' - Channel' }}{% endblock %} +{% import "common_elements.html" as common_elements %} +{% block style %} + main{ + display:grid; +{% if current_tab == 'about' %} + grid-template-rows: 0fr 0fr 1fr; + grid-template-columns: 0fr 1fr; +{% else %} + grid-template-rows: repeat(5, 0fr); + grid-template-columns: auto 1fr; +{% endif %} + } + main .avatar{ + grid-row:1; + grid-column:1; + height:200px; + width:200px; + } + main .title{ + grid-row:1; + grid-column:2; + } + main .channel-tabs{ + grid-row:2; + grid-column: 1 / span 2; + + display:grid; + grid-auto-flow: column; + justify-content:start; + + background-color: #aaaaaa; + padding: 3px; + } + #links-metadata{ + display: grid; + grid-auto-flow: column; + grid-column-gap: 10px; + grid-column: 1/span 2; + justify-content: start; + padding-top: 8px; + padding-bottom: 8px; + background-color: #bababa; + margin-bottom: 10px; + } + #number-of-results{ + font-weight:bold; + } + .item-grid{ + grid-row:4; + grid-column: 1 / span 2; + } + .item-list{ + width:1000px; + grid-column: 1 / span 2; + } + .page-button-row{ + grid-column: 1 / span 2; + } + .tab{ + padding: 5px 75px; + } + main .channel-info{ + grid-row: 3; + grid-column: 1 / span 3; + } + .description{ + white-space: pre-wrap; + min-width: 0; + + } +{% endblock style %} + +{% block main %} + +

{{ channel_name }}

+ + {% if current_tab == 'about' %} +
+ +
+

Description

+ {{ common_elements.text_runs(description) }} +
+ +
+ {% else %} + + + {% if current_tab != 'about' %} + + + {% if current_tab != 'playlists' %} + + {% endif %} + {% endif %} + + {% endif %} +{% endblock main %} -- cgit v1.2.3 From 74cf3b2135661ae17b4e390c91182c673645cad7 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 21 Jul 2019 22:50:57 -0700 Subject: Use variable to set title on base template instead of block --- youtube/templates/channel.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube/templates/channel.html') diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html index 8a3f279..734769d 100644 --- a/youtube/templates/channel.html +++ b/youtube/templates/channel.html @@ -1,5 +1,5 @@ +{% set page_title = channel_name + ' - Channel' %} {% extends "base.html" %} -{% block page_title %}{{ channel_name + ' - Channel' }}{% endblock %} {% import "common_elements.html" as common_elements %} {% block style %} main{ -- cgit v1.2.3 From dfbe29355ff4c2dd106efb5acb9240e5292b0f08 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 22 Jul 2019 01:01:27 -0700 Subject: Channel: fix oversized thumbnails in firefox quantum --- youtube/templates/channel.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'youtube/templates/channel.html') diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html index 734769d..ffcf793 100644 --- a/youtube/templates/channel.html +++ b/youtube/templates/channel.html @@ -70,6 +70,9 @@ min-width: 0; } + .medium-item img{ + max-width: 168px; + } {% endblock style %} {% block main %} -- cgit v1.2.3 From cb1c899a4570e8644dad572c7f00a3d96c844a2f Mon Sep 17 00:00:00 2001 From: James Taylor Date: Tue, 23 Jul 2019 22:55:15 -0700 Subject: channel: Add short description under channel name --- youtube/templates/channel.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'youtube/templates/channel.html') diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html index ffcf793..8293559 100644 --- a/youtube/templates/channel.html +++ b/youtube/templates/channel.html @@ -18,7 +18,7 @@ height:200px; width:200px; } - main .title{ + main .summary{ grid-row:1; grid-column:2; } @@ -77,7 +77,10 @@ {% block main %} -

{{ channel_name }}

+
+

{{ channel_name }}

+

{{ short_description }}

+