From 9b7089ca06a7e306f52e4f925a9bb4f56f56969d Mon Sep 17 00:00:00 2001 From: fraxle Date: Wed, 27 May 2026 20:30:39 +0100 Subject: [PATCH] 2.0 Layout fixes Mobile cleanup Location right hand side Moon style updated - again --- assets/css/header.css | 27 +++++++++++++++++++-------- assets/css/table.css | 1 - assets/css/ui.css | 18 ++++++++++++++---- assets/js/app.js | 19 +++++++++---------- assets/js/components.js | 24 ++++++++++++------------ assets/js/components/DayTabs.js | 4 +++- 6 files changed, 57 insertions(+), 36 deletions(-) diff --git a/assets/css/header.css b/assets/css/header.css index 678074a..139584c 100644 --- a/assets/css/header.css +++ b/assets/css/header.css @@ -9,8 +9,8 @@ grid-template-columns: 1fr auto 1fr; /* title | dial | search */ gap: 32px; align-items: center; - padding-bottom: 32px; - margin-bottom: 32px; + padding-bottom: 14px; + margin-bottom: 14px; } .header-right { @@ -58,8 +58,10 @@ font-style: italic; font-weight: 800; font-size: 18px; - margin-top: 12px; + margin-top: 8px; + margin-bottom: 0; color: #1e1208; + text-align: right; } /* The lat/lon below the location */ @@ -70,7 +72,7 @@ color: #b09870; display: block; margin-top: 4px; - margin-left: 15px; + margin-left: 0; letter-spacing: 0.08em; } @@ -273,17 +275,26 @@ } .scope-ring { - width: 160px; - height: 160px; - margin: 0 auto; /* centre the dial */ + width: 250px; + height: 250px; + margin: 0 auto; } .scope-env-row { - width: 160px; /* match dial width on mobile */ + width: 250px; } .utci-current-loc { margin-top: 4px; /* tighten gap above location on mobile */ + text-align: center; + } + + .utci-loc-coords { + text-align: center; + } + + .utci-fetch-time { + text-align: center; } .utci-search-wrap { diff --git a/assets/css/table.css b/assets/css/table.css index b54c6f3..351071f 100644 --- a/assets/css/table.css +++ b/assets/css/table.css @@ -11,7 +11,6 @@ /* Wrapper that hosts the scrollable strip, edge fades, and chevrons. */ .utci-day-tabs-wrap { position: relative; - margin-bottom: 18px; } /* Edge fade gradients — only show when there's content to scroll to. */ diff --git a/assets/css/ui.css b/assets/css/ui.css index 081c137..ac8f745 100644 --- a/assets/css/ui.css +++ b/assets/css/ui.css @@ -616,10 +616,10 @@ margin-bottom: 18px; } .utci-fetch-time { - text-align: left; + text-align: right; font-size: 0.72rem; opacity: 0.5; - margin: 0.70rem 0 0.4rem; + margin: 0.3rem 0 0; letter-spacing: 0.03em; } @@ -810,16 +810,26 @@ align-items: center; } + .utci-current-loc, + .utci-loc-coords, + .utci-fetch-time { + text-align: center; + } + .utci-search-wrap { width: 100%; } .scope-ring { - width: 180px; /* smaller dial on mobile */ - height: 180px; + width: 250px; + height: 250px; margin: 0 auto; } + .scope-env-row { + width: 250px; + } + /* Halve the hourly-table cell padding on mobile so more columns fit in the viewport before the horizontal scrollbar kicks in. */ .utci-table th { diff --git a/assets/js/app.js b/assets/js/app.js index 03ef04c..cbfea36 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -277,14 +277,6 @@ export function UTCIForecast() { SUNScope
See the sun the way your body does.
-
- ↳ ${location.name} - - ${location.lat.toFixed(3)}°, ${location.lon.toFixed(3)}° - -
- ${fetchedAt && !loading && html` -
Last update: ${fetchedAt.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
`}
@@ -316,8 +308,7 @@ export function UTCIForecast() {
- - `} ${searching && html`
Searching…
`}
+
+ ↳ ${location.name} + + ${location.lat.toFixed(3)}°, ${location.lon.toFixed(3)}° + +
+ ${fetchedAt && !loading && html` +
Last update: ${fetchedAt.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
`}
diff --git a/assets/js/components.js b/assets/js/components.js index 8b2d16d..223490d 100644 --- a/assets/js/components.js +++ b/assets/js/components.js @@ -234,9 +234,9 @@ export function SkyScope({ elev, dt, glob = 0, size = 26 }) { - - + + @@ -258,15 +258,15 @@ export function SkyScope({ elev, dt, glob = 0, size = 26 }) { + fill="#e7e3d4" mask=${`url(#moon-mask-${uid})`} /> + opacity="0.55" /> + fill="rgba(200,192,230,0.08)" stroke="none" /> `} @@ -562,9 +562,9 @@ export function ScopeReticle({ value, cat, loading, elev = 0, dt = new Date(), g - - + + @@ -581,15 +581,15 @@ export function ScopeReticle({ value, cat, loading, elev = 0, dt = new Date(), g ${(isTwil || (!isDay && !isTwil)) && html`<${Fragment}> + fill="#e7e3d4" mask="url(#scope-moon-mask)" /> + opacity="0.55" /> + fill="rgba(200,192,230,0.08)" stroke="none" /> `} ${(() => { diff --git a/assets/js/components/DayTabs.js b/assets/js/components/DayTabs.js index ed793e4..8030bf6 100644 --- a/assets/js/components/DayTabs.js +++ b/assets/js/components/DayTabs.js @@ -166,6 +166,7 @@ export function DayTabs({ right: 0, height: isActive ? '5px' : '4px', background: band.bg, + borderTop: '1px solid #c9b08a', borderRadius: '0 0 2px 2px', transition: 'height 0.1s', }} aria-hidden="true"> @@ -396,10 +397,11 @@ export function DayTabs({ display: 'flex', alignItems: 'center', gap: '10px', - margin: '8px 0 4px', + margin: '0 0 14px', padding: '6px 10px', background: band.tint, borderLeft: `3px solid ${band.edge}`, + borderBottom: `1px solid ${band.edge}`, borderRadius: '0 4px 4px 0', fontSize: '12px', color: '#3a2a18',