Files
maptool/views/layout.erb
T

34 lines
1.5 KiB
ERB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MapTool</title>
<%# Installable as an app (PWA) — mainly so Android's share sheet offers
MapTool as a target for GPX/FIT files, see public/sw.js. %>
<link rel="manifest" href="/manifest.webmanifest">
<meta name="theme-color" content="#1a1a1a">
<link rel="icon" href="/icons/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/icons/icon-192.png">
<link rel="stylesheet" href="/vendor/maplibre-gl/maplibre-gl.css?v=<%= ASSET_VERSION %>">
<link rel="stylesheet" href="/css/style.css?v=<%= ASSET_VERSION %>">
</head>
<body>
<%= yield %>
<script>
// Caches radar tile images (see public/sw.js) so the last-seen frames
// stay visible once the network is actually gone. Silently a no-op
// where it can't register — insecure-context LAN access without a
// reverse proxy in front, for instance — same as radar caching simply
// not working there; nothing else on the page depends on this.
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js").catch(() => {});
}
</script>
<script src="/vendor/pmtiles/pmtiles.js?v=<%= ASSET_VERSION %>"></script>
<script src="/vendor/maplibre-contour/maplibre-contour.min.js?v=<%= ASSET_VERSION %>"></script>
<%= erb :importmap, layout: false %>
<script type="module" src="/js/map.js?v=<%= ASSET_VERSION %>"></script>
</body>
</html>