💄 footer image
This commit is contained in:
3
app.py
3
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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
BIN
static/images/footer.jpg
LFS
Normal file
BIN
static/images/footer.jpg
LFS
Normal file
Binary file not shown.
@@ -93,6 +93,12 @@
|
||||
</div>
|
||||
</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>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user