Environment 'Shade' temperatures.
Add shade to profiles
Add shade to table column
This commit is contained in:
fraxle
2026-06-27 15:15:59 +01:00
parent 05ab4cf76b
commit df3256462a
6 changed files with 146 additions and 83 deletions
+5 -5
View File
@@ -313,9 +313,9 @@ export function DayTabs({
const utcipVals = d.rows.map(r => r.utciAdj).filter(v => isFinite(v));
const dayHi = utcipVals.length ? Math.round(Math.max(...utcipVals)) : null;
const dayLo = utcipVals.length ? Math.round(Math.min(...utcipVals)) : null;
const airVals = d.rows.map(r => r.Ta).filter(v => isFinite(v));
const airHi = airVals.length ? Math.round(Math.max(...airVals)) : null;
const airLo = airVals.length ? Math.round(Math.min(...airVals)) : null;
const shadeVals = d.rows.map(r => r.shadeT).filter(v => isFinite(v));
const shadeHi = shadeVals.length ? Math.round(Math.max(...shadeVals)) : null;
const shadeLo = shadeVals.length ? Math.round(Math.min(...shadeVals)) : null;
// Day-tab weather icon - use core daylight rows (elev > 10°) where
// available, falling back to any above-horizon rows, then all rows.
@@ -415,12 +415,12 @@ export function DayTabs({
}}>
<span style=${{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '1px' }}>
<span style=${{ color: '#c0622a', fontWeight: 800, fontSize: '14px', lineHeight: 1.1 }}>${dayHi}°</span>
${airHi !== null && html`<span style=${{ color: '#c0622a', fontWeight: 600, fontSize: '11px', lineHeight: 1.1 }}>${airHi}°</span>`}
${shadeHi !== null && html`<span style=${{ color: '#c0622a', fontWeight: 600, fontSize: '11px', lineHeight: 1.1 }}>${shadeHi}°</span>`}
</span>
<span style=${{ width: '1px', background: 'rgba(0,0,0,0.15)', margin: '2px 0', alignSelf: 'stretch' }}></span>
<span style=${{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '1px' }}>
<span style=${{ color: '#3a6080', fontWeight: 800, fontSize: '14px', lineHeight: 1.1 }}>${dayLo}°</span>
${airLo !== null && html`<span style=${{ color: '#3a6080', fontWeight: 600, fontSize: '11px', lineHeight: 1.1 }}>${airLo}°</span>`}
${shadeLo !== null && html`<span style=${{ color: '#3a6080', fontWeight: 600, fontSize: '11px', lineHeight: 1.1 }}>${shadeLo}°</span>`}
</span>
</span>`}
</button>`;