shareable banner

This commit is contained in:
mi
2025-11-14 20:07:36 +10:00
parent 4a501757ed
commit 894a609329
6 changed files with 101 additions and 2 deletions

View File

@@ -105,6 +105,7 @@ Don't have a server? No problem! Here are beginner-friendly options to get your
- Markdown support for author notes and about page
- Optional icon-based navigation (comic navigation, header, and social links)
- Configurable logo and header/footer images
- Shareable banner button with embeddable HTML code
- Mobile-responsive with optional mobile-specific comic images
- Full-width and plain (headerless) display modes
- JSON API for programmatic access
@@ -290,6 +291,7 @@ LOGO_IMAGE = 'logo.png' # Path to logo (relative to static/ima
LOGO_MODE = 'beside' # 'beside' or 'replace' title with logo
HEADER_IMAGE = None # Optional header image path
FOOTER_IMAGE = None # Optional footer image path
BANNER_IMAGE = 'banner.jpg' # Shareable banner for "Link to Me" section
COMPACT_FOOTER = False # Display footer in compact mode
ARCHIVE_FULL_WIDTH = True # Full-width archive with 4 columns
USE_COMIC_NAV_ICONS = True # Use icons for comic navigation buttons
@@ -500,6 +502,28 @@ SOCIAL_YOUTUBE = 'https://youtube.com/@yourchannel'
SOCIAL_EMAIL = 'mailto:your@email.com'
```
### Shareable Banner
Sunday Comics includes an old-school shareable banner button in the footer that visitors can use to link back to your site. To enable it:
1. Create a banner image (any size) and save it in `static/images/`
2. Set the `BANNER_IMAGE` variable in `comics_data.py`:
```python
BANNER_IMAGE = 'banner.jpg' # Your banner filename
```
3. Set to `None` to hide the "Link to Me" section entirely:
```python
BANNER_IMAGE = None # Disables the shareable banner
```
When enabled, the banner appears in the footer with:
- A preview of the banner image
- A collapsible "Get code" section with copy-paste HTML
- Fully keyboard accessible (Tab to navigate, Space/Enter to expand)
- Automatic URL generation using your `SITE_URL` setting
Visitors can click "Get code" to reveal embeddable HTML they can paste on their own websites, creating a link back to your comic. Perfect for webrings, link exchanges, and building community!
## Navigation
Sunday Comics provides multiple ways for readers to navigate through your comic: