feat: add PWA manifest and service worker routes with coverage

This commit is contained in:
Codex
2026-02-18 12:39:10 +00:00
parent 78d72cc4a9
commit 6ff259c0d0
4 changed files with 55 additions and 0 deletions

View File

@@ -16,12 +16,19 @@ function layout({ title, content }) {
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>${escapeHtml(title)}</title>
<meta name="theme-color" content="#1d232a" />
<link rel="manifest" href="/manifest.webmanifest" />
<link href="https://cdn.jsdelivr.net/npm/daisyui@5/dist/full.css" rel="stylesheet" type="text/css" />
</head>
<body class="min-h-screen bg-base-200">
<main class="max-w-md mx-auto p-4 space-y-4">
${content}
</main>
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js").catch(() => {});
}
</script>
</body>
</html>`;
}