move comics to their own directory

This commit is contained in:
mi
2025-11-07 16:57:10 +10:00
parent 52b98d4d5a
commit 5d357dad3f
5 changed files with 7 additions and 6 deletions

View File

@@ -39,7 +39,8 @@ sunday/
│ └── style.css # Main stylesheet │ └── style.css # Main stylesheet
├── js/ ├── js/
│ └── comic-nav.js # Client-side navigation │ └── comic-nav.js # Client-side navigation
├── images/ # Comic images ├── images/ # Image directory
│ ├── comics/ # Comic images
│ └── thumbs/ # Thumbnail images for archive │ └── thumbs/ # Thumbnail images for archive
└── feed.rss # RSS feed (generated) └── feed.rss # RSS feed (generated)
``` ```
@@ -103,7 +104,7 @@ python scripts/add_comic.py
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. Then edit `comics_data.py` to customize.
**Option 2: Manual** **Option 2: Manual**
1. Save your comic image in `static/images/` (e.g., `comic-001.png`) 1. Save your comic image in `static/images/comics/` (e.g., `comic-001.png`)
2. Optionally, create a thumbnail in `static/images/thumbs/` with the same filename 2. Optionally, create a thumbnail in `static/images/thumbs/` with the same filename
3. Add the comic entry to the `COMICS` list in `comics_data.py` 3. Add the comic entry to the `COMICS` list in `comics_data.py`

View File

@@ -59,7 +59,7 @@ def generate_rss():
pass pass
# Image enclosure # Image enclosure
image_url = f"{SITE_URL}/static/images/{comic['filename']}" image_url = f"{SITE_URL}/static/images/comics/{comic['filename']}"
SubElement(item, 'enclosure', url=image_url, type='image/png', length='0') SubElement(item, 'enclosure', url=image_url, type='image/png', length='0')
# Convert to pretty XML # Convert to pretty XML

View File

@@ -36,7 +36,7 @@
// Update image // Update image
const img = document.querySelector('.comic-image img'); const img = document.querySelector('.comic-image img');
img.src = `/static/images/${comic.filename}`; img.src = `/static/images/comics/${comic.filename}`;
img.alt = title; img.alt = title;
img.title = comic.alt_text; img.title = comic.alt_text;

View File

@@ -12,7 +12,7 @@
</div> </div>
<div class="comic-image"> <div class="comic-image">
<img src="{{ url_for('static', filename='images/' + comic.filename) }}" <img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
alt="{{ comic.title if comic.title else '#' ~ comic.number }}" alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
title="{{ comic.alt_text }}"> title="{{ comic.alt_text }}">
</div> </div>

View File

@@ -14,7 +14,7 @@
</div> </div>
<div class="comic-image"> <div class="comic-image">
<img src="{{ url_for('static', filename='images/' + comic.filename) }}" <img src="{{ url_for('static', filename='images/comics/' + comic.filename) }}"
alt="{{ comic.title if comic.title else '#' ~ comic.number }}" alt="{{ comic.title if comic.title else '#' ~ comic.number }}"
title="{{ comic.alt_text }}"> title="{{ comic.alt_text }}">
</div> </div>