kort/kort 8/kort7_fixed_v2.html

139 lines
3.8 KiB
HTML

<!doctype html>
<html lang="da">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Vehicle stream demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<style>
html, body { height: 100%; margin: 0; }
body { font-family: system-ui, sans-serif; }
#map { height: 100%; }
.hud {
position: absolute;
top: 10px;
left: 10px;
z-index: 1000;
background: rgba(255,255,255,0.95);
padding: 10px 12px;
border-radius: 8px;
border: 1px solid #ccc;
font: 13px/1.35 system-ui, sans-serif;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
min-width: 220px;
}
.hud button { margin-right: 8px; padding: 6px 10px; cursor: pointer; }
.hud .status { margin-top: 8px; white-space: pre-line; }
.hud .alerts { margin-top: 8px; display: grid; gap: 6px; max-width: 320px; }
.alert-item {
padding: 8px 10px;
border-radius: 8px;
border: 1px solid #e0b100;
background: rgba(255,248,204,0.96);
color: #5f4b00;
font: 12px/1.35 system-ui,sans-serif;
}
.alert-item strong { display:block; margin-bottom:2px; }
.offscreen-panel {
position: absolute;
right: 10px;
top: 10px;
z-index: 1000;
width: 320px;
max-width: calc(100vw - 20px);
display: grid;
gap: 8px;
pointer-events: none;
}
.offscreen-panel.hidden { display: none; }
.offscreen-header {
background: rgba(18, 24, 38, 0.92);
color: white;
border-radius: 10px;
padding: 10px 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.18);
pointer-events: auto;
}
.offscreen-header h3 { margin: 0 0 4px 0; font-size: 14px; }
.offscreen-header p { margin: 0; font-size: 12px; opacity: 0.9; }
.offscreen-list { display: grid; gap: 8px; }
.offscreen-card {
background: rgba(255,255,255,0.96);
border: 1px solid #d7dce5;
border-left: 6px solid var(--accent, #2979ff);
border-radius: 10px;
padding: 10px 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.10);
pointer-events: auto;
}
.offscreen-card .title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 6px;
}
.offscreen-card .name { font-weight: 700; font-size: 14px; }
.offscreen-card .badge {
font-size: 11px;
padding: 2px 8px;
border-radius: 999px;
background: #eef3ff;
color: #244a9a;
white-space: nowrap;
}
.offscreen-card .meta {
display: grid;
grid-template-columns: auto 1fr;
gap: 4px 8px;
font-size: 12px;
color: #28303d;
}
.offscreen-card .meta .k { color: #5c6778; }
.car {
width: 24px;
height: 24px;
transform-origin: 12px 12px;
will-change: transform;
filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.car svg { display: block; width: 24px; height: 24px; }
</style>
</head>
<body>
<div id="map"></div>
<div class="hud">
<div>
<button id="playBtn">Play</button>
<button id="pauseBtn">Pause</button>
<button id="resetBtn">Reset</button>
</div>
<div class="status" id="status"></div>
<div class="alerts" id="presenceAlerts"></div>
</div>
<aside id="offscreenPanel" class="offscreen-panel hidden" aria-live="polite">
<div class="offscreen-header">
<h3>Biler udenfor kortet</h3>
<p>Viser kun biler hvor centrum er udenfor, men usikkerheden overlapper det viste område.</p>
</div>
<div id="offscreenList" class="offscreen-list"></div>
</aside>
<script src="data.js"></script>
<script src="app_fixed_v2.js"></script>
</body>
</html>