🔧 toggle newsletter
This commit is contained in:
@@ -61,6 +61,7 @@ Global configuration in `comics_data.py`:
|
|||||||
- `USE_COMIC_NAV_ICONS`: Set to True to use icon images for comic navigation buttons instead of text (requires icons in `static/images/icons/`)
|
- `USE_COMIC_NAV_ICONS`: Set to True to use icon images for comic navigation buttons instead of text (requires icons in `static/images/icons/`)
|
||||||
- `USE_HEADER_NAV_ICONS`: Set to True to display icons next to main header navigation text (uses alert.png, archive.png, info.png)
|
- `USE_HEADER_NAV_ICONS`: Set to True to display icons next to main header navigation text (uses alert.png, archive.png, info.png)
|
||||||
- `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)
|
- `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
|
||||||
- `SOCIAL_INSTAGRAM`: Instagram URL (set to None to hide)
|
- `SOCIAL_INSTAGRAM`: Instagram URL (set to None to hide)
|
||||||
- `SOCIAL_YOUTUBE`: YouTube 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_EMAIL`: Email mailto link (set to None to hide)
|
||||||
@@ -121,6 +122,7 @@ Global context variables injected into all templates:
|
|||||||
- `use_comic_nav_icons`: Boolean for comic navigation icons from `comics_data.py`
|
- `use_comic_nav_icons`: Boolean for comic navigation icons from `comics_data.py`
|
||||||
- `use_header_nav_icons`: Boolean for main header navigation icons from `comics_data.py`
|
- `use_header_nav_icons`: Boolean for main header navigation icons from `comics_data.py`
|
||||||
- `use_footer_social_icons`: Boolean for footer social link icons from `comics_data.py`
|
- `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`
|
||||||
- `social_instagram`: Instagram URL from `comics_data.py`
|
- `social_instagram`: Instagram URL from `comics_data.py`
|
||||||
- `social_youtube`: YouTube URL from `comics_data.py`
|
- `social_youtube`: YouTube URL from `comics_data.py`
|
||||||
- `social_email`: Email link from `comics_data.py`
|
- `social_email`: Email link from `comics_data.py`
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ ARCHIVE_FULL_WIDTH = True # Full-width archive with 4 columns
|
|||||||
USE_COMIC_NAV_ICONS = True # Use icons for comic navigation buttons
|
USE_COMIC_NAV_ICONS = True # Use icons for comic navigation buttons
|
||||||
USE_HEADER_NAV_ICONS = True # Show icons in main header navigation
|
USE_HEADER_NAV_ICONS = True # Show icons in main header navigation
|
||||||
USE_FOOTER_SOCIAL_ICONS = True # Use icons for social links
|
USE_FOOTER_SOCIAL_ICONS = True # Use icons for social links
|
||||||
|
NEWSLETTER_ENABLED = False # Show newsletter section in footer
|
||||||
SOCIAL_INSTAGRAM = None # Instagram URL (or None)
|
SOCIAL_INSTAGRAM = None # Instagram URL (or None)
|
||||||
SOCIAL_YOUTUBE = None # YouTube URL (or None)
|
SOCIAL_YOUTUBE = None # YouTube URL (or None)
|
||||||
SOCIAL_EMAIL = None # Email mailto link (or None)
|
SOCIAL_EMAIL = None # Email mailto link (or None)
|
||||||
|
|||||||
5
app.py
5
app.py
@@ -8,8 +8,8 @@ from flask import Flask, render_template, abort, jsonify, request
|
|||||||
from comics_data import (
|
from comics_data import (
|
||||||
COMICS, COMIC_NAME, COPYRIGHT_NAME, SITE_URL, FULL_WIDTH_DEFAULT, PLAIN_DEFAULT, LOGO_IMAGE, LOGO_MODE,
|
COMICS, COMIC_NAME, COPYRIGHT_NAME, SITE_URL, FULL_WIDTH_DEFAULT, PLAIN_DEFAULT, LOGO_IMAGE, LOGO_MODE,
|
||||||
HEADER_IMAGE, FOOTER_IMAGE, BANNER_IMAGE, COMPACT_FOOTER, ARCHIVE_FULL_WIDTH, SECTIONS_ENABLED,
|
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, SOCIAL_INSTAGRAM,
|
USE_COMIC_NAV_ICONS, USE_HEADER_NAV_ICONS, USE_FOOTER_SOCIAL_ICONS, NEWSLETTER_ENABLED,
|
||||||
SOCIAL_YOUTUBE, SOCIAL_EMAIL, API_SPEC_LINK
|
SOCIAL_INSTAGRAM, SOCIAL_YOUTUBE, SOCIAL_EMAIL, API_SPEC_LINK
|
||||||
)
|
)
|
||||||
import markdown
|
import markdown
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ def inject_global_settings():
|
|||||||
'use_comic_nav_icons': USE_COMIC_NAV_ICONS,
|
'use_comic_nav_icons': USE_COMIC_NAV_ICONS,
|
||||||
'use_header_nav_icons': USE_HEADER_NAV_ICONS,
|
'use_header_nav_icons': USE_HEADER_NAV_ICONS,
|
||||||
'use_footer_social_icons': USE_FOOTER_SOCIAL_ICONS,
|
'use_footer_social_icons': USE_FOOTER_SOCIAL_ICONS,
|
||||||
|
'newsletter_enabled': NEWSLETTER_ENABLED,
|
||||||
'social_instagram': SOCIAL_INSTAGRAM,
|
'social_instagram': SOCIAL_INSTAGRAM,
|
||||||
'social_youtube': SOCIAL_YOUTUBE,
|
'social_youtube': SOCIAL_YOUTUBE,
|
||||||
'social_email': SOCIAL_EMAIL,
|
'social_email': SOCIAL_EMAIL,
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ USE_HEADER_NAV_ICONS = True
|
|||||||
# Uses instagram.png, youtube.png, and mail.png from static/images/icons/
|
# Uses instagram.png, youtube.png, and mail.png from static/images/icons/
|
||||||
USE_FOOTER_SOCIAL_ICONS = True
|
USE_FOOTER_SOCIAL_ICONS = True
|
||||||
|
|
||||||
|
# Global setting: Set to True to show newsletter section in footer
|
||||||
|
NEWSLETTER_ENABLED = False
|
||||||
|
|
||||||
# Social media links - set to None to hide the link
|
# Social media links - set to None to hide the link
|
||||||
SOCIAL_INSTAGRAM = None # e.g., 'https://instagram.com/yourhandle'
|
SOCIAL_INSTAGRAM = None # e.g., 'https://instagram.com/yourhandle'
|
||||||
SOCIAL_YOUTUBE = None # e.g., 'https://youtube.com/@yourchannel'
|
SOCIAL_YOUTUBE = None # e.g., 'https://youtube.com/@yourchannel'
|
||||||
|
|||||||
@@ -132,6 +132,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if newsletter_enabled %}
|
||||||
<div class="footer-section">
|
<div class="footer-section">
|
||||||
<h3>Newsletter</h3>
|
<h3>Newsletter</h3>
|
||||||
<!-- Replace with your newsletter service form -->
|
<!-- Replace with your newsletter service form -->
|
||||||
@@ -141,6 +142,7 @@
|
|||||||
</form> -->
|
</form> -->
|
||||||
<p class="newsletter-placeholder">Newsletter coming soon!</p>
|
<p class="newsletter-placeholder">Newsletter coming soon!</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if banner_image and not compact_footer %}
|
{% if banner_image and not compact_footer %}
|
||||||
<div class="footer-section">
|
<div class="footer-section">
|
||||||
|
|||||||
Reference in New Issue
Block a user