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/base.html | 111 +++++++++++++++++++++++++++++++++++++++++++ youtube/templates/error.html | 25 ++++------ youtube/templates/watch.html | 30 +++--------- 3 files changed, 126 insertions(+), 40 deletions(-) create mode 100644 youtube/templates/base.html (limited to 'youtube/templates') diff --git a/youtube/templates/base.html b/youtube/templates/base.html new file mode 100644 index 0000000..e98f972 --- /dev/null +++ b/youtube/templates/base.html @@ -0,0 +1,111 @@ + + + + + {% block page_title %}{% endblock %} + + + + + + + +
+ + +
+
+ + + {% for playlist_name in header_playlist_names %} + + {% endfor %} + + + +
+ Local playlists +
+
+
+{% block main %} +{% endblock %} +
+ + diff --git a/youtube/templates/error.html b/youtube/templates/error.html index f253807..1f33c44 100644 --- a/youtube/templates/error.html +++ b/youtube/templates/error.html @@ -1,17 +1,8 @@ - - - - - Error - - - - - - -{{ header|safe }} -
-{{ error_message }} -
- - +{% extends "base.html" %} + +{% block page_title %}Error{% endblock %} + +{% block main %} + {{ error_message }} +{% endblock %} + 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