Use variable to set title on base template instead of block
This commit is contained in:
parent
c5827a3bb1
commit
74cf3b2135
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<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/shared.css" type="text/css" rel="stylesheet">
|
||||||
<link href="/youtube.com/static/comments.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">
|
<link href="/youtube.com/static/favicon.ico" type="image/x-icon" rel="icon">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
{% set page_title = channel_name + ' - Channel' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block page_title %}{{ channel_name + ' - Channel' }}{% endblock %}
|
|
||||||
{% import "common_elements.html" as common_elements %}
|
{% import "common_elements.html" as common_elements %}
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
|
{% set page_title = ('Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number']) %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% import "comments.html" as comments %}
|
{% import "comments.html" as comments %}
|
||||||
|
|
||||||
{% block page_title %}{{ 'Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number'] }}{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
display:grid;
|
display:grid;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
{% set page_title = 'Delete comment?' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block page_title %}Delete comment?{% endblock %}
|
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
display: grid;
|
display: grid;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
{% set page_title = 'Error' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block page_title %}Error{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ error_message }}
|
{{ error_message }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
{% set page_title = playlist_name + ' - Local playlist' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block page_title %}{{ playlist_name + ' - Local playlist' }}{% endblock %}
|
|
||||||
{% import "common_elements.html" as common_elements %}
|
{% import "common_elements.html" as common_elements %}
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
{% set page_title = 'Local playlists' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block page_title %}Local playlists{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
{% set page_title = 'Login' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block page_title %}Login{% endblock %}
|
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
{% set page_title = title + ' - Page ' + parameters_dictionary.get('page', '1') %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block page_title %}{{ title + ' - Page ' + parameters_dictionary.get('page', '1') }}{% endblock %}
|
|
||||||
{% import "common_elements.html" as common_elements %}
|
{% import "common_elements.html" as common_elements %}
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
{% set page_title = 'Post reply' if replying else 'Post comment' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% import "comments.html" as comments %}
|
{% import "comments.html" as comments %}
|
||||||
|
|
||||||
{% block page_title %}{{ 'Post reply' if replying else 'Post comment' }}{% endblock %}
|
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
display: grid;
|
display: grid;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% set search_box_value = query %}
|
{% set search_box_value = query %}
|
||||||
|
{% set page_title = query + ' - Search' %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block page_title %}{{ query + ' - Search' }}{% endblock %}
|
|
||||||
{% import "common_elements.html" as common_elements %}
|
{% import "common_elements.html" as common_elements %}
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
{% set page_title = (title if (title is defined) else 'Status') %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block page_title %}{{ title if (title is defined) else 'Status'}}{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{{ message }}
|
{{ message }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
{% set page_title = title %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% import "common_elements.html" as common_elements %}
|
{% import "common_elements.html" as common_elements %}
|
||||||
{% import "comments.html" as comments %}
|
{% import "comments.html" as comments %}
|
||||||
{% block page_title %}{{ title }}{% endblock %}
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
main{
|
main{
|
||||||
display:grid;
|
display:grid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user