diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-10-27 19:13:03 +0100 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-10-27 19:13:03 +0100 |
| commit | 2df51e89039b9b160aafb52b700e874411eb0555 (patch) | |
| tree | ffed8ff63fb39a422f7d14d1c6da3e8281997631 /crates/wipfel/www/index.html | |
| parent | 2d3cba97ff6ffbfe094ed0045329d875c6d1960b (diff) | |
wipfel: PWA — manifest, service worker, Web Share Target
- manifest.webmanifest: standalone, dark theme, mountain icons
(regular + maskable)
- sw.js: network-first with cache fallback -> full offline after first
visit (wasm + hill DB included); versioned cache, stale caches pruned
- share_target: images shared to the installed app are POSTed to
__share; the SW stashes the bytes at __shared and redirects with
?shared=1; the app picks them up on startup and cleans the URL
- index.html: manifest link, theme-color, icons, SW registration
- build/serve scripts ship the new files; dist refreshed
Note: sharing does not bypass AOSP GPS redaction when the share source
passes a MediaStore URI (the browser is still the reader) — the
.nomedia/rename trick remains the way to get GPS EXIF into a browser.
Diffstat (limited to 'crates/wipfel/www/index.html')
| -rw-r--r-- | crates/wipfel/www/index.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/wipfel/www/index.html b/crates/wipfel/www/index.html index 98f81e8..69dd433 100644 --- a/crates/wipfel/www/index.html +++ b/crates/wipfel/www/index.html @@ -3,7 +3,11 @@ <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> + <meta name="theme-color" content="#141418" /> <title>wipfel — web based gipfel photogrammetry</title> + <link rel="manifest" href="manifest.webmanifest" /> + <link rel="icon" type="image/png" sizes="192x192" href="icons/icon-192.png" /> + <link rel="apple-touch-icon" href="icons/icon-192.png" /> <link rel="stylesheet" href="style.css" /> </head> <body> @@ -11,5 +15,12 @@ import init from './wipfel.js'; init(); </script> + <script> + if ('serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('./sw.js'); + }); + } + </script> </body> </html> |
