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 @@ - {% block page_title %}{{ title }}{% endblock %} + {{ page_title }} 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 %}