Files
LorenEteval_Furious/Furious/Data/maplibre/EndpointMap.html
T
2026-08-24 19:32:03 +08:00

140 lines
3.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta
http-equiv="Content-Security-Policy"
content="default-src 'none'; script-src 'self' qrc: blob:; style-src 'self' 'unsafe-inline'; connect-src https://tiles.openfreemap.org; img-src data: blob: https://tiles.openfreemap.org; font-src data: https://tiles.openfreemap.org; worker-src blob:; child-src blob:"
>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="maplibre-gl.css">
<style>
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: var(--endpoint-surface);
}
:root {
--endpoint-surface: #f8fafd;
--endpoint-border: #d9e1ec;
--endpoint-text: #172033;
--endpoint-text-muted: #5e6b80;
--endpoint-marker-halo: rgb(23 32 51 / 24%);
--endpoint-attribution-background: rgb(248 250 253 / 92%);
--endpoint-loading-background: rgb(248 250 253 / 86%);
--endpoint-font-family: sans-serif;
--endpoint-font-size: 11pt;
}
:root[data-theme="dark"] {
--endpoint-surface: #11161d;
--endpoint-border: #2a3340;
--endpoint-text: #e7ecf4;
--endpoint-text-muted: #9aa7b8;
--endpoint-marker-halo: rgb(255 255 255 / 24%);
--endpoint-attribution-background: rgb(17 22 29 / 92%);
--endpoint-loading-background: rgb(17 22 29 / 86%);
}
body, #map, #endpoint-loading-overlay {
border-radius: 6px;
}
#endpoint-loading-overlay {
position: absolute;
inset: 0;
z-index: 10;
display: none;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--endpoint-text);
background: var(--endpoint-loading-background);
cursor: wait;
font-family: var(--endpoint-font-family);
font-size: var(--endpoint-font-size);
font-weight: 400;
user-select: none;
}
#endpoint-loading-overlay[data-visible="true"] {
display: flex;
}
.endpoint-loading-spinner {
width: 16px;
height: 16px;
box-sizing: border-box;
border: 2px solid currentColor;
border-right-color: transparent;
border-radius: 50%;
animation: endpoint-spinner-rotation 0.8s linear infinite;
}
@keyframes endpoint-spinner-rotation {
to {
transform: rotate(360deg);
}
}
.endpoint-marker {
width: 18px;
height: 18px;
box-sizing: border-box;
border: 2px solid white;
border-radius: 50%;
background: var(--endpoint-accent, #0f7bff);
box-shadow:
0 0 0 2px var(--endpoint-marker-halo),
0 2px 6px rgb(0 0 0 / 34%);
}
.maplibregl-canvas:focus,
.maplibregl-canvas:focus-visible {
outline: none;
}
.maplibregl-ctrl-attrib.maplibregl-compact {
max-width: calc(100% - 20px);
color: var(--endpoint-text-muted) !important;
background-color: var(--endpoint-attribution-background) !important;
border: 1px solid var(--endpoint-border);
border-radius: 7px 0 0 0;
box-shadow: none;
font-family: var(--endpoint-font-family);
font-size: 10px;
}
.maplibregl-ctrl-attrib a {
color: inherit !important;
}
.maplibregl-ctrl-attrib.maplibregl-compact-show
.maplibregl-ctrl-attrib-button {
background-color: transparent !important;
}
:root[data-theme="dark"] .maplibregl-ctrl-attrib-button {
filter: invert(1) brightness(1.7);
}
</style>
<script src="qrc:///qtwebchannel/qwebchannel.js"></script>
<script src="maplibre-gl.js"></script>
</head>
<body>
<div id="map" aria-label="Approximate location map"></div>
<div
id="endpoint-loading-overlay"
data-visible="true"
aria-hidden="false"
>
<span class="endpoint-loading-spinner" aria-hidden="true"></span>
<span id="endpoint-loading-text"></span>
</div>
<script src="EndpointMap.js"></script>
</body>
</html>