diff options
author | Nikolas <nikolas@boutalas.com> | 2024-11-16 18:54:49 +0000 |
---|---|---|
committer | Nikolas <nikolas@boutalas.com> | 2024-11-16 18:54:49 +0000 |
commit | 9b5e1ca545ac611963a655b58d360684f9c34153 (patch) | |
tree | b942b13d6a10f22226e711a3345485c3cd96d2f5 /templates | |
parent | 49285301aca568d045fdbd3c3f9f03f9ec176843 (diff) |
add section or page title as HTML title
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 6 | ||||
-rw-r--r-- | templates/photos-page.html | 4 | ||||
-rw-r--r-- | templates/photos.html | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/templates/base.html b/templates/base.html index 4ea65e1..400c13d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,7 +5,11 @@ <link rel="stylesheet" href="/styles.css" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta charset="utf-8" /> - <title>Archive - Boutalas</title> + {% if section.title %} + <title>{{ section.title }}</title> + {% endif %} {% if page.title %} + <title>{{ page.title }}</title> + {% endif %} </head> <body> diff --git a/templates/photos-page.html b/templates/photos-page.html index 53f8b5c..a47b41e 100644 --- a/templates/photos-page.html +++ b/templates/photos-page.html @@ -1,4 +1,4 @@ {% extends "base.html" %} {% block body %} -<h1>{{page.extra.caption}}</h1> -<img alt="{{page.extra.caption}}" src="{{ page.extra.file_name }}" /> +<h1>{{ page.title }}</h1> +<img alt="{{page.title}}" src="./{{ page.extra.file_name }}" /> {{ page.content | safe }} {% endblock body %} diff --git a/templates/photos.html b/templates/photos.html index bad4589..218a26d 100644 --- a/templates/photos.html +++ b/templates/photos.html @@ -1,14 +1,13 @@ {% extends "base.html" %} {% block body %} -<h1>{{ section.title }}</h1> {% for page in paginator.pages %} <figure class="center"> <a {% if page.content %} href="{{ page.permalink }}" {% endif %}> <img - alt="{{page.extra.caption}}" + alt="{{page.title}}" src="{{ page.permalink }}/{{ page.extra.file_name }}" /> </a> - <figcaption>{{page.extra.caption}}</figcaption> + <figcaption>{{page.title}}</figcaption> </figure> {% endfor %} {% if paginator.previous or paginator.next%} <div class="row"> |