fix: delete issues, ePub reader (JSZip, linear cover, fonts), Pico dialog, UI polish
- Add POST /issues/<id>/delete route with file cleanup - Fix ePub reader: add JSZip dependency, make cover linear in spine, inject system fonts into rendition - Replace browser confirm() with Pico CSS dialog component - Fix dashboard button sizing and consistency - Add favicon, override Pico font stack to suppress Firefox warnings - Compact issue action buttons Made-with: Cursor
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}PI Weekly{% endblock %} — Plymouth Independent</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📰</text></svg>">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
@@ -36,6 +37,48 @@
|
||||
<footer class="container">
|
||||
<small>PI Weekly Newspaper Generator</small>
|
||||
</footer>
|
||||
<dialog id="confirm-dialog">
|
||||
<article>
|
||||
<header>
|
||||
<button aria-label="Close" rel="prev" onclick="closeConfirm()"></button>
|
||||
<p><strong id="confirm-title">Confirm</strong></p>
|
||||
</header>
|
||||
<p id="confirm-message"></p>
|
||||
<footer>
|
||||
<button class="secondary" onclick="closeConfirm()">Cancel</button>
|
||||
<button id="confirm-ok" onclick="submitConfirm()">Confirm</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
<script>
|
||||
let _confirmTarget = null;
|
||||
function confirmAction(message, formOrEl, title) {
|
||||
_confirmTarget = formOrEl;
|
||||
document.getElementById('confirm-title').textContent = title || 'Confirm';
|
||||
document.getElementById('confirm-message').textContent = message;
|
||||
const btn = document.getElementById('confirm-ok');
|
||||
btn.className = '';
|
||||
if (formOrEl.dataset.confirmDanger) {
|
||||
btn.className = 'btn-danger-fill';
|
||||
}
|
||||
const dialog = document.getElementById('confirm-dialog');
|
||||
document.documentElement.classList.add('modal-is-open', 'modal-is-opening');
|
||||
dialog.showModal();
|
||||
setTimeout(() => document.documentElement.classList.remove('modal-is-opening'), 200);
|
||||
}
|
||||
function closeConfirm() {
|
||||
const dialog = document.getElementById('confirm-dialog');
|
||||
document.documentElement.classList.add('modal-is-closing');
|
||||
setTimeout(() => {
|
||||
dialog.close();
|
||||
document.documentElement.classList.remove('modal-is-open', 'modal-is-closing');
|
||||
_confirmTarget = null;
|
||||
}, 200);
|
||||
}
|
||||
function submitConfirm() {
|
||||
if (_confirmTarget) _confirmTarget.submit();
|
||||
}
|
||||
</script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user