- One slate/blue palette across the app, dashboard, account/login pages (data colours stay orange = warm, blue = cool on the dashboard) - Slim sticky top bar with location chip, gear (settings) and ? (learn); 4-tab nav (Now, Station, Map, Alerts) with a thumb-reach bottom bar on phones - Hero sky gradient by condition/time with rain, storm, snow and star effects (respects reduced motion); keeps the searched city and badges when temps come from your station - One-line summary, 'Next 2 hours' bars and rain countdown from 15-minute precipitation, rain/cold-aware 'Bring' chips; yesterday + 'vs usual' context from the station - Scrubbable hourly chart (temp, rain chance, wind), 7-day range bars, AQI gauge, details tiles instead of drawers, taller radar with location marker + alert polygons - Skeleton loading instead of a full-screen spinner, sticky section headers, safe areas - Server: minutely_15 precipitation, public /api/station/summary Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
118 lines
8.6 KiB
CSS
118 lines
8.6 KiB
CSS
/* Dashboard UI layer: tabs, tiles, hero extras, cards, calendars */
|
|
:root { --header-h: 64px; --tabbar-h: 54px; --radius: 14px; }
|
|
|
|
/* ── Tabs ── */
|
|
.tabbar { position: sticky; top: var(--header-h); z-index: 9; display: flex; gap: 0.25rem; padding: 0.4rem calc(1rem + env(safe-area-inset-left)) 0.4rem calc(1rem + env(safe-area-inset-right));
|
|
background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
|
|
.tabbar::-webkit-scrollbar { display: none; }
|
|
.tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 40px; padding: 0 1rem; border: 1px solid transparent; border-radius: 999px;
|
|
background: transparent; color: var(--ink-light); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background .18s, color .18s, border-color .18s; touch-action: manipulation; }
|
|
.tab:hover { color: var(--ink); background: var(--paper-dark); }
|
|
.tab.active { background: var(--accent); color: #fff; }
|
|
.tab-ico { font-size: 0.95rem; line-height: 1; }
|
|
.tab-pane { display: none; animation: pane-in .28s cubic-bezier(.2,0,0,1); }
|
|
.tab-pane.active { display: block; }
|
|
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
|
@media (max-width: 640px) {
|
|
/* Thumb-reach bottom navigation, safe-area aware */
|
|
.tabbar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 20; border-top: 1px solid var(--border); border-bottom: none; justify-content: space-between;
|
|
padding: 0.35rem calc(0.5rem + env(safe-area-inset-right)) calc(0.35rem + env(safe-area-inset-bottom)) calc(0.5rem + env(safe-area-inset-left)); overflow: visible; background: color-mix(in srgb, var(--paper-dark) 92%, transparent); }
|
|
.tab { flex: 1 1 0; flex-direction: column; gap: 0.1rem; min-height: 50px; padding: 0 0.2rem; border-radius: 12px; font-size: 0.68rem; }
|
|
.tab-ico { font-size: 1.15rem; }
|
|
.page { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important; }
|
|
}
|
|
|
|
/* ── Unified tile language ── */
|
|
.section-card, .chart-card, .stat, .today-bar, .settings-panel, .ui-card { border-radius: var(--radius); }
|
|
.stat { position: relative; overflow: hidden; }
|
|
.delta { font-size: 0.72rem; margin-top: 0.3rem; color: var(--ink-light); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
.delta.up { color: var(--accent); } .delta.down { color: var(--cool); } .delta.flat { color: var(--ink-light); }
|
|
.hero-stat .delta, .hero-grid > div .delta { margin-top: 0.15rem; }
|
|
.hero-grid > div { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 0.65rem 0.8rem; }
|
|
|
|
/* ── Hero extras ── */
|
|
.hero-main { position: relative; isolation: isolate; }
|
|
.hero-main { padding-bottom: 3.4rem; }
|
|
.hero-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44px; opacity: 0.8; pointer-events: none; border-radius: 8px; }
|
|
.hero-hilo { display: flex; gap: 0.9rem; margin-top: 0.55rem; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
|
|
.hero-hilo .hi { color: var(--accent); font-weight: 700; } .hero-hilo .lo { color: var(--cool); font-weight: 700; }
|
|
|
|
/* ── Highlights ── */
|
|
.highlights { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
|
|
.highlights:empty { display: none; }
|
|
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
|
|
background: color-mix(in srgb, var(--accent) 12%, var(--paper-dark)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); }
|
|
.chip.cool { background: color-mix(in srgb, var(--cool) 12%, var(--paper-dark)); border-color: color-mix(in srgb, var(--cool) 45%, var(--border)); }
|
|
|
|
/* ── Cards & grids ── */
|
|
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
|
|
.two-col:empty { display: none; }
|
|
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
|
|
.ui-card { background: var(--paper-dark); border: 1px solid var(--border); padding: 1.1rem 1.2rem; }
|
|
.ui-card h3 { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-light); margin-bottom: 0.9rem; }
|
|
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.7rem 1rem; }
|
|
.kv b { display: block; font-size: 1.15rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
|
|
.kv span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-light); }
|
|
.kv small { display: block; font-size: 0.72rem; color: var(--ink-light); }
|
|
.sun-arc { width: 100%; height: 86px; display: block; margin-bottom: 0.7rem; }
|
|
.bar-meter { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 0.35rem; }
|
|
.bar-meter > i { display: block; height: 100%; background: var(--cool); border-radius: 99px; }
|
|
.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 99px; font-size: 0.72rem; font-weight: 700; background: var(--paper); border: 1px solid var(--border); }
|
|
.pill.ok { color: #3ca050; border-color: #3ca05088; } .pill.warn { color: var(--accent); border-color: var(--accent); }
|
|
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
|
|
.cmp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
|
|
.cmp-row:last-child { border-bottom: none; }
|
|
.cmp-row b { font-variant-numeric: tabular-nums; }
|
|
.note { font-size: 0.78rem; color: var(--ink-light); line-height: 1.45; }
|
|
.roses { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; text-align: center; }
|
|
.roses canvas { width: 100%; max-width: 170px; height: auto; aspect-ratio: 1; margin: 0 auto; display: block; }
|
|
.roses small { display: block; font-size: 0.72rem; color: var(--ink-light); margin-top: 0.2rem; }
|
|
.chart-card .chart-title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
|
|
.chart-reset { font: inherit; font-size: 0.68rem; text-transform: none; letter-spacing: 0; padding: 0.2rem 0.6rem; border-radius: 99px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); cursor: pointer; min-height: 28px; }
|
|
|
|
/* ── Wind compass ── */
|
|
.wind-wrap { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
|
|
.wind-wrap .stats { flex: 1 1 280px; }
|
|
#windCompass { flex: 0 0 auto; width: 116px; height: 116px; margin: 0 auto; }
|
|
|
|
/* ── Calendar ── */
|
|
.cal-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.8rem; }
|
|
.cal-months { display: grid; grid-auto-flow: column; grid-auto-columns: 14px; gap: 3px; font-size: 0.62rem; color: var(--ink-light); height: 1rem; }
|
|
.heatmap-cell { cursor: default; }
|
|
.heatmap-wrap { scrollbar-width: thin; }
|
|
.heatmap-cell.today { outline: 2px solid var(--ink); outline-offset: -1px; }
|
|
|
|
@media (max-width: 640px) {
|
|
.hero-spark { height: 40px; }
|
|
.hero-grid > div { padding: 0.55rem 0.65rem; }
|
|
.ui-card { padding: 0.9rem; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) { .tab-pane { animation: none; } }
|
|
|
|
/* ── Phone fit: never let canvases force the grid wider than the screen ── */
|
|
canvas.sparkline { max-width: 100%; }
|
|
.hero-grid > div, .stat, .ui-card, .chart-card { min-width: 0; }
|
|
@media (max-width: 640px) {
|
|
.hero-main { width: 100%; }
|
|
.hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.6rem !important; }
|
|
.hero-grid > div { padding: 0.55rem 0.65rem; }
|
|
.stats.secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
.wind-wrap { justify-content: center; }
|
|
.wind-wrap .stats { flex-basis: 100%; }
|
|
#windCompass { width: 132px; height: 132px; }
|
|
.section-card { padding-left: 1rem; padding-right: 1rem; }
|
|
}
|
|
@media (max-width: 640px) { .header { position: static; } }
|
|
|
|
/* Panels are always expanded now */
|
|
.settings-panel.always-open > summary { cursor: default; pointer-events: none; }
|
|
.settings-panel.always-open > summary::before { display: none; }
|
|
.settings-panel.always-open { margin-top: 1rem !important; }
|
|
|
|
/* ── Unified slate/blue chrome (data colours stay orange = warm, blue = cool) ── */
|
|
.tab.active, .range-btn.active, .always-open { --chrome: var(--ui); }
|
|
.tab.active, .range-btn.active { background: var(--ui) !important; border-color: var(--ui) !important; color: #fff; }
|
|
.tab:hover, .logout:hover { border-color: var(--ui); color: var(--ui); }
|
|
.chart-reset:hover { border-color: var(--ui); }
|
|
a { color: var(--ui); }
|