💄 footer image

This commit is contained in:
mi
2025-11-13 10:01:42 +10:00
parent 5cfe3f5056
commit 9bd3cdf552
5 changed files with 29 additions and 1 deletions

3
app.py
View File

@@ -1,7 +1,7 @@
import os import os
from datetime import datetime from datetime import datetime
from flask import Flask, render_template, abort, jsonify, request 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 import markdown
app = Flask(__name__) app = Flask(__name__)
@@ -15,6 +15,7 @@ def inject_global_settings():
"""Make global settings available to all templates""" """Make global settings available to all templates"""
return { return {
'header_image': HEADER_IMAGE, 'header_image': HEADER_IMAGE,
'footer_image': FOOTER_IMAGE,
'compact_footer': COMPACT_FOOTER 'compact_footer': COMPACT_FOOTER
} }

View File

@@ -14,6 +14,11 @@ PLAIN_DEFAULT = False
# Example: HEADER_IMAGE = 'title.jpg' will use static/images/title.jpg # Example: HEADER_IMAGE = 'title.jpg' will use static/images/title.jpg
HEADER_IMAGE = 'title.png' 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 # Global setting: Set to True to display footer in compact mode
# Compact mode: single line, no border, horizontal layout # Compact mode: single line, no border, horizontal layout
COMPACT_FOOTER = True COMPACT_FOOTER = True

View File

@@ -84,6 +84,19 @@ body {
display: block; 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 and Navigation */
header { header {
border-bottom: var(--border-width-thick) solid var(--border-color); border-bottom: var(--border-width-thick) solid var(--border-color);

BIN
static/images/footer.jpg LFS Normal file

Binary file not shown.

View File

@@ -93,6 +93,12 @@
</div> </div>
</footer> </footer>
{% if footer_image %}
<div class="site-footer-image">
<img src="{{ url_for('static', filename='images/' + footer_image) }}" alt="Sunday Comics Footer">
</div>
{% endif %}
<script src="{{ url_for('static', filename='js/comic-nav.js') }}"></script> <script src="{{ url_for('static', filename='js/comic-nav.js') }}"></script>
{% block extra_js %}{% endblock %} {% block extra_js %}{% endblock %}
</body> </body>