Compare commits
10 Commits
8abb185c02
...
bc2d4aebeb
| Author | SHA1 | Date | |
|---|---|---|---|
| bc2d4aebeb | |||
| e4e65db802 | |||
| 2ac7405cf4 | |||
| 2846576c2f | |||
| 9bd3cdf552 | |||
| 5cfe3f5056 | |||
| c218797d0b | |||
| ddf20d0f7f | |||
| 83ea55adc3 | |||
| bf8ed23bc4 |
@@ -99,9 +99,13 @@ Comics are stored in the `COMICS` list in `comics_data.py`. Each comic entry:
|
||||
|
||||
**Option 1: Use the script (recommended)**
|
||||
```bash
|
||||
# Add comic entry only
|
||||
python scripts/add_comic.py
|
||||
|
||||
# Add comic entry AND create markdown file for author notes
|
||||
python scripts/add_comic.py -m
|
||||
```
|
||||
This will automatically add a new entry with defaults. Then edit `comics_data.py` to customize.
|
||||
This will automatically add a new entry with defaults. The `-m` flag creates a markdown file in `content/author_notes/{date}.md` with a template. Then edit `comics_data.py` to customize.
|
||||
|
||||
**Option 2: Manual**
|
||||
1. Save your comic image in `static/images/comics/` (e.g., `comic-001.png`)
|
||||
|
||||
15
app.py
15
app.py
@@ -1,7 +1,11 @@
|
||||
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, USE_COMIC_NAV_ICONS, USE_HEADER_NAV_ICONS,
|
||||
USE_FOOTER_SOCIAL_ICONS, SOCIAL_INSTAGRAM, SOCIAL_YOUTUBE, SOCIAL_EMAIL
|
||||
)
|
||||
import markdown
|
||||
|
||||
app = Flask(__name__)
|
||||
@@ -15,7 +19,14 @@ def inject_global_settings():
|
||||
"""Make global settings available to all templates"""
|
||||
return {
|
||||
'header_image': HEADER_IMAGE,
|
||||
'compact_footer': COMPACT_FOOTER
|
||||
'footer_image': FOOTER_IMAGE,
|
||||
'compact_footer': COMPACT_FOOTER,
|
||||
'use_comic_nav_icons': USE_COMIC_NAV_ICONS,
|
||||
'use_header_nav_icons': USE_HEADER_NAV_ICONS,
|
||||
'use_footer_social_icons': USE_FOOTER_SOCIAL_ICONS,
|
||||
'social_instagram': SOCIAL_INSTAGRAM,
|
||||
'social_youtube': SOCIAL_YOUTUBE,
|
||||
'social_email': SOCIAL_EMAIL
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,17 +12,40 @@ PLAIN_DEFAULT = False
|
||||
# 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 = '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
|
||||
|
||||
# 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
|
||||
|
||||
# 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'
|
||||
|
||||
COMICS = [
|
||||
{
|
||||
'number': 1,
|
||||
'title': 'First Comic',
|
||||
'filename': 'comic-001.jpg',
|
||||
'mobile_filename': 'comic-001-mobile.jpg', # Optional: mobile version of the comic
|
||||
'date': '2025-01-01',
|
||||
'alt_text': 'The very first comic',
|
||||
'author_note': 'This is where your comic journey begins!',
|
||||
|
||||
@@ -4,6 +4,7 @@ Script to add a new comic entry to comics_data.py with reasonable defaults
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
|
||||
# Add parent directory to path so we can import comics_data
|
||||
@@ -11,8 +12,46 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from comics_data import COMICS
|
||||
|
||||
|
||||
def create_markdown_file(date_str, parent_dir):
|
||||
"""Create a markdown file for author notes"""
|
||||
author_notes_dir = os.path.join(parent_dir, 'content', 'author_notes')
|
||||
|
||||
# Create directory if it doesn't exist
|
||||
os.makedirs(author_notes_dir, exist_ok=True)
|
||||
|
||||
markdown_file = os.path.join(author_notes_dir, f'{date_str}.md')
|
||||
|
||||
# Check if file already exists
|
||||
if os.path.exists(markdown_file):
|
||||
print(f"Warning: Markdown file already exists: {markdown_file}")
|
||||
return markdown_file
|
||||
|
||||
# Create file with template content
|
||||
template = f"""# Author Note
|
||||
|
||||
Write your author note here using markdown formatting.
|
||||
|
||||
**Example formatting:**
|
||||
- *Italic text*
|
||||
- **Bold text**
|
||||
- [Links](https://example.com)
|
||||
- `Code snippets`
|
||||
"""
|
||||
|
||||
with open(markdown_file, 'w') as f:
|
||||
f.write(template)
|
||||
|
||||
print(f"Created markdown file: {markdown_file}")
|
||||
return markdown_file
|
||||
|
||||
|
||||
def main():
|
||||
"""Add a new comic entry with defaults"""
|
||||
parser = argparse.ArgumentParser(description='Add a new comic entry to comics_data.py')
|
||||
parser.add_argument('-m', '--markdown', action='store_true',
|
||||
help='Generate a markdown file for author notes')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get next number
|
||||
number = max(comic['number'] for comic in COMICS) + 1 if COMICS else 1
|
||||
|
||||
@@ -51,6 +90,10 @@ def main():
|
||||
|
||||
print(f"Added comic #{number}")
|
||||
|
||||
# Create markdown file if requested
|
||||
if args.markdown:
|
||||
create_markdown_file(comic['date'], parent_dir)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -1,3 +1,56 @@
|
||||
/* 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;
|
||||
|
||||
/* 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 (for future enhancements) */
|
||||
--transition-speed: 0.2s;
|
||||
}
|
||||
|
||||
/* Reset and base styles */
|
||||
* {
|
||||
margin: 0;
|
||||
@@ -6,16 +59,16 @@
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
line-height: 1.5;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
font-family: var(--font-family);
|
||||
line-height: var(--line-height-base);
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-background);
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 900px;
|
||||
max-width: var(--container-max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
padding: 0 var(--space-md);
|
||||
}
|
||||
|
||||
/* Site Header Image */
|
||||
@@ -31,18 +84,31 @@ 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: 3px solid #000;
|
||||
padding: 1.5rem 0;
|
||||
margin-bottom: 2rem;
|
||||
border-bottom: var(--border-width-thick) solid var(--border-color);
|
||||
padding: var(--space-lg) 0;
|
||||
margin-bottom: var(--space-xl);
|
||||
}
|
||||
|
||||
/* Header with image variant - no border, no padding, centered nav */
|
||||
header.header-with-image {
|
||||
border-bottom: none;
|
||||
padding: 1rem 0 0 0;
|
||||
margin-bottom: 0.5rem;
|
||||
padding: var(--space-md) 0 0 0;
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
header.header-with-image nav .container {
|
||||
@@ -50,7 +116,7 @@ header.header-with-image nav .container {
|
||||
}
|
||||
|
||||
header.header-with-image .nav-links a {
|
||||
font-size: 1.2rem;
|
||||
font-size: var(--font-size-xl);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -59,28 +125,31 @@ nav .container {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.nav-brand a {
|
||||
color: #000;
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
font-size: 1.5rem;
|
||||
font-size: var(--font-size-2xl);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
letter-spacing: var(--letter-spacing-wide);
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
gap: 1.5rem;
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
color: #000;
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
text-transform: lowercase;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.nav-links a:hover,
|
||||
@@ -88,52 +157,59 @@ nav .container {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
height: 1rem;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Main content */
|
||||
main {
|
||||
min-height: calc(100vh - 250px);
|
||||
padding: 0 0 3rem 0;
|
||||
padding: 0 0 var(--space-2xl) 0;
|
||||
}
|
||||
|
||||
/* Page header */
|
||||
.page-header {
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 2px solid #000;
|
||||
margin-bottom: var(--space-xl);
|
||||
padding-bottom: var(--space-md);
|
||||
border-bottom: var(--border-width-thin) solid var(--border-color);
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
color: #000;
|
||||
font-size: 2rem;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-3xl);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
}
|
||||
|
||||
.page-header p {
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
margin-top: var(--space-sm);
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
/* Content sections */
|
||||
.about-content {
|
||||
max-width: 700px;
|
||||
max-width: var(--content-max-width);
|
||||
}
|
||||
|
||||
.about-content h2 {
|
||||
color: #000;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--color-text);
|
||||
margin-top: var(--space-xl);
|
||||
margin-bottom: var(--space-sm);
|
||||
text-transform: uppercase;
|
||||
font-size: 1.2rem;
|
||||
letter-spacing: 1px;
|
||||
font-size: var(--font-size-xl);
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
}
|
||||
|
||||
.about-content p {
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.about-content ul {
|
||||
margin-left: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
margin-left: var(--space-lg);
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.about-content li {
|
||||
@@ -144,49 +220,49 @@ main {
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.6rem 1.2rem;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-background);
|
||||
text-decoration: none;
|
||||
border: 2px solid #000;
|
||||
border: var(--border-width-thin) solid var(--border-color);
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: var(--font-size-lg);
|
||||
font-family: var(--font-family);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* Error page */
|
||||
.error-page {
|
||||
text-align: center;
|
||||
padding: 4rem 1rem;
|
||||
padding: var(--space-3xl) var(--space-md);
|
||||
}
|
||||
|
||||
.error-page h1 {
|
||||
font-size: 6rem;
|
||||
color: #000;
|
||||
margin-bottom: 1rem;
|
||||
font-size: var(--font-size-4xl);
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.error-page h2 {
|
||||
color: #000;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--space-md);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.error-page p {
|
||||
color: #000;
|
||||
margin-bottom: 2rem;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--space-xl);
|
||||
}
|
||||
|
||||
/* Comic Container */
|
||||
.comic-container {
|
||||
border: 3px solid #000;
|
||||
padding: 1rem;
|
||||
border: var(--border-width-thick) solid var(--border-color);
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
/* Full-width comic variant */
|
||||
@@ -198,11 +274,11 @@ main {
|
||||
.comic-container-fullwidth .comic-header,
|
||||
.comic-container-fullwidth .comic-navigation,
|
||||
.comic-container-fullwidth .comic-transcript {
|
||||
max-width: 900px;
|
||||
max-width: var(--container-max-width);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
padding-left: var(--space-md);
|
||||
padding-right: var(--space-md);
|
||||
}
|
||||
|
||||
.comic-container-fullwidth .comic-image {
|
||||
@@ -224,30 +300,30 @@ main {
|
||||
}
|
||||
|
||||
.comic-header {
|
||||
margin-bottom: 1.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 2px solid #000;
|
||||
margin-bottom: var(--space-lg);
|
||||
padding-bottom: var(--space-md);
|
||||
border-bottom: var(--border-width-thin) solid var(--border-color);
|
||||
}
|
||||
|
||||
.comic-header h1 {
|
||||
color: #000;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.25rem;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-2xl);
|
||||
margin-bottom: var(--space-xs);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
}
|
||||
|
||||
.comic-date {
|
||||
color: #000;
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
|
||||
/* Comic Image */
|
||||
.comic-image {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
padding: 0.5rem;
|
||||
background: #fff;
|
||||
margin-bottom: var(--space-lg);
|
||||
padding: var(--space-sm);
|
||||
background: var(--color-background);
|
||||
}
|
||||
|
||||
.comic-image a {
|
||||
@@ -264,16 +340,16 @@ main {
|
||||
|
||||
/* Comic Navigation */
|
||||
.comic-navigation {
|
||||
border-top: 2px solid #000;
|
||||
padding-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
border-top: var(--border-width-thin) solid var(--border-color);
|
||||
padding-top: var(--space-md);
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.nav-buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: var(--space-sm);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -283,54 +359,80 @@ main {
|
||||
}
|
||||
|
||||
.btn-disabled {
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
border-color: #999;
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-disabled);
|
||||
border-color: var(--color-disabled);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-disabled:hover {
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-disabled);
|
||||
}
|
||||
|
||||
/* Icon-based navigation buttons */
|
||||
.btn-icon-nav {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
transition: opacity var(--transition-speed);
|
||||
}
|
||||
|
||||
.btn-icon-nav img {
|
||||
height: 2rem;
|
||||
width: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn-icon-nav:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.btn-icon-disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-icon-disabled:hover {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.comic-date-display {
|
||||
padding: 0 0.5rem;
|
||||
color: #000;
|
||||
padding: 0 var(--space-sm);
|
||||
color: var(--color-text);
|
||||
font-weight: bold;
|
||||
margin: 0 0.25rem;
|
||||
font-size: 0.85rem;
|
||||
margin: 0 var(--space-xs);
|
||||
font-size: var(--font-size-md);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Comic Transcript */
|
||||
.comic-transcript {
|
||||
border: 2px solid #000;
|
||||
padding: 1rem;
|
||||
margin-top: 1rem;
|
||||
border: var(--border-width-thin) solid var(--border-color);
|
||||
padding: var(--space-md);
|
||||
margin-top: var(--space-md);
|
||||
}
|
||||
|
||||
.comic-transcript h3 {
|
||||
color: #000;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--space-sm);
|
||||
text-transform: uppercase;
|
||||
font-size: 0.9rem;
|
||||
letter-spacing: 1px;
|
||||
font-size: var(--font-size-lg);
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
}
|
||||
|
||||
.comic-transcript p {
|
||||
color: #000;
|
||||
line-height: 1.6;
|
||||
font-size: 0.9rem;
|
||||
color: var(--color-text);
|
||||
line-height: var(--line-height-relaxed);
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
.comic-transcript ul,
|
||||
.comic-transcript ol {
|
||||
margin-left: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #000;
|
||||
line-height: 1.6;
|
||||
font-size: 0.9rem;
|
||||
margin-left: var(--space-lg);
|
||||
margin-bottom: var(--space-md);
|
||||
color: var(--color-text);
|
||||
line-height: var(--line-height-relaxed);
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
.comic-transcript li {
|
||||
@@ -339,36 +441,36 @@ main {
|
||||
|
||||
/* Archive Content */
|
||||
.archive-content {
|
||||
margin-top: 1rem;
|
||||
margin-top: var(--space-md);
|
||||
}
|
||||
|
||||
.archive-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 1rem;
|
||||
grid-template-columns: repeat(auto-fill, minmax(var(--archive-grid-min), 1fr));
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.archive-item {
|
||||
border: 2px solid #000;
|
||||
border: var(--border-width-thin) solid var(--border-color);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.archive-item:hover {
|
||||
background: #f0f0f0;
|
||||
background: var(--color-hover-bg);
|
||||
}
|
||||
|
||||
.archive-item a {
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
color: var(--color-text);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.archive-item img {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
height: var(--archive-thumbnail-height);
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
border-bottom: 2px solid #000;
|
||||
border-bottom: var(--border-width-thin) solid var(--border-color);
|
||||
}
|
||||
|
||||
.archive-info {
|
||||
@@ -376,59 +478,113 @@ main {
|
||||
}
|
||||
|
||||
.archive-info h3 {
|
||||
color: #000;
|
||||
font-size: 0.85rem;
|
||||
margin-bottom: 0.25rem;
|
||||
line-height: 1.3;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-md);
|
||||
margin-bottom: var(--space-xs);
|
||||
line-height: var(--line-height-tight);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.archive-date {
|
||||
color: #000;
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.nav-brand a {
|
||||
font-size: 1.2rem;
|
||||
font-size: var(--font-size-xl);
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
gap: 1rem;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.btn-nav {
|
||||
padding: 0.3rem 0.6rem;
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.btn-icon-nav img {
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
.comic-date-display {
|
||||
font-size: 0.7rem;
|
||||
font-size: var(--font-size-xs);
|
||||
flex-basis: 100%;
|
||||
text-align: center;
|
||||
padding-top: var(--space-xs);
|
||||
}
|
||||
|
||||
/* Keep icon navigation on single line on mobile */
|
||||
.nav-buttons:has(.btn-icon-nav) {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.nav-buttons:has(.btn-icon-nav) .comic-date-display {
|
||||
flex-basis: auto;
|
||||
padding-top: 0;
|
||||
font-size: var(--font-size-xs);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.nav-buttons {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.archive-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(var(--archive-grid-min-mobile), 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.comic-container {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
/* Compact footer mobile adjustments */
|
||||
footer.compact-footer .container {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-content {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-section {
|
||||
flex-direction: column;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-section::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
footer.compact-footer .social-links {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-bottom::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
border-top: 3px solid #000;
|
||||
padding: 2rem 0;
|
||||
margin-top: 3rem;
|
||||
border-top: var(--border-width-thick) solid var(--border-color);
|
||||
padding: var(--space-xl) 0;
|
||||
margin-top: var(--space-2xl);
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
gap: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
gap: var(--space-xl);
|
||||
margin-bottom: var(--space-xl);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -438,75 +594,96 @@ footer {
|
||||
}
|
||||
|
||||
.footer-section h3 {
|
||||
color: #000;
|
||||
font-size: 0.9rem;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-lg);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 1rem;
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.social-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.social-links a {
|
||||
color: #000;
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
font-size: 0.85rem;
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
|
||||
.social-links a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.social-icon {
|
||||
height: 1.5rem;
|
||||
width: auto;
|
||||
display: block;
|
||||
transition: opacity var(--transition-speed);
|
||||
}
|
||||
|
||||
.social-icon:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* Icon-only social links layout */
|
||||
.social-links-icons {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.social-links-icons a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.newsletter-form {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.newsletter-form input[type="email"] {
|
||||
flex: 1;
|
||||
padding: 0.5rem;
|
||||
border: 2px solid #000;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.85rem;
|
||||
padding: var(--space-sm);
|
||||
border: var(--border-width-thin) solid var(--border-color);
|
||||
font-family: var(--font-family);
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
|
||||
.newsletter-form button {
|
||||
padding: 0.5rem 1rem;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border: 2px solid #000;
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-background);
|
||||
border: var(--border-width-thin) solid var(--border-color);
|
||||
cursor: pointer;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.85rem;
|
||||
font-family: var(--font-family);
|
||||
font-size: var(--font-size-md);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.newsletter-form button:hover {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.newsletter-placeholder {
|
||||
font-size: 0.85rem;
|
||||
color: #666;
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.footer-bottom {
|
||||
text-align: center;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 2px solid #000;
|
||||
padding-top: var(--space-lg);
|
||||
border-top: var(--border-width-thin) solid var(--border-color);
|
||||
}
|
||||
|
||||
.footer-bottom p {
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size-md);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
letter-spacing: var(--letter-spacing-tight);
|
||||
}
|
||||
|
||||
/* Compact Footer Mode */
|
||||
@@ -520,13 +697,13 @@ footer.compact-footer .container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
gap: var(--space-md);
|
||||
margin-bottom: 0;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
@@ -536,26 +713,30 @@ footer.compact-footer .footer-section {
|
||||
min-width: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-section h3 {
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--font-size-sm);
|
||||
margin-bottom: 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
footer.compact-footer .social-links {
|
||||
flex-direction: row;
|
||||
gap: 0.5rem;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
footer.compact-footer .social-links-icons {
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
footer.compact-footer .social-links a {
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
footer.compact-footer .newsletter-placeholder {
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--font-size-sm);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -568,18 +749,18 @@ footer.compact-footer .footer-bottom {
|
||||
|
||||
footer.compact-footer .footer-bottom::before {
|
||||
content: '|';
|
||||
margin-right: 1rem;
|
||||
color: #666;
|
||||
margin-right: var(--space-md);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
footer.compact-footer .footer-bottom p {
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--font-size-sm);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Add separator between sections in compact mode */
|
||||
footer.compact-footer .footer-section:not(:last-child)::after {
|
||||
content: '|';
|
||||
margin-left: 1rem;
|
||||
color: #666;
|
||||
margin-left: var(--space-md);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
BIN
static/images/comics/comic-001-mobile.jpg
LFS
Normal file
BIN
static/images/comics/comic-001-mobile.jpg
LFS
Normal file
Binary file not shown.
BIN
static/images/footer.jpg
LFS
Normal file
BIN
static/images/footer.jpg
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/alert.png
LFS
Normal file
BIN
static/images/icons/alert.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/archive.png
LFS
Normal file
BIN
static/images/icons/archive.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/first.png
LFS
Normal file
BIN
static/images/icons/first.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/info.png
LFS
Normal file
BIN
static/images/icons/info.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/instagram.png
LFS
Normal file
BIN
static/images/icons/instagram.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/latest.png
LFS
Normal file
BIN
static/images/icons/latest.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/mail .png
LFS
Normal file
BIN
static/images/icons/mail .png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/next.png
LFS
Normal file
BIN
static/images/icons/next.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/previous.png
LFS
Normal file
BIN
static/images/icons/previous.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/rss.png
LFS
Normal file
BIN
static/images/icons/rss.png
LFS
Normal file
Binary file not shown.
BIN
static/images/icons/youtube.png
LFS
Normal file
BIN
static/images/icons/youtube.png
LFS
Normal file
Binary file not shown.
BIN
static/images/title.jpg
LFS
BIN
static/images/title.jpg
LFS
Binary file not shown.
BIN
static/images/title.png
LFS
Normal file
BIN
static/images/title.png
LFS
Normal file
Binary file not shown.
@@ -67,10 +67,7 @@
|
||||
|
||||
// Update image and its link
|
||||
const comicImageDiv = document.querySelector('.comic-image');
|
||||
const img = comicImageDiv.querySelector('img');
|
||||
img.src = `/static/images/comics/${comic.filename}`;
|
||||
img.alt = title;
|
||||
img.title = comic.alt_text;
|
||||
updateComicImage(comicImageDiv, comic, title);
|
||||
|
||||
// Update or create/remove the link wrapper
|
||||
updateComicImageLink(comic.number);
|
||||
@@ -82,11 +79,28 @@
|
||||
const container = document.querySelector('.comic-container');
|
||||
const newDiv = document.createElement('div');
|
||||
newDiv.className = 'comic-transcript';
|
||||
newDiv.innerHTML = '<h3>Author Note</h3><p></p>';
|
||||
newDiv.innerHTML = '<h3>Author Note</h3>';
|
||||
container.appendChild(newDiv);
|
||||
}
|
||||
document.querySelector('.comic-transcript p').textContent = comic.author_note;
|
||||
document.querySelector('.comic-transcript').style.display = 'block';
|
||||
|
||||
// Clear existing content after the h3
|
||||
const h3 = transcriptDiv.querySelector('h3');
|
||||
while (h3.nextSibling) {
|
||||
h3.nextSibling.remove();
|
||||
}
|
||||
|
||||
// Add content based on whether it's HTML or plain text
|
||||
if (comic.author_note_is_html) {
|
||||
const contentDiv = document.createElement('div');
|
||||
contentDiv.innerHTML = comic.author_note;
|
||||
transcriptDiv.appendChild(contentDiv);
|
||||
} else {
|
||||
const contentP = document.createElement('p');
|
||||
contentP.textContent = comic.author_note;
|
||||
transcriptDiv.appendChild(contentP);
|
||||
}
|
||||
|
||||
transcriptDiv.style.display = 'block';
|
||||
} else if (transcriptDiv) {
|
||||
transcriptDiv.style.display = 'none';
|
||||
}
|
||||
@@ -101,15 +115,47 @@
|
||||
history.pushState({ comicId: comic.number }, '', `/comic/${comic.number}`);
|
||||
}
|
||||
|
||||
// Update or create comic image with optional mobile version
|
||||
function updateComicImage(comicImageDiv, comic, title) {
|
||||
// Clear all existing content
|
||||
comicImageDiv.innerHTML = '';
|
||||
|
||||
// Create new image element(s)
|
||||
if (comic.mobile_filename) {
|
||||
// Create picture element with mobile source
|
||||
const picture = document.createElement('picture');
|
||||
|
||||
const source = document.createElement('source');
|
||||
source.media = '(max-width: 768px)';
|
||||
source.srcset = `/static/images/comics/${comic.mobile_filename}`;
|
||||
|
||||
const img = document.createElement('img');
|
||||
img.src = `/static/images/comics/${comic.filename}`;
|
||||
img.alt = title;
|
||||
img.title = comic.alt_text;
|
||||
|
||||
picture.appendChild(source);
|
||||
picture.appendChild(img);
|
||||
comicImageDiv.appendChild(picture);
|
||||
} else {
|
||||
// Create regular img element
|
||||
const img = document.createElement('img');
|
||||
img.src = `/static/images/comics/${comic.filename}`;
|
||||
img.alt = title;
|
||||
img.title = comic.alt_text;
|
||||
comicImageDiv.appendChild(img);
|
||||
}
|
||||
}
|
||||
|
||||
// Update comic image link for click navigation
|
||||
function updateComicImageLink(currentNumber) {
|
||||
const comicImageDiv = document.querySelector('.comic-image');
|
||||
const img = comicImageDiv.querySelector('img');
|
||||
const imgOrPicture = comicImageDiv.querySelector('picture') || comicImageDiv.querySelector('img');
|
||||
|
||||
// Remove existing link if present
|
||||
const existingLink = comicImageDiv.querySelector('a');
|
||||
if (existingLink) {
|
||||
existingLink.replaceWith(img);
|
||||
existingLink.replaceWith(imgOrPicture);
|
||||
}
|
||||
|
||||
// Add link if there's a next comic
|
||||
@@ -120,8 +166,8 @@
|
||||
e.preventDefault();
|
||||
loadComic(currentNumber + 1);
|
||||
};
|
||||
img.parentNode.insertBefore(link, img);
|
||||
link.appendChild(img);
|
||||
imgOrPicture.parentNode.insertBefore(link, imgOrPicture);
|
||||
link.appendChild(imgOrPicture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,23 +175,26 @@
|
||||
function updateNavButtons(currentNumber, formattedDate) {
|
||||
const navButtons = document.querySelector('.nav-buttons');
|
||||
|
||||
// Detect if using icon navigation
|
||||
const isIconNav = navButtons.children[0].classList.contains('btn-icon-nav');
|
||||
|
||||
// First button
|
||||
const firstBtn = navButtons.children[0];
|
||||
if (currentNumber > 1) {
|
||||
firstBtn.className = 'btn btn-nav';
|
||||
firstBtn.className = isIconNav ? 'btn-icon-nav' : 'btn btn-nav';
|
||||
firstBtn.onclick = (e) => { e.preventDefault(); loadComic(1); };
|
||||
} else {
|
||||
firstBtn.className = 'btn btn-nav btn-disabled';
|
||||
firstBtn.className = isIconNav ? 'btn-icon-nav btn-icon-disabled' : 'btn btn-nav btn-disabled';
|
||||
firstBtn.onclick = null;
|
||||
}
|
||||
|
||||
// Previous button
|
||||
const prevBtn = navButtons.children[1];
|
||||
if (currentNumber > 1) {
|
||||
prevBtn.className = 'btn btn-nav';
|
||||
prevBtn.className = isIconNav ? 'btn-icon-nav' : 'btn btn-nav';
|
||||
prevBtn.onclick = (e) => { e.preventDefault(); loadComic(currentNumber - 1); };
|
||||
} else {
|
||||
prevBtn.className = 'btn btn-nav btn-disabled';
|
||||
prevBtn.className = isIconNav ? 'btn-icon-nav btn-icon-disabled' : 'btn btn-nav btn-disabled';
|
||||
prevBtn.onclick = null;
|
||||
}
|
||||
|
||||
@@ -157,20 +206,20 @@
|
||||
// Next button
|
||||
const nextBtn = navButtons.children[3];
|
||||
if (currentNumber < totalComics) {
|
||||
nextBtn.className = 'btn btn-nav';
|
||||
nextBtn.className = isIconNav ? 'btn-icon-nav' : 'btn btn-nav';
|
||||
nextBtn.onclick = (e) => { e.preventDefault(); loadComic(currentNumber + 1); };
|
||||
} else {
|
||||
nextBtn.className = 'btn btn-nav btn-disabled';
|
||||
nextBtn.className = isIconNav ? 'btn-icon-nav btn-icon-disabled' : 'btn btn-nav btn-disabled';
|
||||
nextBtn.onclick = null;
|
||||
}
|
||||
|
||||
// Latest button
|
||||
const latestBtn = navButtons.children[4];
|
||||
if (currentNumber < totalComics) {
|
||||
latestBtn.className = 'btn btn-nav';
|
||||
latestBtn.className = isIconNav ? 'btn-icon-nav' : 'btn btn-nav';
|
||||
latestBtn.onclick = (e) => { e.preventDefault(); loadComic(totalComics); };
|
||||
} else {
|
||||
latestBtn.className = 'btn btn-nav btn-disabled';
|
||||
latestBtn.className = isIconNav ? 'btn-icon-nav btn-icon-disabled' : 'btn btn-nav btn-disabled';
|
||||
latestBtn.onclick = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,21 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul class="nav-links">
|
||||
<li><a href="{{ url_for('index') }}" {% if request.endpoint == 'index' %}class="active"{% endif %}>Latest</a></li>
|
||||
<li><a href="{{ url_for('archive') }}" {% if request.endpoint == 'archive' %}class="active"{% endif %}>Archive</a></li>
|
||||
<li><a href="{{ url_for('about') }}" {% if request.endpoint == 'about' %}class="active"{% endif %}>About</a></li>
|
||||
<li>
|
||||
<a href="{{ url_for('index') }}" {% if request.endpoint == 'index' %}class="active"{% endif %}>
|
||||
{% if use_header_nav_icons %}<img src="{{ url_for('static', filename='images/icons/alert.png') }}" alt="" class="nav-icon">{% endif %}Latest
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('archive') }}" {% if request.endpoint == 'archive' %}class="active"{% endif %}>
|
||||
{% if use_header_nav_icons %}<img src="{{ url_for('static', filename='images/icons/archive.png') }}" alt="" class="nav-icon">{% endif %}Archive
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('about') }}" {% if request.endpoint == 'about' %}class="active"{% endif %}>
|
||||
{% if use_header_nav_icons %}<img src="{{ url_for('static', filename='images/icons/info.png') }}" alt="" class="nav-icon">{% endif %}About
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -67,12 +79,41 @@
|
||||
<div class="footer-content">
|
||||
<div class="footer-section">
|
||||
<h3>Follow</h3>
|
||||
<div class="social-links">
|
||||
<!-- Uncomment and update with your social links -->
|
||||
<!-- <a href="https://twitter.com/yourhandle" target="_blank">Twitter</a> -->
|
||||
<!-- <a href="https://instagram.com/yourhandle" target="_blank">Instagram</a> -->
|
||||
<!-- <a href="https://mastodon.social/@yourhandle" target="_blank">Mastodon</a> -->
|
||||
<a href="{{ url_for('static', filename='feed.rss') }}">RSS Feed</a>
|
||||
<div class="social-links{% if use_footer_social_icons %} social-links-icons{% endif %}">
|
||||
{% if social_instagram %}
|
||||
<a href="{{ social_instagram }}" target="_blank" rel="noopener noreferrer" aria-label="Instagram">
|
||||
{% if use_footer_social_icons %}
|
||||
<img src="{{ url_for('static', filename='images/icons/instagram.png') }}" alt="Instagram" class="social-icon">
|
||||
{% else %}
|
||||
Instagram
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if social_youtube %}
|
||||
<a href="{{ social_youtube }}" target="_blank" rel="noopener noreferrer" aria-label="YouTube">
|
||||
{% if use_footer_social_icons %}
|
||||
<img src="{{ url_for('static', filename='images/icons/youtube.png') }}" alt="YouTube" class="social-icon">
|
||||
{% else %}
|
||||
YouTube
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if social_email %}
|
||||
<a href="{{ social_email }}" aria-label="Email">
|
||||
{% if use_footer_social_icons %}
|
||||
<img src="{{ url_for('static', filename='images/icons/mail .png') }}" alt="Email" class="social-icon">
|
||||
{% else %}
|
||||
Email
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('static', filename='feed.rss') }}" aria-label="RSS Feed">
|
||||
{% if use_footer_social_icons %}
|
||||
<img src="{{ url_for('static', filename='images/icons/rss.png') }}" alt="RSS" class="social-icon">
|
||||
{% else %}
|
||||
RSS Feed
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,6 +134,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>
|
||||
|
||||
@@ -16,35 +16,91 @@
|
||||
<div class="comic-image">
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}">
|
||||
{% if comic.mobile_filename %}
|
||||
<picture>
|
||||
<source media="(max-width: 768px)" srcset="{{ url_for('static', filename='images/comics/' + comic.mobile_filename) }}">
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
</picture>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
{% if comic.mobile_filename %}
|
||||
<picture>
|
||||
<source media="(max-width: 768px)" srcset="{{ url_for('static', filename='images/comics/' + comic.mobile_filename) }}">
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
</picture>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="comic-navigation">
|
||||
<div class="nav-buttons">
|
||||
{% if comic.number > 1 %}
|
||||
<a href="{{ url_for('comic', comic_id=1) }}" class="btn btn-nav">First</a>
|
||||
<a href="{{ url_for('comic', comic_id=comic.number - 1) }}" class="btn btn-nav">Previous</a>
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">First</span>
|
||||
<span class="btn btn-nav btn-disabled">Previous</span>
|
||||
{% endif %}
|
||||
{% if use_comic_nav_icons %}
|
||||
{# Icon-based navigation #}
|
||||
{% if comic.number > 1 %}
|
||||
<a href="{{ url_for('comic', comic_id=1) }}" class="btn-icon-nav" aria-label="First">
|
||||
<img src="{{ url_for('static', filename='images/icons/first.png') }}" alt="First">
|
||||
</a>
|
||||
<a href="{{ url_for('comic', comic_id=comic.number - 1) }}" class="btn-icon-nav" aria-label="Previous">
|
||||
<img src="{{ url_for('static', filename='images/icons/previous.png') }}" alt="Previous">
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="First">
|
||||
<img src="{{ url_for('static', filename='images/icons/first.png') }}" alt="First">
|
||||
</span>
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="Previous">
|
||||
<img src="{{ url_for('static', filename='images/icons/previous.png') }}" alt="Previous">
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="comic-date-display">{{ comic.formatted_date }}</span>
|
||||
<span class="comic-date-display">{{ comic.formatted_date }}</span>
|
||||
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}" class="btn btn-nav">Next</a>
|
||||
<a href="{{ url_for('comic', comic_id=total_comics) }}" class="btn btn-nav">Latest</a>
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}" class="btn-icon-nav" aria-label="Next">
|
||||
<img src="{{ url_for('static', filename='images/icons/next.png') }}" alt="Next">
|
||||
</a>
|
||||
<a href="{{ url_for('comic', comic_id=total_comics) }}" class="btn-icon-nav" aria-label="Latest">
|
||||
<img src="{{ url_for('static', filename='images/icons/latest.png') }}" alt="Latest">
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="Next">
|
||||
<img src="{{ url_for('static', filename='images/icons/next.png') }}" alt="Next">
|
||||
</span>
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="Latest">
|
||||
<img src="{{ url_for('static', filename='images/icons/latest.png') }}" alt="Latest">
|
||||
</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">Next</span>
|
||||
<span class="btn btn-nav btn-disabled">Latest</span>
|
||||
{# Text-based navigation #}
|
||||
{% if comic.number > 1 %}
|
||||
<a href="{{ url_for('comic', comic_id=1) }}" class="btn btn-nav">First</a>
|
||||
<a href="{{ url_for('comic', comic_id=comic.number - 1) }}" class="btn btn-nav">Previous</a>
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">First</span>
|
||||
<span class="btn btn-nav btn-disabled">Previous</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="comic-date-display">{{ comic.formatted_date }}</span>
|
||||
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}" class="btn btn-nav">Next</a>
|
||||
<a href="{{ url_for('comic', comic_id=total_comics) }}" class="btn btn-nav">Latest</a>
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">Next</span>
|
||||
<span class="btn btn-nav btn-disabled">Latest</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,29 +14,76 @@
|
||||
</div>
|
||||
|
||||
<div class="comic-image">
|
||||
{% if comic.mobile_filename %}
|
||||
<picture>
|
||||
<source media="(max-width: 768px)" srcset="{{ url_for('static', filename='images/comics/' + comic.mobile_filename) }}">
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
</picture>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
|
||||
alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
|
||||
title="{{ comic.alt_text }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="comic-navigation">
|
||||
<div class="nav-buttons">
|
||||
{% if comic.number > 1 %}
|
||||
<a href="{{ url_for('comic', comic_id=1) }}" class="btn btn-nav">First</a>
|
||||
<a href="{{ url_for('comic', comic_id=comic.number - 1) }}" class="btn btn-nav">Previous</a>
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">First</span>
|
||||
<span class="btn btn-nav btn-disabled">Previous</span>
|
||||
{% endif %}
|
||||
{% if use_comic_nav_icons %}
|
||||
{# Icon-based navigation #}
|
||||
{% if comic.number > 1 %}
|
||||
<a href="{{ url_for('comic', comic_id=1) }}" class="btn-icon-nav" aria-label="First">
|
||||
<img src="{{ url_for('static', filename='images/icons/first.png') }}" alt="First">
|
||||
</a>
|
||||
<a href="{{ url_for('comic', comic_id=comic.number - 1) }}" class="btn-icon-nav" aria-label="Previous">
|
||||
<img src="{{ url_for('static', filename='images/icons/previous.png') }}" alt="Previous">
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="First">
|
||||
<img src="{{ url_for('static', filename='images/icons/first.png') }}" alt="First">
|
||||
</span>
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="Previous">
|
||||
<img src="{{ url_for('static', filename='images/icons/previous.png') }}" alt="Previous">
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="comic-date-display">{{ comic.formatted_date }}</span>
|
||||
<span class="comic-date-display">{{ comic.formatted_date }}</span>
|
||||
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}" class="btn btn-nav">Next</a>
|
||||
<a href="{{ url_for('comic', comic_id=total_comics) }}" class="btn btn-nav">Latest</a>
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}" class="btn-icon-nav" aria-label="Next">
|
||||
<img src="{{ url_for('static', filename='images/icons/next.png') }}" alt="Next">
|
||||
</a>
|
||||
<a href="{{ url_for('comic', comic_id=total_comics) }}" class="btn-icon-nav" aria-label="Latest">
|
||||
<img src="{{ url_for('static', filename='images/icons/latest.png') }}" alt="Latest">
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="Next">
|
||||
<img src="{{ url_for('static', filename='images/icons/next.png') }}" alt="Next">
|
||||
</span>
|
||||
<span class="btn-icon-nav btn-icon-disabled" aria-label="Latest">
|
||||
<img src="{{ url_for('static', filename='images/icons/latest.png') }}" alt="Latest">
|
||||
</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">Next</span>
|
||||
<span class="btn btn-nav btn-disabled">Latest</span>
|
||||
{# Text-based navigation #}
|
||||
{% if comic.number > 1 %}
|
||||
<a href="{{ url_for('comic', comic_id=1) }}" class="btn btn-nav">First</a>
|
||||
<a href="{{ url_for('comic', comic_id=comic.number - 1) }}" class="btn btn-nav">Previous</a>
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">First</span>
|
||||
<span class="btn btn-nav btn-disabled">Previous</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="comic-date-display">{{ comic.formatted_date }}</span>
|
||||
|
||||
{% if comic.number < total_comics %}
|
||||
<a href="{{ url_for('comic', comic_id=comic.number + 1) }}" class="btn btn-nav">Next</a>
|
||||
<a href="{{ url_for('comic', comic_id=total_comics) }}" class="btn btn-nav">Latest</a>
|
||||
{% else %}
|
||||
<span class="btn btn-nav btn-disabled">Next</span>
|
||||
<span class="btn btn-nav btn-disabled">Latest</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user