5bdea62a9f
Wire up a production service worker and web app manifest with install metadata and icon assets. Bump project version to 2.1.0 and register the worker from the main page for offline-ready behavior. Made-with: Cursor
50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
---
|
|
import "../styles/index.css";
|
|
import BscScoreApp from "../components/BscScoreApp.astro";
|
|
import App from "../components/App";
|
|
---
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content">
|
|
<title>BSC Score - Pool Scoring App</title>
|
|
<meta name="description" content="Professional pool/billiards scoring application for tournaments and casual games">
|
|
|
|
<!-- Performance optimizations -->
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
|
<!-- PWA Meta tags -->
|
|
<meta name="theme-color" content="#1a1a1a">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<link rel="manifest" href="/manifest.webmanifest">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
<link rel="icon" type="image/png" sizes="192x192" href="/icon-192.png">
|
|
<link rel="icon" type="image/png" sizes="512x512" href="/icon-512.png">
|
|
<link rel="apple-touch-icon" href="/icon-192.png">
|
|
</head>
|
|
|
|
<body>
|
|
<BscScoreApp>
|
|
<!--
|
|
Using client:only for the main app since it's highly interactive
|
|
and benefits from full client-side rendering
|
|
-->
|
|
<App client:only="preact" slot="app-content" />
|
|
</BscScoreApp>
|
|
<script>
|
|
if (typeof window !== 'undefined' && 'serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/sw.js').catch((error) => {
|
|
console.error('Service worker registration failed:', error);
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |