From b936b852e982043649c3031a51ef7a2dbda0f7c9 Mon Sep 17 00:00:00 2001 From: mi Date: Fri, 7 Nov 2025 21:51:44 +1000 Subject: [PATCH] :lipstick: compact footer --- app.py | 7 +++-- comics_data.py | 4 +++ static/css/style.css | 75 ++++++++++++++++++++++++++++++++++++++++++++ templates/base.html | 2 +- 4 files changed, 85 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 455edb9..b6e1597 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 +from comics_data import COMICS, FULL_WIDTH_DEFAULT, PLAIN_DEFAULT, HEADER_IMAGE, COMPACT_FOOTER app = Flask(__name__) @@ -12,7 +12,10 @@ app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'your-secret-key') @app.context_processor def inject_global_settings(): """Make global settings available to all templates""" - return {'header_image': HEADER_IMAGE} + return { + 'header_image': HEADER_IMAGE, + 'compact_footer': COMPACT_FOOTER + } def is_full_width(comic): diff --git a/comics_data.py b/comics_data.py index fd37789..6ccb757 100644 --- a/comics_data.py +++ b/comics_data.py @@ -14,6 +14,10 @@ PLAIN_DEFAULT = False # Example: HEADER_IMAGE = 'title.jpg' will use static/images/title.jpg HEADER_IMAGE = 'title.jpg' +# Global setting: Set to True to display footer in compact mode +# Compact mode: single line, no border, horizontal layout +COMPACT_FOOTER = True + COMICS = [ { 'number': 1, diff --git a/static/css/style.css b/static/css/style.css index 3be0b44..192d68c 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -494,4 +494,79 @@ footer { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; +} + +/* Compact Footer Mode */ +footer.compact-footer { + border-top: none; + padding: 0; + margin-top: 0; +} + +footer.compact-footer .container { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; +} + +footer.compact-footer .footer-content { + display: flex; + align-items: center; + gap: 1rem; + margin-bottom: 0; + flex-wrap: nowrap; +} + +footer.compact-footer .footer-section { + flex: none; + min-width: auto; + display: flex; + align-items: center; + gap: 0.5rem; +} + +footer.compact-footer .footer-section h3 { + font-size: 0.75rem; + margin-bottom: 0; + display: inline; +} + +footer.compact-footer .social-links { + flex-direction: row; + gap: 0.5rem; +} + +footer.compact-footer .social-links a { + font-size: 0.75rem; +} + +footer.compact-footer .newsletter-placeholder { + font-size: 0.75rem; + margin: 0; +} + +footer.compact-footer .footer-bottom { + border-top: none; + padding-top: 0; + display: flex; + align-items: center; +} + +footer.compact-footer .footer-bottom::before { + content: '|'; + margin-right: 1rem; + color: #666; +} + +footer.compact-footer .footer-bottom p { + font-size: 0.75rem; + margin: 0; +} + +/* Add separator between sections in compact mode */ +footer.compact-footer .footer-section:not(:last-child)::after { + content: '|'; + margin-left: 1rem; + color: #666; } \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 87ae21a..fec7db3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -62,7 +62,7 @@ -