diff --git a/public/index.html b/public/index.html index 1cb1a4ae..bf458707 100644 --- a/public/index.html +++ b/public/index.html @@ -20,7 +20,7 @@ - + - + diff --git a/public/live.js b/public/live.js index 75d51421..a4564cf7 100644 --- a/public/live.js +++ b/public/live.js @@ -640,7 +640,12 @@ zoomAnimation: true, markerZoomAnimation: true }).setView([37.45, -122.0], 9); - L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', { maxZoom: 19 }).addTo(map); + const isDark = document.documentElement.getAttribute('data-theme') === 'dark' || + (document.documentElement.getAttribute('data-theme') !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches); + const tileUrl = isDark + ? 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png' + : 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png'; + L.tileLayer(tileUrl, { maxZoom: 19 }).addTo(map); L.control.zoom({ position: 'topright' }).addTo(map); nodesLayer = L.layerGroup().addTo(map); diff --git a/public/style.css b/public/style.css index f3c9d633..7cd7f91b 100644 --- a/public/style.css +++ b/public/style.css @@ -925,7 +925,7 @@ button.ch-item.selected { background: var(--selected-bg); } .nav-fav-dropdown { display: none; position: absolute; top: 100%; right: 0; z-index: 1000; min-width: 260px; max-height: 360px; overflow-y: auto; - background: var(--surface); border: 1px solid var(--border); border-radius: 8px; + background: var(--surface-1, var(--detail-bg)); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); margin-top: 6px; } .nav-fav-dropdown.open { display: block; }