Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
69 lines
2.4 KiB
HTML
69 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<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="#1A1A2E" />
|
|
<meta name="description" content="Find the nearest public shelter in Norway" />
|
|
<title>Tilfluktsrom</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="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
|
|
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
|
|
crossorigin="" />
|
|
<script type="module" crossorigin src="/assets/index-Db4vftzp.js"></script>
|
|
<link rel="stylesheet" crossorigin href="/assets/index-Cki23tZT.css">
|
|
<script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
<body>
|
|
<div id="app">
|
|
<!-- Status bar -->
|
|
<div id="status-bar">
|
|
<span id="status-text"></span>
|
|
<button id="refresh-btn" aria-label="Refresh data">↻</button>
|
|
</div>
|
|
|
|
<!-- Main content: map or compass -->
|
|
<div id="main-content">
|
|
<div id="map-container"></div>
|
|
<div id="compass-container">
|
|
<span id="compass-address"></span>
|
|
<span id="compass-distance"></span>
|
|
</div>
|
|
<!-- Toggle map/compass FAB -->
|
|
<button id="toggle-fab" aria-label="Toggle map/compass view">🧭</button>
|
|
<!-- Reset view button -->
|
|
<button id="reset-view-btn" aria-label="Reset view">⌖</button>
|
|
</div>
|
|
|
|
<!-- No-cache warning banner -->
|
|
<div id="no-cache-banner">
|
|
<span id="no-cache-text"></span>
|
|
<button id="cache-retry-btn"></button>
|
|
</div>
|
|
|
|
<!-- Bottom sheet with shelter info -->
|
|
<div id="bottom-sheet">
|
|
<div id="selected-shelter">
|
|
<canvas id="mini-arrow" width="96" height="96"></canvas>
|
|
<div id="selected-shelter-info">
|
|
<div id="selected-shelter-address"></div>
|
|
<div id="selected-shelter-details"></div>
|
|
</div>
|
|
</div>
|
|
<div id="shelter-list"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Loading overlay -->
|
|
<div id="loading-overlay">
|
|
<div id="loading-spinner"></div>
|
|
<div id="loading-text"></div>
|
|
<div id="loading-button-row">
|
|
<button id="loading-skip-btn"></button>
|
|
<button id="loading-ok-btn"></button>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|