diff --git a/assets/css/table.css b/assets/css/table.css index 8e305f0..8de4870 100644 --- a/assets/css/table.css +++ b/assets/css/table.css @@ -1335,3 +1335,225 @@ letter-spacing: 0.03em; } } + +/* ── SIMPLE / TABLE VIEW TOGGLE ─────────────────────────────────────────── */ + +.forecast-view-toggle { + display: inline-flex; + align-items: center; + flex-shrink: 0; + margin-right: 8px; +} +.fvt-btn { + font-family: Manrope, sans-serif; + font-size: 11px; + font-weight: 700; + line-height: 1; + padding: 4px 10px; + cursor: pointer; + border: 1.5px solid #c9b08a; + background: #f5edd6; + color: #6b4228; + transition: background 0.12s, border-color 0.12s, color 0.12s; +} +.fvt-btn:first-child { + border-radius: 3px 0 0 3px; +} +.fvt-btn:last-child { + border-left: none; + border-radius: 0 3px 3px 0; +} +.fvt-btn:hover { + border-color: #c8922a; + background: #fef3dc; + z-index: 1; +} +.fvt-btn.on { + background: #c8922a; + border-color: #c8922a; + color: #fff; +} + +/* Interval buttons shown in the col-toggles bar in simple mode */ +.fvt-interval { + display: none; + align-items: center; + gap: 2px; + margin-right: 6px; + flex-shrink: 0; +} +.table-main--simple .fvt-interval { + display: inline-flex; +} + +/* Hide table-mode column controls when in simple mode */ +.table-main--simple .col-toggles-label, +.table-main--simple .col-toggles-edit-btn, +.table-main--simple .col-toggles-body { + display: none !important; +} + +/* Show simple view, hide table; swap in table mode */ +.forecast-simple-wrap { + display: none; +} +.table-main--simple { + align-self: stretch; + display: flex; + flex-direction: column; +} +.table-main--simple .forecast-simple-wrap { + display: flex; + flex-direction: column; + flex: 1; + border: 1.5px solid #d4c0a0; + background: #fdf8ee; +} +.table-main--simple .utci-table-wrap { + display: none; +} + +/* ── SIMPLE VIEW CARDS ───────────────────────────────────────────────────── */ + +.forecast-simple-scroll { + flex: 1; + display: flex; + flex-direction: column; + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: thin; + scrollbar-color: #c9b08a transparent; +} +.forecast-simple-scroll::-webkit-scrollbar { + height: 4px; +} +.forecast-simple-scroll::-webkit-scrollbar-track { + background: transparent; +} +.forecast-simple-scroll::-webkit-scrollbar-thumb { + background: #c9b08a; + border-radius: 2px; +} +.forecast-simple-inner { + flex: 1; + display: flex; + flex-direction: column; + width: max-content; + min-width: 100%; +} +.forecast-simple-cards { + display: grid; + padding: 12px 0 0; +} + +.fsc-card { + min-width: 0; + text-align: center; + border: none; + background: transparent; + padding: 10px 8px 12px; + display: flex; + flex-direction: column; + align-items: center; + gap: 6px; + border-radius: 1px; +} +.fsc-card--now { + border: 1.5px solid #c8922a; + background: #fff9ee; + box-shadow: 0 2px 10px rgba(200,146,42,0.18); + position: relative; + z-index: 1; +} + +.fsc-time { + font-family: JetBrains Mono, monospace; + font-size: 12px; + font-weight: 700; + color: #4a3218; + line-height: 1; +} +.fsc-card--now .fsc-time { + color: #c8922a; +} + +.fsc-feel { + font-family: Manrope, sans-serif; + font-size: 10px; + font-weight: 700; + padding: 2px 6px; + border-radius: 2px; + line-height: 1.3; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.fsc-scope-wrap { + position: relative; + width: 42px; + height: 42px; + flex-shrink: 0; +} +.fsc-wx-overlay { + position: absolute; + inset: 0; + top: 3px; + display: flex; + align-items: center; + justify-content: center; + pointer-events: none; +} + +.fsc-meta { + display: flex; + flex-direction: column; + align-items: center; + gap: 2px; + width: 100%; +} +.fsc-meta-row { + font-family: Manrope, sans-serif; + font-size: 10px; + font-weight: 600; + line-height: 1.2; + color: #6b5230; + opacity: 0.8; +} +.fsc-card--now .fsc-meta-row { opacity: 1; color: #4a3218; } +.fsc-meta-rain { color: #2a6a90; } +.fsc-card--now .fsc-meta-rain { color: #1a4a70; } + +.fsc-temp { + font-family: Fraunces, serif; + font-size: 22px; + font-weight: 700; + color: #1e1208; + line-height: 1; +} + +.fsc-temp-curve { + display: block; + width: 100%; + flex: 1; + min-height: 60px; +} + +@media (max-width: 600px) { + .fsc-card { + min-width: 55px; + padding: 8px 4px 10px; + gap: 5px; + } + .fsc-temp { + font-size: 19px; + } + .fsc-feel { + font-size: 9px; + padding: 2px 4px; + } + .fsc-temp-curve { + min-height: 48px; + } +} diff --git a/assets/js/app.js b/assets/js/app.js index 2b8e6e3..e792c7b 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -100,6 +100,7 @@ export function UTCIForecast() { restoreOpen, openRestore, closeRestore, showUnits, toggleShowUnits, tableInterval, setTableInterval, + forecastView, setForecastView, activityOptions, placeOptions, workOptions, activityValue, activityLabel, placeValue, placeLabel, workValue, workLabel, skinType, setSkinType, @@ -658,8 +659,15 @@ export function UTCIForecast() {