Upgrade maps to MapLibre GL JS; compact header; move search to settings
- Replace Leaflet with MapLibre GL JS v4.7.1 across all map instances - CARTO dark/light and Esri satellite raster basemaps (no API key) - All overlays (hurricane, wildfire, SPC, wind arrows) ported to GeoJSON sources/layers - AQI, alert, temp, sun/moon markers via maplibregl.Marker with custom HTML - Radar animation pre-loads all frames on load for smoother playback - Compact loc-header: tighter padding and font sizes, all info preserved - Search bar moved from header to Settings tab under Location section - Service worker bumped to weather-v7 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1863f6784b
commit
a25864d9ed
6 files changed
+1732
-343
No files matched your search
+373
-26
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
:root:not([data-theme="light"]) {
|
||||
--ink: #ece7dc;
|
||||
--ink-mid: #d2c8b1;
|
||||
--ink-light: #beb399;
|
||||
@@ -37,6 +37,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] {
|
||||
--ink: #ece7dc;
|
||||
--ink-mid: #d2c8b1;
|
||||
--ink-light: #beb399;
|
||||
--paper: #191510;
|
||||
--paper-dark: #201c16;
|
||||
--paper-darker: #2b2620;
|
||||
--border: #3a342a;
|
||||
--accent: #e07848;
|
||||
--cool: #5ab0d8;
|
||||
}
|
||||
|
||||
html, body {
|
||||
min-height: 100%;
|
||||
background: var(--paper);
|
||||
@@ -293,7 +305,32 @@ a:hover { text-decoration: underline; }
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.leaflet-tooltip.map-label {
|
||||
.map-location-dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #e07848;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.map-labeled-marker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.map-dot {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.map-dot-label {
|
||||
background: rgba(20, 18, 14, 0.9);
|
||||
border: 1px solid rgba(255, 255, 255, 0.22);
|
||||
color: #fff;
|
||||
@@ -305,10 +342,7 @@ a:hover { text-decoration: underline; }
|
||||
letter-spacing: 0.01em;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.leaflet-tooltip.map-label:before {
|
||||
border-top-color: rgba(20, 18, 14, 0.9);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.data-label {
|
||||
@@ -359,6 +393,7 @@ a:hover { text-decoration: underline; }
|
||||
padding: 0.55rem;
|
||||
box-shadow: var(--surface-shadow);
|
||||
}
|
||||
.settings-search { margin-bottom: 1rem; }
|
||||
|
||||
.search-row { display: flex; }
|
||||
|
||||
@@ -969,19 +1004,19 @@ a:hover { text-decoration: underline; }
|
||||
.loc-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 1.5rem;
|
||||
align-items: center;
|
||||
margin-bottom: 0.75rem;
|
||||
border: var(--surface-border);
|
||||
border-radius: var(--surface-radius-lg);
|
||||
background: var(--card-bg-soft);
|
||||
padding: 0.9rem 1rem;
|
||||
padding: 0.45rem 0.8rem;
|
||||
}
|
||||
|
||||
.loc-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; line-height: 1.1; }
|
||||
.loc-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; line-height: 1.1; }
|
||||
.loc-name { color: var(--card-ink); }
|
||||
.loc-sub { font-size: 0.8rem; color: var(--card-sub); letter-spacing: 0.06em; margin-top: 0.2rem; text-transform: uppercase; }
|
||||
.loc-time { font-size: 0.8rem; color: var(--card-sub); text-align: right; letter-spacing: 0.04em; line-height: 1.5; }
|
||||
.loc-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
|
||||
.loc-sub { font-size: 0.72rem; color: var(--card-sub); letter-spacing: 0.06em; margin-top: 0.1rem; text-transform: uppercase; }
|
||||
.loc-time { font-size: 0.72rem; color: var(--card-sub); text-align: right; letter-spacing: 0.03em; white-space: nowrap; }
|
||||
.loc-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
|
||||
|
||||
/* ── HERO ── */
|
||||
.hero {
|
||||
@@ -1805,14 +1840,31 @@ details[open] .drawer-chevron { transform: rotate(90deg); }
|
||||
/* iOS momentum scrolling */
|
||||
.hourly-scroll { -webkit-overflow-scrolling: touch; }
|
||||
|
||||
/* ── Leaflet overrides ── */
|
||||
.leaflet-container { background: #1a1f2e; }
|
||||
.leaflet-tile { transition: opacity 0.24s linear; }
|
||||
.leaflet-control-zoom a {
|
||||
background: var(--paper-dark) !important;
|
||||
/* ── MapLibre overrides ── */
|
||||
.maplibregl-map { background: #1a1f2e; }
|
||||
.maplibregl-ctrl-zoom-in,
|
||||
.maplibregl-ctrl-zoom-out,
|
||||
.maplibregl-ctrl-compass {
|
||||
background-color: var(--paper-dark) !important;
|
||||
color: var(--ink) !important;
|
||||
border-color: var(--border) !important;
|
||||
}
|
||||
.maplibregl-ctrl-group {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.4);
|
||||
}
|
||||
.maplibregl-ctrl button:not(:disabled) span {
|
||||
filter: invert(0.8);
|
||||
}
|
||||
.maplibregl-popup-content {
|
||||
background: var(--paper-dark);
|
||||
color: var(--ink);
|
||||
border-radius: 8px;
|
||||
font-size: 0.85rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.35);
|
||||
}
|
||||
.maplibregl-popup-tip { border-top-color: var(--paper-dark); }
|
||||
|
||||
/* ── Mobile Bottom Navigation ── */
|
||||
.bottom-nav {
|
||||
@@ -1925,15 +1977,13 @@ details[open] .drawer-chevron { transform: rotate(90deg); }
|
||||
#units-btn { min-width: 56px; }
|
||||
|
||||
.loc-header {
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
.loc-name { font-size: 2rem; }
|
||||
.loc-sub { font-size: 0.88rem; }
|
||||
.loc-actions { align-items: center; margin-top: 0; }
|
||||
.loc-time { text-align: center; font-size: 0.88rem; }
|
||||
.loc-name { font-size: 1.5rem; }
|
||||
.loc-sub { font-size: 0.8rem; }
|
||||
.loc-actions { align-items: flex-end; margin-top: 0; }
|
||||
.loc-time { text-align: right; font-size: 0.8rem; }
|
||||
|
||||
.hero { grid-template-columns: 1fr; text-align: center; }
|
||||
.hero-left { align-items: center; }
|
||||
@@ -2066,3 +2116,300 @@ details[open] .drawer-chevron { transform: rotate(90deg); }
|
||||
}
|
||||
}
|
||||
|
||||
/* ── ntfy / Settings additions ────────────────────────────────────────── */
|
||||
.settings-section-title {
|
||||
font-size: 0.65rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--ink-mid);
|
||||
padding: 0.25rem 0.25rem 0;
|
||||
}
|
||||
|
||||
.settings-row--block {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.55rem;
|
||||
}
|
||||
|
||||
.settings-row-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.settings-input {
|
||||
width: 100%;
|
||||
background: var(--paper-darker);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
color: var(--ink);
|
||||
font-family: var(--mono);
|
||||
font-size: 0.78rem;
|
||||
padding: 0.45rem 0.6rem;
|
||||
outline: none;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
|
||||
.settings-input:focus { border-color: var(--accent); }
|
||||
.settings-input::placeholder { color: var(--ink-mid); opacity: 0.7; }
|
||||
|
||||
.settings-help {
|
||||
font-size: 0.68rem;
|
||||
color: var(--ink-mid);
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-help a { color: var(--accent); text-decoration: none; }
|
||||
.settings-help a:hover { text-decoration: underline; }
|
||||
.settings-input--short { width: 6rem; }
|
||||
|
||||
/* ── Wind drawer peek (shows summary when collapsed) ────────────────────── */
|
||||
.wind-drawer-peek {
|
||||
font-size: 0.72rem;
|
||||
color: var(--ink-mid);
|
||||
font-weight: 400;
|
||||
margin-left: 0.4rem;
|
||||
}
|
||||
|
||||
/* ── Forecast Discussion drawer ──────────────────────────────────────────── */
|
||||
.discussion-drawer { margin-top: 1.5rem; }
|
||||
|
||||
.discussion-office {
|
||||
font-size: 0.65rem;
|
||||
color: var(--ink-mid);
|
||||
margin-left: 0.5rem;
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.discussion-meta {
|
||||
font-size: 0.68rem;
|
||||
color: var(--ink-mid);
|
||||
margin: 0 0 0.75rem;
|
||||
}
|
||||
|
||||
.discussion-text {
|
||||
font-family: 'Courier New', 'Consolas', monospace;
|
||||
font-size: 0.72rem;
|
||||
line-height: 1.55;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
color: var(--ink);
|
||||
background: var(--paper-darker);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--surface-radius-sm);
|
||||
padding: 0.75rem 1rem;
|
||||
max-height: 55vh;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ── Offline banner ─────────────────────────────────────────────────────── */
|
||||
.offline-banner {
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0;
|
||||
background: #b91c1c;
|
||||
color: #fff;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding: 0.4rem 1rem;
|
||||
z-index: 9999;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
.offline-banner.hidden { display: none; }
|
||||
|
||||
/* ── Pull-to-refresh indicator ──────────────────────────────────────────── */
|
||||
.ptr-indicator {
|
||||
position: fixed;
|
||||
top: 0; left: 50%;
|
||||
transform: translateX(-50%) translateY(-100%);
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
padding: 0.35rem 1rem;
|
||||
border-radius: 0 0 12px 12px;
|
||||
z-index: 9998;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
.ptr-indicator.visible { transform: translateX(-50%) translateY(0); }
|
||||
.ptr-indicator.hidden { display: none; }
|
||||
|
||||
/* ── Alert badge ─────────────────────────────────────────────────────────── */
|
||||
.tab[data-tab="alerts"],
|
||||
.bottom-tab[data-tab="alerts"] { position: relative; }
|
||||
|
||||
.alert-badge {
|
||||
position: absolute;
|
||||
top: 2px; right: 2px;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
font-size: 0.6rem;
|
||||
font-weight: 700;
|
||||
padding: 1px 5px;
|
||||
min-width: 16px;
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
.alert-badge.hidden { display: none; }
|
||||
|
||||
/* ── Precip chart (hidden — bars now inline in hourly cells) ─────────────── */
|
||||
.precip-chart-wrap { display: none; }
|
||||
|
||||
/* ── Inline hourly precip bar ─────────────────────────────────────────────── */
|
||||
.hour-bar-wrap {
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.hour-bar {
|
||||
width: 60%;
|
||||
min-height: 2px;
|
||||
border-radius: 2px 2px 0 0;
|
||||
transition: height 0.2s ease;
|
||||
}
|
||||
|
||||
/* ── Hurricane tracking panel ────────────────────────────────────────────── */
|
||||
.hurricane-panel { margin-bottom: 1rem; }
|
||||
|
||||
.hurricane-panel:empty { display: none; }
|
||||
|
||||
.hurricane-storm-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--surface-radius-md);
|
||||
padding: 0.75rem 1rem;
|
||||
margin-bottom: 0.6rem;
|
||||
box-shadow: var(--surface-shadow);
|
||||
}
|
||||
|
||||
.hurricane-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.hurricane-name {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.hurricane-cat-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
}
|
||||
.cat-td { background: #2196f3; }
|
||||
.cat-ts { background: #9c27b0; }
|
||||
.cat-1 { background: #ff9800; }
|
||||
.cat-2 { background: #f44336; }
|
||||
.cat-3 { background: #b71c1c; }
|
||||
.cat-4 { background: #7b1fa2; }
|
||||
.cat-5 { background: #1a237e; }
|
||||
|
||||
.hurricane-stats {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4rem 1.2rem;
|
||||
font-size: 0.78rem;
|
||||
color: var(--ink-light);
|
||||
}
|
||||
|
||||
/* ── Animated current condition icon ─────────────────────────────────────── */
|
||||
@keyframes icon-spin { to { transform: rotate(360deg); } }
|
||||
@keyframes icon-drip { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
|
||||
@keyframes icon-fall { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(5px) rotate(5deg); } }
|
||||
@keyframes icon-flash { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
|
||||
@keyframes icon-sway { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
|
||||
|
||||
#cur-icon[data-wmo-group="clear"] { animation: icon-spin 20s linear infinite; display: inline-block; }
|
||||
#cur-icon[data-wmo-group="cloud"] { animation: icon-sway 4s ease-in-out infinite; display: inline-block; }
|
||||
#cur-icon[data-wmo-group="rain"] { animation: icon-drip 1.2s ease-in-out infinite; display: inline-block; }
|
||||
#cur-icon[data-wmo-group="snow"] { animation: icon-fall 1.5s ease-in-out infinite; display: inline-block; }
|
||||
#cur-icon[data-wmo-group="storm"] { animation: icon-flash 0.8s ease-in-out infinite; display: inline-block; }
|
||||
|
||||
/* ── Theme toggle buttons ─────────────────────────────────────────────────── */
|
||||
.theme-toggle-group {
|
||||
display: flex;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.theme-btn {
|
||||
background: var(--paper-darker);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
color: var(--ink);
|
||||
font-size: 0.75rem;
|
||||
padding: 0.3rem 0.65rem;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s;
|
||||
}
|
||||
.theme-btn:hover { border-color: var(--accent); }
|
||||
.theme-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
|
||||
|
||||
/* ── Saved mini weather cards ────────────────────────────────────────────── */
|
||||
.saved-cards {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.saved-mini-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--surface-radius-md);
|
||||
padding: 0.5rem 0.75rem;
|
||||
cursor: pointer;
|
||||
min-width: 100px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
position: relative;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
.saved-mini-card:hover { border-color: var(--accent); }
|
||||
|
||||
.mini-city-name {
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 90px;
|
||||
}
|
||||
|
||||
.mini-weather-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.mini-remove {
|
||||
position: absolute;
|
||||
top: 3px; right: 5px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--ink-light);
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.mini-remove:hover { color: var(--accent); }
|
||||
|
||||
Reference in new issue
Block a user