Make the app installable (PWA metadata)

- manifest.webmanifest with name, standalone display, theme color
- PNG icons 192/512 + maskable variant + apple-touch-icon (from the
  Poké Ball favicon)
- minimal pass-through service worker (installability requirement)
- apple/mobile web app meta tags
This commit is contained in:
2026-07-28 21:30:32 +02:00
parent 458d2a1e55
commit c5378f6008
7 changed files with 62 additions and 0 deletions
+16
View File
@@ -26,6 +26,16 @@ if (themePreference === "Dark") {
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" href="/favicon.ico" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="theme-color" content="#ee1515" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="apple-mobile-web-app-title" content="PokeShare" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>PokeShare</title>
@@ -59,5 +69,11 @@ if (themePreference === "Dark") {
import "basecoat-css/tabs";
import "basecoat-css/dropdown-menu";
</script>
<script is:inline>
// Register the service worker so the browser offers "Install app"
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js");
}
</script>
</body>
</html>