diff --git a/.gitignore b/.gitignore
index 70edc7b..dda4aab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,34 @@
+# ============================================================
+# FORK-FRIENDLY GITIGNORE
+# ============================================================
+# This gitignore is designed for the fork-and-customize workflow.
+# - User content (comics, images) IS tracked in git
+# - User config (comics_data.py, variables.css) IS tracked in git
+# - Only generated/temporary files are ignored
+# ============================================================
+
+# IDE and environment
.idea
.venv
-# This should be generated on deploy
+# Python bytecode
+__pycache__/
+*.pyc
+*.pyo
+*.pyd
+
+# macOS
+.DS_Store
+
+# User configuration (use the .example files as templates)
+# Uncomment these lines if you want to gitignore user config:
+# comics_data.py
+# static/css/variables.css
+
+# Environment variables
+.env
+
+# Generated files (regenerated on deploy/publish)
static/feed.rss
static/sitemap.xml
-
-# Comic data cache
data/comics/.comics_cache.pkl
\ No newline at end of file
diff --git a/CLAUDE.md b/CLAUDE.md
index b9df0c9..abe4344 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -6,6 +6,106 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
Sunday Comics is a Flask-based webcomic website with server-side rendering and client-side navigation. Comics are stored as individual YAML files in `data/comics/`, making them easy to manage without a database. Each comic gets its own file for clean organization and version control.
+## Fork-and-Customize Architecture
+
+**IMPORTANT:** Sunday Comics is designed for users to fork and customize for their own webcomics. When making changes, maintain the separation between framework code and user customization to avoid breaking upstream updates.
+
+### File Categories
+
+**Core Framework Files** (Updated by upstream - DO NOT modify unless fixing bugs):
+- `app.py` - Flask application logic
+- `data_loader.py` - YAML loading and caching
+- `templates/*.html` - Jinja2 templates
+- `static/css/style.css` - Core framework styles (references CSS variables)
+- `static/js/*.js` - Client-side navigation and functionality
+- `scripts/*.py` - Utility scripts
+- `version.py`, `VERSION` - Version management
+- `Dockerfile`, `docker-compose.yml` - Deployment configuration
+
+**User Customization Files** (Safe for users to modify):
+- `comics_data.py` - Global configuration settings
+- `static/css/variables.css` - Design variables (colors, fonts, spacing, layout)
+- `data/comics/*.yaml` - Comic metadata (except TEMPLATE.yaml)
+- `content/*.md` - Markdown content (about page, author notes, terms)
+- `static/images/*` - User's images and graphics
+
+**Template Files** (Reference only):
+- `comics_data.py.example` - Configuration template showing all options
+- `data/comics/TEMPLATE.yaml` - Comic file template
+
+**Generated Files** (Auto-created, gitignored):
+- `static/feed.rss`, `static/sitemap.xml` - Generated by scripts
+- `data/comics/.comics_cache.pkl` - Comic cache
+- `__pycache__/`, `*.pyc` - Python bytecode
+
+### CSS Architecture
+
+**Two-file CSS system** to separate customization from framework:
+
+1. **`static/css/variables.css`** (User customization)
+ - Contains all CSS custom properties
+ - Organized by category: Colors, Typography, Spacing, Borders, Layout, Transitions
+ - Users edit this file to customize their design
+ - Loaded first in templates
+
+2. **`static/css/style.css`** (Core framework)
+ - References variables from variables.css
+ - Contains structural styles and layout logic
+ - Should not be modified by users (to allow upstream updates)
+ - Loaded after variables.css
+
+**When modifying styles:**
+- Add new design tokens to `variables.css` (e.g., `--color-accent: #ff0000;`)
+- Reference those variables in `style.css` (e.g., `color: var(--color-accent);`)
+- Never hardcode values in `style.css` that users might want to customize
+
+### Configuration Pattern
+
+**`comics_data.py.example`** serves as a reference:
+- Shows all available configuration options with defaults
+- Updated when new settings are added to the framework
+- Users can check this file when merging upstream updates
+- Never imported - purely documentation
+
+**When adding new configuration options:**
+1. Add the option to `comics_data.py` with a default value
+2. Add the same option to `comics_data.py.example` with documentation
+3. Update `CHANGELOG.md` with migration instructions
+4. Consider backward compatibility (provide sensible defaults)
+
+### Best Practices for Code Changes
+
+**DO:**
+- ✅ Add new features to core framework files (app.py, templates, scripts)
+- ✅ Create new CSS variables in variables.css for customizable values
+- ✅ Update comics_data.py.example when adding new config options
+- ✅ Document breaking changes in CHANGELOG.md with migration steps
+- ✅ Test that user customizations (comics_data.py, variables.css) still work
+- ✅ Keep file structure consistent with the fork-friendly model
+
+**DON'T:**
+- ❌ Hardcode design values in style.css that users might want to change
+- ❌ Modify user content files (data/comics/*.yaml, content/*.md)
+- ❌ Change the purpose or structure of user customization files
+- ❌ Remove configuration options without deprecation warnings
+- ❌ Make changes that require users to edit core framework files
+
+**When adding new features:**
+1. Ask: "Will users want to customize this?"
+2. If yes: Add a variable/config option
+3. If no: Implement in framework code
+4. Always maintain the separation
+
+### Upstream Update Workflow
+
+Users following [UPSTREAM.md](UPSTREAM.md) will:
+1. Fork the repository
+2. Customize `comics_data.py` and `variables.css`
+3. Add their comics and content
+4. Periodically merge upstream updates: `git merge upstream/main`
+5. Resolve conflicts (usually only in .example files)
+6. Benefit from framework improvements without losing customizations
+
## Development Commands
**Run the development server:**
@@ -224,6 +324,9 @@ Global context variables injected into all templates:
## Static Assets
+- `static/css/variables.css`: Design variables for user customization (colors, fonts, spacing, etc.)
+- `static/css/style.css`: Core framework styles (references variables.css)
+- `static/js/comic-nav.js`: Client-side navigation
- `static/images/comics/`: Full-size comic images
- `static/images/thumbs/`: Thumbnails for archive page (optional, same filename as comic)
- `static/images/icons/`: Navigation icons (first.png, previous.png, next.png, latest.png) used when `USE_ICON_NAV` is True
@@ -280,7 +383,7 @@ Environment variables:
Sunday Comics follows WCAG 2.1 Level AA guidelines. When modifying the site, maintain these accessibility features:
### Keyboard Navigation
-- **Focus indicators**: All interactive elements have visible 3px outlines when focused (defined in `static/css/style.css`)
+- **Focus indicators**: All interactive elements have visible 3px outlines when focused (colors defined in `static/css/variables.css`, styles in `static/css/style.css`)
- **Skip to main content**: First focusable element on every page, appears at top when focused
- **Keyboard shortcuts**: Arrow keys (Left/Right), Home, End for comic navigation (handled in `static/js/comic-nav.js`)
- **Focus management**: After navigation, focus programmatically moves to `#comic-image-focus` element
diff --git a/README.md b/README.md
index af0c488..8e4aa20 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,7 @@ A Flask-based webcomic website with server-side rendering using Jinja2 templates
- [Reporting Violations](#reporting-violations)
- [Project Structure](#project-structure)
- [Setup](#setup)
+- [Keeping Your Fork Up-to-Date](#keeping-your-fork-up-to-date)
- [Environment Variables](#environment-variables)
- [Configuration](#configuration)
- [Global Settings](#global-settings)
@@ -632,12 +633,14 @@ Resources:
```
sunday/
├── app.py # Main Flask application
-├── comics_data.py # Global configuration (not comic data)
+├── comics_data.py # Global configuration (your settings)
+├── comics_data.py.example # Configuration template (reference for new options)
├── data_loader.py # YAML comic loader with caching
├── requirements.txt # Python dependencies
├── Dockerfile # Production Docker image
├── docker-compose.yml # Docker Compose configuration
├── .dockerignore # Docker build exclusions
+├── UPSTREAM.md # Guide for keeping forks up-to-date
├── data/ # Comic data directory
│ └── comics/ # Individual comic YAML files
│ ├── 001.yaml # Comic #1
@@ -663,7 +666,8 @@ sunday/
│ └── 404.html # Error page
└── static/ # Static files
├── css/
- │ └── style.css # Main stylesheet
+ │ ├── variables.css # Design variables (your customization)
+ │ └── style.css # Core framework styles
├── js/
│ └── comic-nav.js # Client-side navigation
├── images/ # Image directory
@@ -688,6 +692,38 @@ python app.py
3. Visit http://127.0.0.1:3000 in your browser
+## Keeping Your Fork Up-to-Date
+
+**If you forked Sunday Comics to create your own webcomic site**, you can stay up-to-date with framework improvements while keeping your customizations.
+
+Sunday Comics is designed with a **fork-and-customize workflow**:
+- ✅ **Core framework files** (app.py, templates, scripts) - updated by upstream
+- ✅ **User customization** (comics_data.py, variables.css) - your settings
+- ✅ **User content** (comics, images, markdown) - your creative work
+
+When you pull upstream updates, you'll get new features and bug fixes without losing your content or design.
+
+**📖 [Read the complete guide: UPSTREAM.md](UPSTREAM.md)**
+
+The UPSTREAM.md guide covers:
+- Setting up your fork with an upstream remote
+- Pulling and merging updates
+- Handling merge conflicts (with examples)
+- Understanding which files to modify vs. leave alone
+- Troubleshooting common issues
+
+**Quick update workflow:**
+```bash
+# Every few weeks/months:
+git fetch upstream # Get new commits
+git merge upstream/main # Merge updates
+# Resolve any conflicts if needed
+git push origin main # Push to your fork
+python scripts/publish_comic.py # Rebuild site
+```
+
+**First time?** See [UPSTREAM.md](UPSTREAM.md) for the initial setup steps.
+
## Environment Variables
The app can be configured via environment variables:
@@ -1118,8 +1154,9 @@ For larger comic archives, consider replacing the `COMICS` list with a database:
- Customize logo by setting `LOGO_IMAGE` and `LOGO_MODE`
### Styling
-- Modify `static/css/style.css` to change colors, fonts, and layout
-- Current color scheme uses blue (#3498db) and dark blue-gray (#2c3e50)
+- **Customize design:** Edit `static/css/variables.css` to change colors, fonts, spacing, and layout dimensions
+- **Framework styles:** `static/css/style.css` contains core styles that reference the variables (avoid modifying for easier upstream updates)
+- Variables are organized by category: Colors, Typography, Spacing, Borders, Layout, Transitions
### About Page
- Edit `content/about.md` to add your bio and comic information (supports markdown)
diff --git a/UPSTREAM.md b/UPSTREAM.md
new file mode 100644
index 0000000..9125dac
--- /dev/null
+++ b/UPSTREAM.md
@@ -0,0 +1,356 @@
+# Updating from Upstream
+
+This guide explains how to keep your forked Sunday Comics site up-to-date with framework improvements while preserving your customizations.
+
+## Fork-and-Customize Workflow
+
+Sunday Comics is designed to be forked and customized for your own webcomic. The project separates:
+
+- **Core framework files** (updated by upstream) - app logic, templates, scripts
+- **User content files** (your comic data) - comics, images, markdown content
+- **User configuration** (your settings) - config and design variables
+
+When you pull updates from upstream, you'll get new features and bug fixes without losing your content or customizations.
+
+---
+
+## Initial Setup
+
+### 1. Fork the Repository
+
+On GitHub, click "Fork" to create your own copy of Sunday Comics.
+
+### 2. Clone Your Fork
+
+```bash
+git clone https://github.com/YOUR-USERNAME/sunday-comics.git
+cd sunday-comics
+```
+
+### 3. Add Upstream Remote
+
+Add the original repository as an "upstream" remote:
+
+```bash
+git remote add upstream https://github.com/ORIGINAL-AUTHOR/sunday-comics.git
+```
+
+Verify your remotes:
+
+```bash
+git remote -v
+# origin https://github.com/YOUR-USERNAME/sunday-comics.git (fetch)
+# origin https://github.com/YOUR-USERNAME/sunday-comics.git (push)
+# upstream https://github.com/ORIGINAL-AUTHOR/sunday-comics.git (fetch)
+# upstream https://github.com/ORIGINAL-AUTHOR/sunday-comics.git (push)
+```
+
+### 4. Set Up Your Configuration
+
+**Option A: Track your config in git (recommended)**
+
+Your `comics_data.py` and `static/css/variables.css` files are already set up. Customize them and commit:
+
+```bash
+# Edit your configuration
+nano comics_data.py
+nano static/css/variables.css
+
+# Commit your changes
+git add comics_data.py static/css/variables.css
+git commit -m "Configure site settings and design"
+git push origin main
+```
+
+**Option B: Keep config out of git**
+
+If you prefer to keep your config private:
+
+```bash
+# Uncomment the gitignore lines for config files
+nano .gitignore
+# Uncomment:
+# comics_data.py
+# static/css/variables.css
+
+# Copy the example files
+cp comics_data.py comics_data.py.backup
+# Now comics_data.py won't be tracked
+```
+
+---
+
+## Getting Updates from Upstream
+
+### 1. Fetch Upstream Changes
+
+```bash
+git fetch upstream
+```
+
+This downloads new commits from the original repository without modifying your files.
+
+### 2. Review What Changed
+
+See what's new in upstream:
+
+```bash
+# View commit log
+git log HEAD..upstream/main --oneline
+
+# See which files changed
+git diff HEAD..upstream/main --stat
+
+# Review the CHANGELOG
+git show upstream/main:CHANGELOG.md
+```
+
+### 3. Merge Upstream Changes
+
+```bash
+# Merge upstream into your current branch
+git merge upstream/main
+```
+
+**If there are no conflicts:**
+```bash
+# Push the updates to your fork
+git push origin main
+```
+
+**If there are conflicts** (see next section).
+
+---
+
+## Handling Merge Conflicts
+
+Conflicts may occur if both you and upstream modified the same file. Common scenarios:
+
+### Scenario 1: Framework Added New Config Options
+
+**Example:** Upstream added a new setting to `comics_data.py.example`
+
+**What to do:**
+1. The merge conflict will only be in `comics_data.py.example` (not your `comics_data.py`)
+2. Accept upstream's version:
+ ```bash
+ git checkout --theirs comics_data.py.example
+ git add comics_data.py.example
+ ```
+3. Review `comics_data.py.example` for new settings
+4. Manually add any new settings you want to your `comics_data.py`
+
+### Scenario 2: CSS Variables Conflict
+
+**Example:** Both you and upstream added/changed CSS variables
+
+**What to do:**
+1. Open the conflicted file:
+ ```bash
+ nano static/css/variables.css
+ ```
+2. Look for conflict markers:
+ ```
+ <<<<<<< HEAD
+ --your-custom-variable: #ff0000;
+ =======
+ --new-upstream-variable: #00ff00;
+ >>>>>>> upstream/main
+ ```
+3. Keep both variables:
+ ```css
+ --your-custom-variable: #ff0000;
+ --new-upstream-variable: #00ff00;
+ ```
+4. Save and mark as resolved:
+ ```bash
+ git add static/css/variables.css
+ git commit -m "Merge upstream CSS variables"
+ ```
+
+### Scenario 3: Rare - Core File Conflicts
+
+If you modified a core framework file (app.py, templates, etc.), you may have conflicts.
+
+**Best practice:** Avoid modifying core files. If you need custom behavior:
+- Add new routes/functions instead of modifying existing ones
+- Use template blocks for customization
+- Open an issue/PR to suggest the feature for upstream
+
+**If you must resolve:**
+```bash
+# Open the conflicted file
+nano path/to/conflicted_file.py
+
+# Resolve conflicts manually
+# Then:
+git add path/to/conflicted_file.py
+git commit -m "Merge upstream changes with custom modifications"
+```
+
+---
+
+## File Categories Reference
+
+### Core Framework (Upstream Updates)
+
+**DO NOT modify these files** - you'll get conflicts when merging:
+
+- `app.py` - Flask application
+- `data_loader.py` - YAML loading logic
+- `scripts/*.py` - Utility scripts
+- `templates/*.html` - Jinja templates (unless extending)
+- `static/css/style.css` - Core CSS framework
+- `static/js/*.js` - JavaScript functionality
+- `version.py`, `VERSION` - Version info
+- `Dockerfile`, `docker-compose.yml` - Deployment config
+- Documentation files (README, CLAUDE, etc.)
+
+### User Configuration (You Customize)
+
+**Safe to modify** - tracked in git:
+
+- `comics_data.py` - Your site settings
+- `static/css/variables.css` - Your design variables
+- `data/comics/*.yaml` - Your comic metadata
+- `content/*.md` - Your markdown content (about page, author notes)
+- `static/images/*` - Your images and graphics
+
+### Template Files (Reference)
+
+**Use as reference** - copy to create your versions:
+
+- `comics_data.py.example` - Default configuration template
+- `data/comics/TEMPLATE.yaml` - Comic file template
+
+### Generated Files (Ignored by Git)
+
+**Automatically regenerated:**
+
+- `static/feed.rss` - RSS feed
+- `static/sitemap.xml` - Sitemap
+- `data/comics/.comics_cache.pkl` - Comic cache
+- `__pycache__/` - Python bytecode
+
+---
+
+## Migration Notes
+
+When upstream releases breaking changes, check `CHANGELOG.md` for migration instructions.
+
+**Example migration scenario:**
+
+```markdown
+## [2025.03.15] - Breaking Changes
+### Changed
+- Renamed `SHOW_HEADER_IMAGE` to `HEADER_IMAGE` in comics_data.py
+
+**Migration:** Update your `comics_data.py`:
+- Old: `SHOW_HEADER_IMAGE = True`
+- New: `HEADER_IMAGE = 'title.jpg'`
+```
+
+After merging, check the CHANGELOG and update your config accordingly.
+
+---
+
+## Best Practices
+
+### ✅ DO:
+
+- Keep your fork's main branch in sync with upstream
+- Customize via `comics_data.py` and `variables.css`
+- Add your comics to `data/comics/`
+- Read the CHANGELOG before/after merging
+- Test your site after merging updates
+- Commit your changes regularly
+
+### ❌ DON'T:
+
+- Modify core framework files (app.py, templates, etc.)
+- Delete or rename upstream files (you'll break updates)
+- Force push over merged commits
+- Ignore merge conflicts (resolve them properly)
+
+---
+
+## Troubleshooting
+
+### "I modified a core file and now I have conflicts"
+
+**Option 1: Keep your changes** (advanced)
+```bash
+# Resolve conflicts manually, testing thoroughly
+git mergetool
+git commit
+```
+
+**Option 2: Discard your changes** (start fresh)
+```bash
+# Reset to upstream version
+git checkout upstream/main -- path/to/file.py
+git add path/to/file.py
+git commit -m "Reset to upstream version"
+```
+
+### "I want to see what changed before merging"
+
+```bash
+# Create a test branch
+git checkout -b test-upstream-merge
+
+# Merge in the test branch
+git merge upstream/main
+
+# If you like it, merge to main
+git checkout main
+git merge test-upstream-merge
+
+# If not, delete the test branch
+git checkout main
+git branch -D test-upstream-merge
+```
+
+### "My site broke after merging"
+
+```bash
+# Check what changed
+git log --oneline -10
+
+# Test the previous version
+git checkout HEAD~1
+python app.py
+
+# If it works, the issue is in the latest commit
+git checkout main
+git diff HEAD~1 HEAD
+
+# Read CHANGELOG for migration notes
+cat CHANGELOG.md
+```
+
+---
+
+## Getting Help
+
+- **Check the docs:** `README.md`, `CLAUDE.md`, `CHANGELOG.md`
+- **Report issues:** [GitHub Issues](https://github.com/ORIGINAL-AUTHOR/sunday-comics/issues)
+- **Ask questions:** Open a discussion or issue on GitHub
+
+---
+
+## Summary
+
+**Regular update workflow:**
+
+```bash
+# Every few weeks/months:
+git fetch upstream # Get new commits
+git log HEAD..upstream/main --oneline # Review changes
+git merge upstream/main # Merge updates
+# Resolve any conflicts
+git push origin main # Push to your fork
+python scripts/publish_comic.py # Rebuild site
+```
+
+Your comics, images, and config stay safe - only the framework code updates!
diff --git a/comics_data.py.example b/comics_data.py.example
new file mode 100644
index 0000000..b93a3f6
--- /dev/null
+++ b/comics_data.py.example
@@ -0,0 +1,119 @@
+# Sunday Comics - Comic data configuration
+# Copyright (c) 2025 Tomasita Cabrera
+# Licensed under the MIT License - see LICENSE file for details
+#
+# Edit this file to add, remove, or modify comics
+
+# Global setting: The name of your comic/website
+COMIC_NAME = 'Sunday Comics'
+
+# Global setting: The name to display in the copyright notice
+# If not set (None), defaults to COMIC_NAME
+COPYRIGHT_NAME = None # e.g., 'Your Name' or 'Your Studio Name'
+
+# Global setting: Your website's domain (used for RSS feed, Open Graph tags, etc.)
+# Update this to your production domain when deploying
+SITE_URL = 'http://localhost:3000'
+
+# Global setting: CDN URL for static assets (set to None to use local assets)
+# When set, all static assets will be served from this CDN
+# Example: CDN_URL = 'https://cdn.example.com' (no trailing slash)
+# Leave as None for local development or if not using a CDN
+CDN_URL = None
+
+# Global setting: Set to True to make all comics full-width by default
+# Individual comics can override this with 'full_width': False
+FULL_WIDTH_DEFAULT = False
+
+# Global setting: Set to True to hide header and remove nav border by default
+# Individual comics can override this with 'plain': False
+PLAIN_DEFAULT = False
+
+# Global setting: Path to site logo (relative to static/images/)
+# Set to None to disable logo
+# Example: LOGO_IMAGE = 'logo.png' will use static/images/logo.png
+LOGO_IMAGE = 'logo.png'
+
+# Global setting: Logo display mode
+# 'beside' - Display logo next to the site title
+# 'replace' - Replace the site title with the logo
+# Only applies when LOGO_IMAGE is set
+LOGO_MODE = 'beside'
+
+# Global setting: Path to header image (relative to static/images/)
+# Set to None to disable header image
+# Example: HEADER_IMAGE = 'title.jpg' will use static/images/title.jpg
+HEADER_IMAGE = None
+
+# 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
+
+# Global setting: Path to shareable banner image (relative to static/images/)
+# Set to None to disable "Link to Us" section in footer
+# Example: BANNER_IMAGE = 'banner.jpg' will use static/images/banner.jpg
+BANNER_IMAGE = 'banner.jpg'
+
+# Global setting: Set to True to display footer in compact mode
+# Compact mode: single line, no border, horizontal layout
+COMPACT_FOOTER = False
+
+# Global setting: Set to True to make archive page full-width with 4 columns (2 on mobile)
+# Full-width archive shows square thumbnails with only dates, no titles
+ARCHIVE_FULL_WIDTH = True
+
+# Global setting: Set to True to enable sections/chapters on the archive page
+# Add 'section': 'Chapter Title' to comics where a new section starts
+SECTIONS_ENABLED = True
+
+# Global setting: Set to True to use icon images for comic navigation buttons
+# Icons should be in static/images/icons/ (first.png, previous.png, next.png, latest.png)
+USE_COMIC_NAV_ICONS = True
+
+# Global setting: Set to True to show icons next to main header navigation text
+# Uses alert.png for Latest, archive.png for Archive, info.png for About
+USE_HEADER_NAV_ICONS = True
+
+# Global setting: Set to True to use icons instead of text for footer social links
+# Uses instagram.png, youtube.png, and mail.png from static/images/icons/
+USE_FOOTER_SOCIAL_ICONS = True
+
+# Global setting: Set to True to show icons in share buttons (permalink and embed)
+# Uses link.png for permalink and embed.png for embed from static/images/icons/
+USE_SHARE_ICONS = True
+
+# Global setting: Set to True to show newsletter section in footer
+NEWSLETTER_ENABLED = False
+
+# Social media links - set to None to hide the link
+SOCIAL_INSTAGRAM = None # e.g., 'https://instagram.com/yourhandle'
+SOCIAL_YOUTUBE = None # e.g., 'https://youtube.com/@yourchannel'
+SOCIAL_EMAIL = None # e.g., 'mailto:your@email.com'
+
+# API documentation link - set to None to hide the link
+# Path is relative to static/ directory
+API_SPEC_LINK = None # Set to 'openapi.yml' to enable
+
+# Global setting: Set to True to enable comic embed functionality
+# When enabled, users can get embed codes to display comics on other websites
+EMBED_ENABLED = True
+
+# Global setting: Set to True to enable permalink copy button
+# When enabled, users can easily copy a direct link to the current comic
+PERMALINK_ENABLED = True
+
+# Load comics from YAML files
+from data_loader import load_comics_from_yaml, validate_comics
+
+COMICS = load_comics_from_yaml('data/comics')
+
+# Validate loaded comics
+if not validate_comics(COMICS):
+ print("Warning: Comic validation failed. Please check your YAML files.")
+
+# Show loaded comics count
+if COMICS:
+ print(f"Loaded {len(COMICS)} comics from data/comics/")
+else:
+ print("Warning: No comics loaded! Please add .yaml files to data/comics/")
diff --git a/static/css/style.css b/static/css/style.css
index a1874ae..5cf72b3 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -1,55 +1,13 @@
-/* CSS Variables for easy customization */
-:root {
- /* Colors */
- --color-primary: #000;
- --color-background: #fff;
- --color-text: #000;
- --color-text-muted: #666;
- --color-disabled: #999;
- --color-hover-bg: #f0f0f0;
+/* ============================================================
+ SUNDAY COMICS - CORE STYLES
+ ============================================================
- /* Typography */
- --font-family: 'Courier New', Courier, monospace;
- --font-size-base: 1rem;
- --font-size-xs: 0.7rem;
- --font-size-sm: 0.75rem;
- --font-size-md: 0.85rem;
- --font-size-lg: 0.9rem;
- --font-size-xl: 1.2rem;
- --font-size-2xl: 1.5rem;
- --font-size-3xl: 2rem;
- --font-size-4xl: 6rem;
- --line-height-base: 1.5;
- --line-height-tight: 1.3;
- --line-height-relaxed: 1.6;
- --letter-spacing-tight: 1px;
- --letter-spacing-wide: 2px;
+ This file contains the framework CSS that references variables
+ defined in variables.css. When updating from upstream, this file
+ may change, but your customizations in variables.css will be preserved.
- /* Spacing */
- --space-xs: 0.25rem;
- --space-sm: 0.5rem;
- --space-md: 1rem;
- --space-lg: 1.5rem;
- --space-xl: 2rem;
- --space-2xl: 3rem;
- --space-3xl: 4rem;
-
- /* Borders */
- --border-width-thin: 2px;
- --border-width-thick: 3px;
- --border-color: var(--color-primary);
- --border-radius: 0; /* Can be changed for rounded corners */
-
- /* Layout */
- --container-max-width: 900px;
- --content-max-width: 700px;
- --archive-grid-min: 180px;
- --archive-grid-min-mobile: 140px;
- --archive-thumbnail-height: 120px;
-
- /* Transitions (for future enhancements) */
- --transition-speed: 0.2s;
-}
+ Do not edit this file directly for design changes - use variables.css instead.
+ ============================================================ */
/* Reset and base styles */
* {
diff --git a/static/css/variables.css b/static/css/variables.css
new file mode 100644
index 0000000..4837738
--- /dev/null
+++ b/static/css/variables.css
@@ -0,0 +1,80 @@
+/* ============================================================
+ CSS VARIABLES FOR CUSTOMIZATION
+ ============================================================
+
+ This file contains all customizable design tokens for your webcomic.
+ Edit these values to change colors, fonts, spacing, and layout dimensions.
+
+ The main style.css file references these variables, so you can update
+ your design without touching the core framework styles.
+ ============================================================ */
+
+:root {
+ /* ========================================
+ COLORS
+ ======================================== */
+
+ --color-primary: #000;
+ --color-background: #fff;
+ --color-text: #000;
+ --color-text-muted: #666;
+ --color-disabled: #999;
+ --color-hover-bg: #f0f0f0;
+
+ /* ========================================
+ TYPOGRAPHY
+ ======================================== */
+
+ --font-family: 'Courier New', Courier, monospace;
+ --font-size-base: 1rem;
+ --font-size-xs: 0.7rem;
+ --font-size-sm: 0.75rem;
+ --font-size-md: 0.85rem;
+ --font-size-lg: 0.9rem;
+ --font-size-xl: 1.2rem;
+ --font-size-2xl: 1.5rem;
+ --font-size-3xl: 2rem;
+ --font-size-4xl: 6rem;
+ --line-height-base: 1.5;
+ --line-height-tight: 1.3;
+ --line-height-relaxed: 1.6;
+ --letter-spacing-tight: 1px;
+ --letter-spacing-wide: 2px;
+
+ /* ========================================
+ SPACING
+ ======================================== */
+
+ --space-xs: 0.25rem;
+ --space-sm: 0.5rem;
+ --space-md: 1rem;
+ --space-lg: 1.5rem;
+ --space-xl: 2rem;
+ --space-2xl: 3rem;
+ --space-3xl: 4rem;
+
+ /* ========================================
+ BORDERS
+ ======================================== */
+
+ --border-width-thin: 2px;
+ --border-width-thick: 3px;
+ --border-color: var(--color-primary);
+ --border-radius: 0; /* Can be changed for rounded corners */
+
+ /* ========================================
+ LAYOUT
+ ======================================== */
+
+ --container-max-width: 900px;
+ --content-max-width: 700px;
+ --archive-grid-min: 180px;
+ --archive-grid-min-mobile: 140px;
+ --archive-thumbnail-height: 120px;
+
+ /* ========================================
+ TRANSITIONS
+ ======================================== */
+
+ --transition-speed: 0.2s;
+}
diff --git a/templates/base.html b/templates/base.html
index ff653d2..b9cd1a5 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -36,6 +36,9 @@
+
+
+
{% block extra_css %}{% endblock %}