Files
tavolo/web/index.html
woggioni 8c6ad10bf6 Make the frontend an installable PWA
Add a web app manifest and an install-only service worker (no offline
caching: live state always comes from the server and hashed asset names
change every build), registered from the WASM bundle. The worker must
live at the site root for its scope to cover the app, and Granian only
serves /static and /assets, so tavolo/static.py answers
/manifest.webmanifest and /sw.js from STATIC_DIR with the content types
browsers require; index.html gains the manifest link, icons, theme-color
and Apple standalone meta tags.

Icons are committed under web/assets/icons/ with vector sources and a
make-icons.sh regeneration script, mirroring the card art workflow.
2026-10-14 22:14:43 +00:00

32 lines
1.6 KiB
HTML

<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tavolo</title>
<!-- PWA: installable app shell. The manifest and the (install-only)
service worker are served from the site root, where the worker's
default scope covers the whole app; the Python host routes them in
production, trunk serve serves them in development. -->
<link rel="manifest" href="/manifest.webmanifest">
<meta name="theme-color" content="#14341f">
<link rel="icon" href="/assets/icons/icon.svg" type="image/svg+xml">
<link rel="icon" href="/assets/icons/icon-192.png" sizes="192x192" type="image/png">
<link rel="apple-touch-icon" href="/assets/icons/apple-touch-icon.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Tavolo">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link data-trunk rel="rust" href="Cargo.toml">
<link data-trunk rel="copy-file" href="manifest.webmanifest">
<link data-trunk rel="copy-file" href="sw.js">
<!-- Bootstrap 5.3.3 (MIT), vendored so builds work offline. -->
<link data-trunk rel="css" href="vendor/bootstrap.min.css">
<link data-trunk rel="css" href="theme.css">
<link data-trunk rel="css" href="style.css">
<!-- Card images (CC0 woodcut napoletane deck) and the PWA icons
(generated by make-icons.sh) copied verbatim into dist. -->
<link data-trunk rel="copy-dir" href="assets">
</head>
<body></body>
</html>