Compare commits

..

3 Commits

Author SHA1 Message Date
mi
254f71b713 📝 credit to Boots and Her Buddies 2025-11-07 17:02:26 +10:00
mi
3c79745842 🍱 example comics 2025-11-07 17:00:42 +10:00
mi
9b47ef89e3 move comics to their own directory 2025-11-07 16:57:10 +10:00
9 changed files with 11 additions and 9 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`
@@ -265,6 +266,7 @@ The app exposes a JSON API for programmatic access:
## Credits ## Credits
- Favicon generated using [favicon.io](https://favicon.io) - Favicon generated using [favicon.io](https://favicon.io)
- Example comics sourced from Boots and Her Buddies comic strip at [Comic Book Plus](https://comicbookplus.com/?cid=2561)
## License ## License

View File

@@ -5,21 +5,21 @@ COMICS = [
{ {
'number': 1, 'number': 1,
'title': 'First Comic', 'title': 'First Comic',
'filename': 'comic-001.png', 'filename': 'comic-001.jpg',
'date': '2025-01-01', 'date': '2025-01-01',
'alt_text': 'The very first comic', 'alt_text': 'The very first comic',
'author_note': 'This is where your comic journey begins!' 'author_note': 'This is where your comic journey begins!'
}, },
{ {
'number': 2, 'number': 2,
'filename': 'comic-002.png', 'filename': 'comic-002.jpg',
'date': '2025-01-08', 'date': '2025-01-08',
'alt_text': 'The second comic', 'alt_text': 'The second comic',
}, },
{ {
'number': 3, 'number': 3,
'title': 'Third Comic', 'title': 'Third Comic',
'filename': 'comic-003.png', 'filename': 'comic-003.jpg',
'date': '2025-01-15', 'date': '2025-01-15',
'alt_text': 'The third comic', 'alt_text': 'The third comic',
'author_note': 'Things are getting interesting!' 'author_note': 'Things are getting interesting!'

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

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>