summaryrefslogtreecommitdiff
path: root/crates/wipfel/www/index.html
AgeCommit message (Collapse)Author
2026-10-30web: ship a Content-Security-Policy as meta tagJohannes Hofmann
Self-contained hardening, no server config required: default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; img-src 'self' blob: data:; connect-src 'self' blob: data:; style-src 'self' 'unsafe-inline' - script-src needs 'wasm-unsafe-eval' for WebAssembly compilation (the scoped exception; plain 'unsafe-eval' stays forbidden) and no inline script is allowed, so the module loader moved from an inline <script> to loader.js - style-src keeps 'unsafe-inline' because the Yew views position the find-peak popup and size the compass strip via style attributes - blob: in img-src/connect-src for createImageBitmap and blob reads; data: for inline assets Size budget note: unchanged (~550 KB gzipped total, well under the 1.5 MB plan budget).
2026-10-28web: follow system light/dark preferenceJohannes Hofmann
All colors moved into CSS custom properties on :root (dark default) with a prefers-color-scheme: light override block. The two canvas- drawn surfaces follow too: the viewport now clears transparent so the CSS canvas background shows through, and the compass strip reads its colors from the same variables via a new bridge::css_var helper. theme-color metas (dark + light variants) tint mobile browser chrome to match.
2026-10-27Revert "wipfel: PWA — manifest, service worker, Web Share Target"Johannes Hofmann
This reverts commit 2df51e89039b9b160aafb52b700e874411eb0555.
2026-10-27wipfel: PWA — manifest, service worker, Web Share TargetJohannes Hofmann
- 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.
2026-10-27web: keep browser from stealing the pinch gestureJohannes Hofmann
Firefox on Android may consume two-finger pinch for page zooming despite touch-action: none on the canvas. Disable page zooming via the viewport meta (maximum-scale=1, user-scalable=no) so the gesture reaches the app as pointer events; the app provides its own zoom. Also join touch pointers seen only via pointermove into the pointer table, so a swallowed second pointerdown cannot break pinch.
2026-10-27web: release build script producing a deployable static siteJohannes Hofmann
build-release.sh assembles dist/wipfel/ with the loader page, style, wasm bundle and the gzipped hill database. All runtime fetches are relative to the page URL, so the directory works under any path on any static server (verified from a subdirectory).