diff --git a/app.py b/app.py index e33982a..23a9f08 100644 --- a/app.py +++ b/app.py @@ -8,7 +8,7 @@ from flask import Flask, render_template, abort, jsonify, request from comics_data import ( 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, - USE_COMIC_NAV_ICONS, USE_HEADER_NAV_ICONS, USE_FOOTER_SOCIAL_ICONS, NEWSLETTER_ENABLED, + USE_COMIC_NAV_ICONS, USE_HEADER_NAV_ICONS, USE_FOOTER_SOCIAL_ICONS, USE_SHARE_ICONS, NEWSLETTER_ENABLED, SOCIAL_INSTAGRAM, SOCIAL_YOUTUBE, SOCIAL_EMAIL, API_SPEC_LINK, EMBED_ENABLED, PERMALINK_ENABLED ) import markdown @@ -45,6 +45,7 @@ def inject_global_settings(): 'use_comic_nav_icons': USE_COMIC_NAV_ICONS, 'use_header_nav_icons': USE_HEADER_NAV_ICONS, 'use_footer_social_icons': USE_FOOTER_SOCIAL_ICONS, + 'use_share_icons': USE_SHARE_ICONS, 'newsletter_enabled': NEWSLETTER_ENABLED, 'social_instagram': SOCIAL_INSTAGRAM, 'social_youtube': SOCIAL_YOUTUBE, diff --git a/comics_data.py b/comics_data.py index 6551396..343b272 100644 --- a/comics_data.py +++ b/comics_data.py @@ -73,6 +73,10 @@ USE_HEADER_NAV_ICONS = True # Uses instagram.png, youtube.png, and mail.png from static/images/icons/ USE_FOOTER_SOCIAL_ICONS = True +# Global setting: Set to True to show icons in share buttons (permalink and embed) +# Uses link.png for permalink and embed.png for embed from static/images/icons/ +USE_SHARE_ICONS = True + # Global setting: Set to True to show newsletter section in footer NEWSLETTER_ENABLED = False @@ -87,11 +91,11 @@ API_SPEC_LINK = None # Set to 'openapi.yml' to enable # Global setting: Set to True to enable comic embed functionality # When enabled, users can get embed codes to display comics on other websites -EMBED_ENABLED = False +EMBED_ENABLED = True # Global setting: Set to True to enable permalink copy button # When enabled, users can easily copy a direct link to the current comic -PERMALINK_ENABLED = False +PERMALINK_ENABLED = True COMICS = [ { diff --git a/static/css/style.css b/static/css/style.css index 053baf2..8df2f53 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1134,6 +1134,23 @@ footer.compact-footer .footer-section:not(:last-child)::after { outline-offset: 2px; } +/* Share button icons */ +.btn-with-icon { + display: inline-flex; + align-items: center; + gap: var(--space-sm); +} + +.btn-with-icon .btn-icon { + width: 16px; + height: 16px; + flex-shrink: 0; +} + +.btn-permalink.copied .btn-icon { + filter: invert(1); +} + /* Modal overlay */ .modal { display: none; /* Hidden by default */ diff --git a/static/images/icons/embed.png b/static/images/icons/embed.png new file mode 100644 index 0000000..70f6fed --- /dev/null +++ b/static/images/icons/embed.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2326899dd08ed57b474f1068762a11513d91ae7c2af8ad30ecad820171759ad +size 1447 diff --git a/static/images/icons/link.png b/static/images/icons/link.png new file mode 100644 index 0000000..a555523 --- /dev/null +++ b/static/images/icons/link.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a768f95d705f18964e4d35d5d756ed82866eaaa02b962add037daa503794a0a +size 1313 diff --git a/templates/comic.html b/templates/comic.html index cfb2b56..a2331e2 100644 --- a/templates/comic.html +++ b/templates/comic.html @@ -134,10 +134,14 @@ {% if embed_enabled or permalink_enabled %}
{% if permalink_enabled %} - + {% endif %} {% if embed_enabled %} - + {% endif %}
{% endif %} diff --git a/templates/index.html b/templates/index.html index ff366b0..71ed2af 100644 --- a/templates/index.html +++ b/templates/index.html @@ -94,10 +94,14 @@ {% if embed_enabled or permalink_enabled %}
{% if permalink_enabled %} - + {% endif %} {% if embed_enabled %} - + {% endif %}
{% endif %}