feat: add PWA support with offline caching

- Generate 192x192, 512x512 and Apple touch icons from favicon.svg
- Add web app manifest (manifest.json)
- Add service worker with network-first for HTML, cache-first for assets
- Register SW in BaseLayout
- Add theme-color meta and apple-touch-icon link
This commit is contained in:
emil
2026-05-10 21:06:19 +03:00
parent 56ab3f6952
commit 3750cd2cc6
6 changed files with 84 additions and 0 deletions
+8
View File
@@ -36,8 +36,16 @@ const ruUrl = `https://randify.pro${getRelativeLocaleUrl("ru", pathWithoutLocale
<link rel="alternate" hreflang="en" href={enUrl} />
<link rel="alternate" hreflang="ru" href={ruUrl} />
<meta name="verification" content="er9ndnv9ih7agmh8" />
<meta name="theme-color" content="#534AB7" />
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<title>{title}</title>
<Analytics />
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js");
}
</script>
</head>
<body class="bg-zinc-950 text-zinc-100 min-h-screen font-sans antialiased">
<LanguageSwitcher />