New table column order
Table groups and colouring
Chance of rain column
This commit is contained in:
fraxle
2026-05-24 11:41:13 +01:00
parent 0853b9852b
commit d7bfaf11b6
6 changed files with 282 additions and 194 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ function buildForecastUrl(loc) {
`wind_speed_10m,wind_direction_10m,wind_gusts_10m,` +
`direct_radiation,diffuse_radiation,shortwave_radiation,` +
`cloud_cover,cloud_cover_low,cloud_cover_mid,cloud_cover_high,` +
`uv_index,precipitation,snowfall,visibility,` +
`uv_index,precipitation,precipitation_probability,snowfall,visibility,` +
`soil_temperature_0cm,soil_temperature_6cm,soil_moisture_0_to_1cm` +
`&wind_speed_unit=ms&timezone=auto&forecast_days=14`;
}
+2 -2
View File
@@ -123,7 +123,7 @@ export function useTableScroll({
const bodyScroll = bodyScrollRef.current;
if (!headTable || !bodyTable || !bodyScroll) return;
const bodyRow = bodyTable.querySelector('tbody tr');
const headRow = headTable.querySelector('thead tr');
const headRow = headTable.querySelector('thead tr:last-child');
if (!bodyRow || !headRow) return;
const headCells = Array.from(headRow.children);
const bodyCells = Array.from(bodyRow.children);
@@ -178,7 +178,7 @@ export function useTableScroll({
// Step 4: restore the CSS-defined table-layout: fixed so the
// explicit cell widths we apply below are honoured by the browser
// (not redistributed by the auto-layout algorithm).
headTable.style.tableLayout = '';
headTable.style.tableLayout = 'auto';
bodyTable.style.tableLayout = '';
// Step 5: apply the final width to both head and body cells.