comic embed

This commit is contained in:
mi
2025-11-15 16:55:51 +10:00
parent 418ba6e4ba
commit 4ec1feb2a9
7 changed files with 291 additions and 3 deletions

View File

@@ -37,7 +37,7 @@
<link rel="alternate" type="application/rss+xml" title="{{ comic_name }} RSS Feed" href="{{ url_for('static', filename='feed.rss') }}">
{% block extra_css %}{% endblock %}
</head>
<body>
<body data-site-url="{{ site_url }}">
<!-- Skip to main content link for keyboard navigation -->
<a href="#main-content" class="skip-to-main">Skip to main content</a>
@@ -185,7 +185,28 @@
</div>
{% endif %}
<!-- Embed Code Modal -->
{% if embed_enabled %}
<div id="embed-modal" class="modal" role="dialog" aria-labelledby="embed-modal-title" aria-hidden="true">
<div class="modal-content">
<div class="modal-header">
<h2 id="embed-modal-title">Embed This Comic</h2>
<button class="modal-close" aria-label="Close embed modal">&times;</button>
</div>
<div class="modal-body">
<p>Copy this code to embed the comic on your website:</p>
<textarea id="embed-code" readonly onfocus="this.select()" onclick="this.select()" aria-label="Embed code"></textarea>
<button id="copy-embed-code" class="btn-copy" aria-label="Copy embed code to clipboard">Copy Code</button>
<p class="embed-preview-link">Preview: <a id="embed-preview-link" href="#" target="_blank" rel="noopener noreferrer">Open embed in new window</a></p>
</div>
</div>
</div>
{% endif %}
<script src="{{ url_for('static', filename='js/comic-nav.js') }}"></script>
{% if embed_enabled %}
<script src="{{ url_for('static', filename='js/embed.js') }}"></script>
{% endif %}
{% block extra_js %}{% endblock %}
</body>
</html>

View File

@@ -131,6 +131,12 @@
</div>
</div>
{% if embed_enabled %}
<div class="comic-embed-section">
<button class="btn-embed" id="embed-button" data-comic-number="{{ comic.number }}" aria-label="Get embed code for this comic">Share/Embed</button>
</div>
{% endif %}
{% if comic.author_note %}
<div class="comic-transcript">
<h3>Author Note</h3>

View File

@@ -91,6 +91,12 @@
</div>
</div>
{% if embed_enabled %}
<div class="comic-embed-section">
<button class="btn-embed" id="embed-button" data-comic-number="{{ comic.number }}" aria-label="Get embed code for this comic">Share/Embed</button>
</div>
{% endif %}
{% if comic.author_note %}
<div class="comic-transcript">
<h3>Author Note</h3>