commit 7235fd40a7579d6329ab16dc0f9f3d7d4a16f6b9 parent 9eaa8f06d72b7589ced0dcd0cf93d4bf25ef0123 Author: Asher Morgan <59518073+ashermorgan@users.noreply.github.com> Date: Thu, 11 Apr 2024 20:01:35 -0700 Add page titles Diffstat:
5 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/songs2slides/__init__.py b/songs2slides/__init__.py @@ -2,7 +2,8 @@ from flask import Flask, render_template from dotenv import load_dotenv def error_404(e): - return render_template('error.html', message='404 Not Found'), 404 + return render_template('error.html', message='404 Not Found', + title='Not Found'), 404 def create_app(): app = Flask(__name__) diff --git a/songs2slides/templates/create-step-1.html b/songs2slides/templates/create-step-1.html @@ -1,5 +1,7 @@ {% extends "layout.html" %} +{% set title = 'Create' %} + {% block head %} <link rel="stylesheet" href="{{ url_for('static', filename='create.css') }}"/> <script src="{{ url_for('static', filename='create.js') }}"></script> diff --git a/songs2slides/templates/create-step-2.html b/songs2slides/templates/create-step-2.html @@ -1,5 +1,7 @@ {% extends "layout.html" %} +{% set title = 'Create' %} + {% block head %} <link rel="stylesheet" href="{{ url_for('static', filename='create.css') }}"/> <script src="{{ url_for('static', filename='create.js') }}"></script> diff --git a/songs2slides/templates/create-step-3.html b/songs2slides/templates/create-step-3.html @@ -1,5 +1,7 @@ {% extends "layout.html" %} +{% set title = 'Create' %} + {% block head %} <link rel="stylesheet" href="{{ url_for('static', filename='create.css') }}"/> <script src="{{ url_for('static', filename='create.js') }}"></script> diff --git a/songs2slides/templates/layout.html b/songs2slides/templates/layout.html @@ -3,7 +3,7 @@ <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>SongsSlides</title> + <title>{% if title %}{{ title }} - {% endif %}SongsSlides</title> <meta name="description" content="An easy-to-use tool that automatically finds song lyrics and creates lyric slideshows"> <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icon-32.png') }}"> <link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='icon-32.png') }}">