Publish Container / publish (push) Successful in 3m8s
Replaces the collapsed panel of look-alike cards with a guided view: an intro explaining what a record is (and that records are 'so far' with a 12-month coverage strip), cards grouped by theme with a plain explanation, date/time, how long ago, descriptors (gust/UV/rain intensity), today-vs-record and next-closest days, NEW badges for records set in the last 14 days, one month-by-month table with temperature-range and rain bars (latest 12, show all), and year / same-month tables only when there is more than a year of data. Removes duplicate cards and the redundant Monthly Summary panel. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
209 lines
16 KiB
CSS
209 lines
16 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); }
|
|
|
|
/* Per-chart controls */
|
|
.chart-ctl { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.74rem; color: var(--ink-light); }
|
|
.chart-ctl label { display: inline-flex; align-items: center; gap: 0.35rem; }
|
|
.chart-ctl select { font: inherit; font-size: 0.76rem; padding: 0.25rem 0.4rem; min-height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); }
|
|
@media (pointer: coarse) { .chart-ctl select { font-size: 16px; min-height: 40px; } }
|
|
.chart-card .chart-title { flex-wrap: wrap; row-gap: 0.4rem; }
|
|
|
|
/* Month / year record cards: the period is the headline */
|
|
.record-period { font-size: 0.92rem; font-weight: 800; color: var(--ink); letter-spacing: -0.005em; margin-top: 0.1rem; }
|
|
.rec-sub { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .75; }
|
|
.rec-cal td { vertical-align: top; line-height: 1.25; }
|
|
.rec-cal td b { display: block; font-variant-numeric: tabular-nums; }
|
|
.rec-yr { display: block; font-size: 0.68rem; color: var(--ink-light); font-weight: 600; white-space: nowrap; }
|
|
|
|
.rec-cal tr.empty { opacity: .4; }
|
|
|
|
/* Alert history: what / where / when */
|
|
.ah-what { font-size: 0.86rem; line-height: 1.4; }
|
|
.ah-meta { margin-top: 0.25rem; font-size: 0.74rem; color: var(--ink-light); line-height: 1.5; }
|
|
.ah-sev { display: inline-block; padding: 0 0.45rem; border-radius: 99px; font-weight: 700; font-size: 0.68rem; border: 1px solid var(--border); }
|
|
.ah-sev.sev-extreme { color: #ef4444; border-color: #ef4444; } .ah-sev.sev-severe { color: #f97316; border-color: #f97316; }
|
|
.ah-sev.sev-moderate { color: #eab308; border-color: #eab308; } .ah-sev.sev-minor { color: var(--cool); border-color: var(--cool); }
|
|
.ah-row { cursor: pointer; }
|
|
.ah-row.open td { background: color-mix(in srgb, var(--ui) 6%, transparent); }
|
|
.ah-full { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px dashed var(--border); font-size: 0.82rem; line-height: 1.5; cursor: default; }
|
|
.ah-full p { margin: 0 0 0.5rem; }
|
|
.ah-desc { white-space: pre-wrap; }
|
|
.ah-meaning { padding: 0.5rem 0.7rem; border-radius: 10px; background: color-mix(in srgb, var(--ui) 10%, transparent); }
|
|
.ah-note { font-size: 0.74rem; color: var(--ink-light); }
|
|
|
|
/* NWS overlay + card */
|
|
.nws-toggle.active { background: #7c5cff !important; border-color: #7c5cff !important; }
|
|
.nws-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #a78bfa; margin-left: 0.35rem; vertical-align: middle; }
|
|
.nws-card .kv b { font-size: 1.05rem; }
|
|
.nws-raw { display: block; margin-top: 0.4rem; font-size: 0.7rem; overflow-wrap: anywhere; color: var(--ink-light); background: var(--paper); border: 1px solid var(--border); border-radius: 8px; padding: 0.35rem 0.55rem; }
|
|
|
|
/* Performance on phones: blur only the two big fixed bars, lightly */
|
|
.logout, .range-btn, .refresh-btn, .chart-card, .stat, .today-bar { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
|
|
.header, .tabbar { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
|
|
|
|
/* ── Records tab (plain-language) ── */
|
|
.rec2 { max-width: 1100px; margin: 0 auto; }
|
|
.rec-intro { background: var(--paper-dark); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-top: 1rem; }
|
|
.rec-intro h2 { font-size: 1.15rem; margin-bottom: 0.45rem; }
|
|
.rec-intro p { font-size: 0.9rem; line-height: 1.55; color: var(--ink-mid); }
|
|
.rec-note { font-size: 0.8rem !important; color: var(--ink-light) !important; margin-top: 0.7rem; line-height: 1.5; }
|
|
.rec2 > .rec-note { margin: 0.9rem 0.2rem 0; }
|
|
.rc-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 0.85rem; }
|
|
.rc-months span { text-align: center; font-size: 0.68rem; font-weight: 600; padding: 0.3rem 0; border-radius: 6px; background: var(--paper-darker); color: var(--ink-light); opacity: 0.55; }
|
|
.rc-months span.on { background: var(--accent); color: #fff; opacity: 1; }
|
|
.rec-h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-light); margin: 1.6rem 0.2rem 0.6rem; }
|
|
.rec-sub2 { font-size: 0.85rem; line-height: 1.55; color: var(--ink-mid); margin: -0.2rem 0.2rem 0.7rem; }
|
|
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
|
|
.rc { background: var(--paper-dark); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.95rem 1.05rem; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
|
|
.rc-new { border-color: #d4a017; box-shadow: 0 0 0 1px #d4a01766; }
|
|
.rc-top { display: flex; align-items: center; gap: 0.5rem; }
|
|
.rc-ico { font-size: 1.15rem; line-height: 1; }
|
|
.rc-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mid); }
|
|
.rc-badge { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; padding: 0.12rem 0.4rem; border-radius: 999px; background: #d4a017; color: #1b1400; }
|
|
.rc-top .rc-badge { margin-left: auto; }
|
|
.rc-val { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.6rem; }
|
|
.rc-tag { font-size: 0.74rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--paper-darker); color: var(--ink-mid); }
|
|
.rc-when { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
|
|
.rc-when span { font-weight: 400; color: var(--ink-light); }
|
|
.rc-why { font-size: 0.8rem; line-height: 1.5; color: var(--ink-light); }
|
|
.rc-today, .rc-next { font-size: 0.78rem; color: var(--ink-mid); padding-top: 0.45rem; margin-top: 0.15rem; border-top: 1px dashed var(--border); }
|
|
.rc-next { border-top: none; padding-top: 0; margin-top: 0; color: var(--ink-light); }
|
|
.rc-next span { opacity: 0.8; }
|
|
.rec-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper-dark); border: 1px solid var(--border); border-radius: var(--radius); }
|
|
.rec-table2 { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
|
|
.rec-table2 th, .rec-table2 td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
|
|
.rec-table2 tr:last-child td { border-bottom: none; }
|
|
.rec-table2 th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-light); font-weight: 700; white-space: nowrap; }
|
|
.rec-table2 td { font-variant-numeric: tabular-nums; }
|
|
.rec-table2 td:first-child { min-width: 9.5rem; }
|
|
.rec-table2 .rec-yr { display: block; font-size: 0.72rem; color: var(--ink-light); font-weight: 400; margin-top: 0.15rem; }
|
|
.rec-chip { display: inline-block; margin: 0.25rem 0.3rem 0 0; font-size: 0.68rem; font-weight: 600; padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--paper-darker); color: var(--ink-mid); white-space: nowrap; }
|
|
.rec-rng, .rec-rain { min-width: 9rem; }
|
|
.rec-rng > span, .rec-rain > span { display: block; margin-bottom: 0.35rem; }
|
|
.rec-track { display: block; position: relative; height: 7px; border-radius: 99px; background: var(--paper-darker); }
|
|
.rec-track > i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--cool), var(--accent)); }
|
|
.rec-track.r > i { left: 0; background: var(--cool); }
|
|
@media (max-width: 640px) {
|
|
.rc-grid { grid-template-columns: 1fr; }
|
|
.rc-val { font-size: 1.7rem; }
|
|
.rec-table2 th, .rec-table2 td { padding: 0.6rem 0.65rem; }
|
|
}
|
|
|
|
.rec-extra[hidden] { display: none; }
|
|
.rec-more { display: block; margin: 0.7rem auto 0; min-height: 40px; padding: 0 1.1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--paper-dark); color: var(--ink); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
|