diff --git a/CLAUDE.md b/CLAUDE.md index 27e31cd..47d347d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -258,9 +258,7 @@ Global configuration in `comics_data.py`: - `USE_FOOTER_SOCIAL_ICONS`: Set to True to use icons instead of text for footer social links (uses instagram.png, youtube.png, mail.png, alert.png) - `NEWSLETTER_ENABLED`: Set to True to show newsletter section in footer - `NEWSLETTER_HTML`: Custom HTML for newsletter form (user pastes their service's form code here) -- `SOCIAL_INSTAGRAM`: Instagram URL (set to None to hide) -- `SOCIAL_YOUTUBE`: YouTube URL (set to None to hide) -- `SOCIAL_EMAIL`: Email mailto link (set to None to hide) +- `SOCIAL_LINKS`: List of dicts for social media links. Each dict has 'label', 'url', and optional 'icon' (filename in static/images/icons/). Users can add any platform (Instagram, YouTube, Bluesky, Patreon, etc.) ### Markdown Support @@ -320,9 +318,7 @@ Global context variables injected into all templates: - `use_footer_social_icons`: Boolean for footer social link icons from `comics_data.py` - `newsletter_enabled`: Boolean to show/hide newsletter section from `comics_data.py` - `newsletter_html`: Custom HTML for newsletter form from `comics_data.py` (rendered with `| safe` filter) -- `social_instagram`: Instagram URL from `comics_data.py` -- `social_youtube`: YouTube URL from `comics_data.py` -- `social_email`: Email link from `comics_data.py` +- `social_links`: List of social media link dicts from `comics_data.py` (each with 'label', 'url', 'icon') ## Static Assets diff --git a/app.py b/app.py index 2c33188..223fa62 100644 --- a/app.py +++ b/app.py @@ -11,7 +11,7 @@ from comics_data import ( HEADER_IMAGE, FOOTER_IMAGE, BANNER_IMAGE, COMPACT_FOOTER, ARCHIVE_FULL_WIDTH, SECTIONS_ENABLED, USE_COMIC_NAV_ICONS, USE_HEADER_NAV_ICONS, USE_FOOTER_SOCIAL_ICONS, USE_SHARE_ICONS, NEWSLETTER_ENABLED, NEWSLETTER_HTML, - SOCIAL_INSTAGRAM, SOCIAL_YOUTUBE, SOCIAL_EMAIL, API_SPEC_LINK, EMBED_ENABLED, PERMALINK_ENABLED + SOCIAL_LINKS, API_SPEC_LINK, EMBED_ENABLED, PERMALINK_ENABLED ) import markdown from version import __version__ @@ -74,9 +74,7 @@ def inject_global_settings(): 'use_share_icons': USE_SHARE_ICONS, 'newsletter_enabled': NEWSLETTER_ENABLED, 'newsletter_html': NEWSLETTER_HTML, - 'social_instagram': SOCIAL_INSTAGRAM, - 'social_youtube': SOCIAL_YOUTUBE, - 'social_email': SOCIAL_EMAIL, + 'social_links': SOCIAL_LINKS, 'api_spec_link': API_SPEC_LINK, 'embed_enabled': EMBED_ENABLED, 'permalink_enabled': PERMALINK_ENABLED, diff --git a/comics_data.py b/comics_data.py index 0112fdc..a37a384 100644 --- a/comics_data.py +++ b/comics_data.py @@ -97,10 +97,19 @@ NEWSLETTER_ENABLED = False # ''' NEWSLETTER_HTML = '

Newsletter coming soon!

' -# 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' +# Social media links - add/remove/reorder as needed +# Each link should have 'label', 'url', and optionally 'icon' (filename in static/images/icons/) +# Set to empty list [] to show no social links +SOCIAL_LINKS = [ + # Example links (uncomment and customize): + # {'label': 'Instagram', 'url': 'https://instagram.com/yourhandle', 'icon': 'instagram.png'}, + # {'label': 'YouTube', 'url': 'https://youtube.com/@yourchannel', 'icon': 'youtube.png'}, + # {'label': 'Email', 'url': 'mailto:your@email.com', 'icon': 'mail.png'}, + # {'label': 'Bluesky', 'url': 'https://bsky.app/profile/yourhandle', 'icon': 'bluesky.png'}, + # {'label': 'Patreon', 'url': 'https://patreon.com/yourname', 'icon': 'patreon.png'}, + # {'label': 'Ko-fi', 'url': 'https://ko-fi.com/yourname', 'icon': 'kofi.png'}, + # {'label': 'Mastodon', 'url': 'https://mastodon.social/@yourhandle', 'icon': 'mastodon.png'}, +] # API documentation link - set to None to hide the link # Path is relative to static/ directory diff --git a/comics_data.py.example b/comics_data.py.example index 0112fdc..a37a384 100644 --- a/comics_data.py.example +++ b/comics_data.py.example @@ -97,10 +97,19 @@ NEWSLETTER_ENABLED = False # ''' NEWSLETTER_HTML = '

Newsletter coming soon!

' -# 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' +# Social media links - add/remove/reorder as needed +# Each link should have 'label', 'url', and optionally 'icon' (filename in static/images/icons/) +# Set to empty list [] to show no social links +SOCIAL_LINKS = [ + # Example links (uncomment and customize): + # {'label': 'Instagram', 'url': 'https://instagram.com/yourhandle', 'icon': 'instagram.png'}, + # {'label': 'YouTube', 'url': 'https://youtube.com/@yourchannel', 'icon': 'youtube.png'}, + # {'label': 'Email', 'url': 'mailto:your@email.com', 'icon': 'mail.png'}, + # {'label': 'Bluesky', 'url': 'https://bsky.app/profile/yourhandle', 'icon': 'bluesky.png'}, + # {'label': 'Patreon', 'url': 'https://patreon.com/yourname', 'icon': 'patreon.png'}, + # {'label': 'Ko-fi', 'url': 'https://ko-fi.com/yourname', 'icon': 'kofi.png'}, + # {'label': 'Mastodon', 'url': 'https://mastodon.social/@yourhandle', 'icon': 'mastodon.png'}, +] # API documentation link - set to None to hide the link # Path is relative to static/ directory diff --git a/templates/base.html b/templates/base.html index 8c9a689..1f5a1bc 100644 --- a/templates/base.html +++ b/templates/base.html @@ -103,33 +103,15 @@