diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-07-21 22:50:57 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-07-21 22:50:57 -0700 |
commit | 74cf3b2135661ae17b4e390c91182c673645cad7 (patch) | |
tree | d833aa5058f50c157de961585bbae4e8f33bc75f /youtube/templates | |
parent | c5827a3bb1a6b2eb6cfbc7d9104bd73514311246 (diff) | |
download | yt-local-74cf3b2135661ae17b4e390c91182c673645cad7.tar.lz yt-local-74cf3b2135661ae17b4e390c91182c673645cad7.tar.xz yt-local-74cf3b2135661ae17b4e390c91182c673645cad7.zip |
Use variable to set title on base template instead of block
Diffstat (limited to 'youtube/templates')
-rw-r--r-- | youtube/templates/base.html | 2 | ||||
-rw-r--r-- | youtube/templates/channel.html | 2 | ||||
-rw-r--r-- | youtube/templates/comments_page.html | 4 | ||||
-rw-r--r-- | youtube/templates/delete_comment.html | 3 | ||||
-rw-r--r-- | youtube/templates/error.html | 3 | ||||
-rw-r--r-- | youtube/templates/local_playlist.html | 2 | ||||
-rw-r--r-- | youtube/templates/local_playlists_list.html | 2 | ||||
-rw-r--r-- | youtube/templates/login.html | 2 | ||||
-rw-r--r-- | youtube/templates/playlist.html | 2 | ||||
-rw-r--r-- | youtube/templates/post_comment.html | 3 | ||||
-rw-r--r-- | youtube/templates/search.html | 2 | ||||
-rw-r--r-- | youtube/templates/status.html | 3 | ||||
-rw-r--r-- | youtube/templates/watch.html | 2 |
13 files changed, 13 insertions, 19 deletions
diff --git a/youtube/templates/base.html b/youtube/templates/base.html index eafd369..3dda55d 100644 --- a/youtube/templates/base.html +++ b/youtube/templates/base.html @@ -2,7 +2,7 @@ <html> <head> <meta charset="utf-8"> - <title>{% block page_title %}{{ title }}{% endblock %}</title> + <title>{{ page_title }}</title> <link href="/youtube.com/static/shared.css" type="text/css" rel="stylesheet"> <link href="/youtube.com/static/comments.css" type="text/css" rel="stylesheet"> <link href="/youtube.com/static/favicon.ico" type="image/x-icon" rel="icon"> 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{ diff --git a/youtube/templates/comments_page.html b/youtube/templates/comments_page.html index c7947fa..68c8537 100644 --- a/youtube/templates/comments_page.html +++ b/youtube/templates/comments_page.html @@ -1,9 +1,7 @@ +{% set page_title = ('Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number']) %} {% extends "base.html" %} {% import "comments.html" as comments %} -{% block page_title %}{{ 'Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number'] }}{% endblock %} - - {% block style %} main{ display:grid; diff --git a/youtube/templates/delete_comment.html b/youtube/templates/delete_comment.html index 4797240..71555ee 100644 --- a/youtube/templates/delete_comment.html +++ b/youtube/templates/delete_comment.html @@ -1,7 +1,6 @@ +{% set page_title = 'Delete comment?' %} {% extends "base.html" %} -{% block page_title %}Delete comment?{% endblock %} - {% block style %} main{ display: grid; diff --git a/youtube/templates/error.html b/youtube/templates/error.html index 1f33c44..e77c92c 100644 --- a/youtube/templates/error.html +++ b/youtube/templates/error.html @@ -1,7 +1,6 @@ +{% set page_title = 'Error' %} {% extends "base.html" %} -{% block page_title %}Error{% endblock %} - {% block main %} {{ error_message }} {% endblock %} diff --git a/youtube/templates/local_playlist.html b/youtube/templates/local_playlist.html index 27928df..a7564ca 100644 --- a/youtube/templates/local_playlist.html +++ b/youtube/templates/local_playlist.html @@ -1,5 +1,5 @@ +{% set page_title = playlist_name + ' - Local playlist' %} {% extends "base.html" %} -{% block page_title %}{{ playlist_name + ' - Local playlist' }}{% endblock %} {% import "common_elements.html" as common_elements %} {% block style %} main{ diff --git a/youtube/templates/local_playlists_list.html b/youtube/templates/local_playlists_list.html index 269c151..9b5f510 100644 --- a/youtube/templates/local_playlists_list.html +++ b/youtube/templates/local_playlists_list.html @@ -1,5 +1,5 @@ +{% set page_title = 'Local playlists' %} {% extends "base.html" %} -{% block page_title %}Local playlists{% endblock %} {% block main %} <ul> diff --git a/youtube/templates/login.html b/youtube/templates/login.html index 49a5365..0f09a62 100644 --- a/youtube/templates/login.html +++ b/youtube/templates/login.html @@ -1,5 +1,5 @@ +{% set page_title = 'Login' %} {% extends "base.html" %} -{% block page_title %}Login{% endblock %} {% block style %} main{ diff --git a/youtube/templates/playlist.html b/youtube/templates/playlist.html index 09e382b..074b813 100644 --- a/youtube/templates/playlist.html +++ b/youtube/templates/playlist.html @@ -1,5 +1,5 @@ +{% set page_title = title + ' - Page ' + parameters_dictionary.get('page', '1') %} {% extends "base.html" %} -{% block page_title %}{{ title + ' - Page ' + parameters_dictionary.get('page', '1') }}{% endblock %} {% import "common_elements.html" as common_elements %} {% block style %} main{ diff --git a/youtube/templates/post_comment.html b/youtube/templates/post_comment.html index 98316ab..67c54f1 100644 --- a/youtube/templates/post_comment.html +++ b/youtube/templates/post_comment.html @@ -1,8 +1,7 @@ +{% set page_title = 'Post reply' if replying else 'Post comment' %} {% extends "base.html" %} {% import "comments.html" as comments %} -{% block page_title %}{{ 'Post reply' if replying else 'Post comment' }}{% endblock %} - {% block style %} main{ display: grid; diff --git a/youtube/templates/search.html b/youtube/templates/search.html index 1086cfd..782a85e 100644 --- a/youtube/templates/search.html +++ b/youtube/templates/search.html @@ -1,6 +1,6 @@ {% set search_box_value = query %} +{% set page_title = query + ' - Search' %} {% extends "base.html" %} -{% block page_title %}{{ query + ' - Search' }}{% endblock %} {% import "common_elements.html" as common_elements %} {% block style %} main{ diff --git a/youtube/templates/status.html b/youtube/templates/status.html index 1e18b5c..901aa5b 100644 --- a/youtube/templates/status.html +++ b/youtube/templates/status.html @@ -1,7 +1,6 @@ +{% set page_title = (title if (title is defined) else 'Status') %} {% extends "base.html" %} -{% block page_title %}{{ title if (title is defined) else 'Status'}}{% endblock %} - {% block main %} {{ message }} {% endblock %} 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; |