PWA: manifest.json, Service Worker, Meta-Tags und README-Hinweis hinzugefügt

This commit is contained in:
2025-07-23 18:06:23 +02:00
parent 4c5371c07f
commit 9a57955902
4 changed files with 49 additions and 0 deletions

View File

@@ -20,6 +20,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" href="/static/style.css">
<link rel="manifest" href="/static/manifest.json">
<meta name="theme-color" content="#2563eb">
<script>
function setToday(id) {
const today = new Date().toISOString().split('T')[0];
@@ -36,6 +38,11 @@
document.addEventListener('DOMContentLoaded', function() {
openAccordion(parseInt("{{ active_idx|default(0) }}"));
});
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/static/service-worker.js');
});
}
</script>
</head>
<body>