💄 header image

This commit is contained in:
mi
2025-11-07 21:33:47 +10:00
parent ed0a1aadb2
commit 9cb726312a
5 changed files with 53 additions and 2 deletions

8
app.py
View File

@@ -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
from comics_data import COMICS, FULL_WIDTH_DEFAULT, PLAIN_DEFAULT, HEADER_IMAGE
app = Flask(__name__)
@@ -9,6 +9,12 @@ app = Flask(__name__)
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}
def is_full_width(comic):
"""Determine if a comic should be full width based on global and per-comic settings"""
# If comic explicitly sets full_width, use that value