- New Station tab (top tabs, bottom nav, swipe order) carrying the old /conditions look: radar-ring hero, condition pill, wind compass, atmosphere/precip/solar cards, indoor - Scoped sl-* styles and station-live.js; units follow the app's metric/imperial setting - Empty/error states when no station is connected - /conditions now 301-redirects to /?tab=station; removed conditions.html, /api/conditions/public and the old My Station drawer - /api/ambient-config also returns the station name - Dashboard and settings links updated; SW cache v8; manifest shortcut for Station - Drops an indoor-temp block in applyStationOverlay that referenced an out-of-scope helper Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
78 lines
6.7 KiB
CSS
78 lines
6.7 KiB
CSS
/* Station tab — the former /conditions page look, scoped so it can't touch the rest of the app */
|
|
.sl {
|
|
--sl-bg: #edf2f7; --sl-surface: #ffffff; --sl-card: #f4f7fb; --sl-border: #ccd6e2;
|
|
--sl-text: #0d1b2a; --sl-muted: #5a7089; --sl-accent: #2563eb;
|
|
--sl-dot: rgba(37,99,235,0.065); --sl-live: #16a34a; --sl-north: #dc2626;
|
|
font-family: 'Barlow', system-ui, sans-serif; color: var(--sl-text);
|
|
max-width: 720px; margin: 0 auto; padding: 0.25rem 0 2.5rem;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) .sl {
|
|
--sl-bg: #070c14; --sl-surface: #0d1720; --sl-card: #101c29; --sl-border: #192e44;
|
|
--sl-text: #dce6f0; --sl-muted: #6f8aa3; --sl-accent: #60a5fa;
|
|
--sl-dot: rgba(96,165,250,0.07); --sl-live: #4ade80; --sl-north: #f87171;
|
|
}
|
|
}
|
|
:root[data-theme="dark"] .sl {
|
|
--sl-bg: #070c14; --sl-surface: #0d1720; --sl-card: #101c29; --sl-border: #192e44;
|
|
--sl-text: #dce6f0; --sl-muted: #6f8aa3; --sl-accent: #60a5fa;
|
|
--sl-dot: rgba(96,165,250,0.07); --sl-live: #4ade80; --sl-north: #f87171;
|
|
}
|
|
.sl *, .sl *::before, .sl *::after { box-sizing: border-box; }
|
|
|
|
/* Status bar */
|
|
.sl-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 1rem; margin-bottom: 0.9rem;
|
|
background: var(--sl-surface); border: 1px solid var(--sl-border); border-radius: 14px; }
|
|
.sl-name { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sl-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sl-live { display: flex; align-items: center; gap: 0.45rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sl-live); white-space: nowrap; }
|
|
.sl-live.stale { color: var(--sl-muted); }
|
|
.sl-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: sl-pulse 2.4s ease-in-out infinite; }
|
|
.sl-live.stale .sl-dot { animation: none; opacity: .5; }
|
|
@keyframes sl-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
|
|
.sl-time { font-size: 0.78rem; color: var(--sl-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
|
|
/* Hero */
|
|
.sl-hero { position: relative; background: var(--sl-surface); padding: 3rem 1.25rem 2.75rem; text-align: center; overflow: hidden; border: 1px solid var(--sl-border); border-radius: 18px; }
|
|
.sl-hero-dots { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--sl-dot) 1.5px, transparent 1.5px); background-size: 28px 28px; pointer-events: none; }
|
|
.sl-hero-sweep { position: absolute; top: 50%; left: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%;
|
|
background: conic-gradient(from 0deg, transparent 78%, var(--sl-accent) 100%); opacity: .18; animation: sl-sweep 14s linear infinite; pointer-events: none; }
|
|
.sl-hero-ring, .sl-hero-ring2 { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1px solid var(--sl-border); pointer-events: none; }
|
|
.sl-hero-ring { width: 400px; height: 400px; margin: -200px 0 0 -200px; }
|
|
.sl-hero-ring2 { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
|
|
@keyframes sl-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
|
@media (prefers-reduced-motion: reduce) { .sl-hero-sweep, .sl-dot { animation: none; } }
|
|
.sl-hero-body { position: relative; z-index: 1; }
|
|
.sl-temp-row { display: inline-flex; align-items: flex-start; line-height: 1; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; letter-spacing: -0.03em; }
|
|
.sl-temp-num { font-size: clamp(5.5rem, 22vw, 9rem); line-height: 1; transition: color .5s ease; }
|
|
.sl-temp-deg { font-size: clamp(1.8rem, 7vw, 3rem); margin-top: .15em; margin-left: .05em; opacity: .6; transition: color .5s ease; }
|
|
.sl-hero-sub { margin-top: .45rem; font-size: .95rem; color: var(--sl-muted); }
|
|
.sl-pill { display: inline-flex; align-items: center; gap: .35rem; margin-top: .85rem; padding: .3rem 1rem; background: var(--sl-card); border: 1px solid var(--sl-border); border-radius: 999px; font-size: .82rem; font-weight: 500; color: var(--sl-muted); }
|
|
|
|
/* Sections */
|
|
.sl-section { margin-top: 1.4rem; }
|
|
.sl-label { font-size: .62rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--sl-muted); margin-bottom: .6rem; }
|
|
.sl-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
|
|
.sl-row4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
|
|
.sl-row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
|
|
@media (min-width: 480px) { .sl-row4 { grid-template-columns: repeat(4, 1fr); } }
|
|
.sl-card { background: var(--sl-card); border: 1px solid var(--sl-border); border-radius: 14px; padding: 1rem 1.1rem .9rem; min-width: 0; }
|
|
.sl-card-label { font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-muted); margin-bottom: .3rem; }
|
|
.sl-card-val { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
|
|
.sl-card-unit { font-size: .68rem; color: var(--sl-muted); margin-top: .2rem; }
|
|
|
|
/* Wind */
|
|
.sl-wind { background: var(--sl-card); border: 1px solid var(--sl-border); border-radius: 14px; padding: 1.2rem; display: flex; align-items: center; gap: 1.5rem; }
|
|
.sl-compass { flex-shrink: 0; display: block; }
|
|
.sl-wind-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.25rem; }
|
|
.sl-wind-label { font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-muted); margin-bottom: .2rem; }
|
|
.sl-wind-val { font-family: 'Barlow Condensed', sans-serif; font-size: 1.75rem; font-weight: 700; line-height: 1; }
|
|
.sl-wind-unit { font-size: .65rem; color: var(--sl-muted); }
|
|
@media (max-width: 460px) { .sl-wind { flex-direction: column; } }
|
|
|
|
.sl-foot { text-align: center; font-size: .7rem; color: var(--sl-muted); margin-top: 1.5rem; }
|
|
.sl-empty { text-align: center; padding: 3rem 1.25rem; background: var(--sl-surface); border: 1px solid var(--sl-border); border-radius: 18px; color: var(--sl-muted); }
|
|
.sl-empty b { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; color: var(--sl-text); margin-bottom: .4rem; }
|
|
.sl-empty button { margin-top: 1rem; font: inherit; font-weight: 600; padding: .6rem 1.2rem; min-height: 44px; border-radius: 10px; border: 1px solid var(--sl-accent); background: transparent; color: var(--sl-accent); cursor: pointer; }
|
|
.sl-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; color: var(--sl-muted); text-decoration: none; padding: .32rem .75rem; border: 1px solid var(--sl-border); border-radius: 8px; }
|
|
.sl-link:hover { color: var(--sl-accent); border-color: var(--sl-accent); }
|