From 9bd3cdf55218ca6143503f338d079349a3c242be Mon Sep 17 00:00:00 2001 From: mi Date: Thu, 13 Nov 2025 10:01:42 +1000 Subject: [PATCH] :lipstick: footer image --- app.py | 3 ++- comics_data.py | 5 +++++ static/css/style.css | 13 +++++++++++++ static/images/footer.jpg | 3 +++ templates/base.html | 6 ++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 static/images/footer.jpg diff --git a/app.py b/app.py index 4053613..c1af981 100644 --- a/app.py +++ b/app.py @@ -1,7 +1,7 @@ import os from datetime import datetime from flask import Flask, render_template, abort, jsonify, request -from comics_data import COMICS, FULL_WIDTH_DEFAULT, PLAIN_DEFAULT, HEADER_IMAGE, COMPACT_FOOTER +from comics_data import COMICS, FULL_WIDTH_DEFAULT, PLAIN_DEFAULT, HEADER_IMAGE, FOOTER_IMAGE, COMPACT_FOOTER import markdown app = Flask(__name__) @@ -15,6 +15,7 @@ def inject_global_settings(): """Make global settings available to all templates""" return { 'header_image': HEADER_IMAGE, + 'footer_image': FOOTER_IMAGE, 'compact_footer': COMPACT_FOOTER } diff --git a/comics_data.py b/comics_data.py index 50f5fb8..aeb141b 100644 --- a/comics_data.py +++ b/comics_data.py @@ -14,6 +14,11 @@ PLAIN_DEFAULT = False # Example: HEADER_IMAGE = 'title.jpg' will use static/images/title.jpg HEADER_IMAGE = 'title.png' +# Global setting: Path to footer image (relative to static/images/) +# Set to None to disable footer image +# Example: FOOTER_IMAGE = 'footer.jpg' will use static/images/footer.jpg +FOOTER_IMAGE = None # 'footer.jpg' + # Global setting: Set to True to display footer in compact mode # Compact mode: single line, no border, horizontal layout COMPACT_FOOTER = True diff --git a/static/css/style.css b/static/css/style.css index 2f06767..99c8f40 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -84,6 +84,19 @@ body { display: block; } +/* Site Footer Image */ +.site-footer-image { + width: 100%; + overflow: hidden; + margin-top: 0; +} + +.site-footer-image img { + width: 100%; + height: auto; + display: block; +} + /* Header and Navigation */ header { border-bottom: var(--border-width-thick) solid var(--border-color); diff --git a/static/images/footer.jpg b/static/images/footer.jpg new file mode 100644 index 0000000..ad0328a --- /dev/null +++ b/static/images/footer.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8735684df3fe90492a9315036d32a1873d6f796793a31aa42cf25791192b244 +size 11463 diff --git a/templates/base.html b/templates/base.html index fec7db3..aeac9a5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -93,6 +93,12 @@ + {% if footer_image %} + + {% endif %} + {% block extra_js %}{% endblock %}