From 2db58930a6f8c955c4d437657bd07e2939a705f2 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 16 Jun 2019 16:16:03 -0700 Subject: Convert watch page to flask framework --- youtube/templates/watch.html | 222 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 youtube/templates/watch.html (limited to 'youtube/templates/watch.html') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html new file mode 100644 index 0000000..7e83306 --- /dev/null +++ b/youtube/templates/watch.html @@ -0,0 +1,222 @@ + + + + + {{ title }} + + + + + + + +{{ header|safe }} +
+
+
+
+ + + +

{{ title }}

+{% if unlisted %} + Unlisted +{% endif %} +
Uploaded by {{ uploader }}
+ {{ views }} views + + + + +
+ +
+{% for format in download_formats %} + + {{ format['ext'] }} + {{ format['resolution'] }} + {{ format['note'] }} + +{% endfor %} +
+
+ + + {{ description }} +
+{{ music_list|safe }} +
+{{ comments|safe }} +
+ + + + + + +
+ + + + + + + -- cgit v1.2.3 From 1ba241186299df50a94efd3d410a4422bdc2d6c3 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 17 Jun 2019 20:47:58 -0700 Subject: Inherit from base template --- youtube/templates/watch.html | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'youtube/templates/watch.html') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index 7e83306..f00413d 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -1,13 +1,6 @@ - - - - - {{ title }} - - - - - - - -{{ header|safe }} -
+{% endblock style %} + +{% block main %}
@@ -212,11 +203,4 @@ {{ related|safe }} -
- - - - - - - +{% endblock main %} -- cgit v1.2.3 From 02962df0526cf265965c442bf9a261ceba55864e Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 21 Jun 2019 21:59:33 -0700 Subject: Refactor watch page related videos to use item rendering macro --- youtube/templates/watch.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'youtube/templates/watch.html') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index f00413d..122958c 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "common_elements.html" as common_elements %} {% block page_title %}{{ title }}{% endblock %} {% block style %} main{ @@ -200,7 +201,9 @@ {% endblock main %} -- cgit v1.2.3 From b89d90a0d35a239ee4eb476eaf5e2d3404fe65ea Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 7 Jul 2019 17:29:25 -0700 Subject: watch_page: refactor music list into flask template --- youtube/templates/watch.html | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'youtube/templates/watch.html') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index 122958c..85c87ae 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -185,14 +185,31 @@ {{ format['resolution'] }} {{ format['note'] }} -{% endfor %} +{% endfor %} {{ description }}
-{{ music_list|safe }} + {% if music_list.__len__() != 0 %} +
+ + + + {% for attribute in music_attributes %} + + {% endfor %} + + {% for track in music_list %} + + {% for attribute in music_attributes %} + + {% endfor %} + + {% endfor %} +
Music
{{ attribute }}
{{ track.get(attribute.lower(), '') }}
+ {% endif %}
{{ comments|safe }} -- cgit v1.2.3 From 8cad77ad0d7e0a0d07629087e2ee1709688cb58d Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 19 Jul 2019 22:27:10 -0700 Subject: Convert comments to flask framework --- youtube/templates/watch.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'youtube/templates/watch.html') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index 85c87ae..d61997f 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% import "common_elements.html" as common_elements %} +{% import "comments.html" as comments %} {% block page_title %}{{ title }}{% endblock %} {% block style %} main{ @@ -211,7 +212,10 @@ {% endif %} -{{ comments|safe }} + + {% if comments_info %} + {{ comments.video_comments(comments_info) }} + {% endif %} -- 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/watch.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube/templates/watch.html') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index d61997f..82c1a97 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -1,7 +1,7 @@ +{% set page_title = title %} {% extends "base.html" %} {% import "common_elements.html" as common_elements %} {% import "comments.html" as comments %} -{% block page_title %}{{ title }}{% endblock %} {% block style %} main{ display:grid; -- cgit v1.2.3