From be8ea1c34f7338237ef7e6b32ffbda22c61d1a38 Mon Sep 17 00:00:00 2001 From: mi Date: Thu, 6 Nov 2025 21:38:51 +1000 Subject: [PATCH] :sparkles: optional title --- comics_data.py | 1 - templates/archive.html | 4 ++-- templates/comic.html | 4 ++-- templates/index.html | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/comics_data.py b/comics_data.py index f9bc84f..47eabba 100644 --- a/comics_data.py +++ b/comics_data.py @@ -12,7 +12,6 @@ COMICS = [ }, { 'number': 2, - 'title': 'Second Comic', 'filename': 'comic-002.png', 'date': '2025-01-08', 'alt_text': 'The second comic', diff --git a/templates/archive.html b/templates/archive.html index d5ee0b6..79c523c 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -12,9 +12,9 @@
{{ comic.title }} + alt="{{ comic.title if comic.title else '#' ~ comic.number }}">
-

#{{ comic.number }}: {{ comic.title }}

+

#{{ comic.number }}{% if comic.title %}: {{ comic.title }}{% endif %}

{{ comic.date }}

diff --git a/templates/comic.html b/templates/comic.html index e8a1843..9bfbb05 100644 --- a/templates/comic.html +++ b/templates/comic.html @@ -3,13 +3,13 @@ {% block content %}
-

{{ comic.title }}

+

{{ comic.title if comic.title else '#' ~ comic.number }}

{{ comic.date }}

{{ comic.title }}
diff --git a/templates/index.html b/templates/index.html index 6465e71..6a602df 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,13 +3,13 @@ {% block content %}
-

{{ comic.title }}

+

{{ comic.title if comic.title else '#' ~ comic.number }}

{{ comic.date }}

{{ comic.title }}