From af9bf42d058fd3234b9e6deda701526fa4809a47 Mon Sep 17 00:00:00 2001 From: Vincent van der Wal Date: Wed, 22 Jul 2026 18:48:24 +0200 Subject: [PATCH] static routing fixed --- .../components/charts/ChartContainer.svelte | 87 ++-- src/lib/utils/maps-domain.ts | 80 +++ src/routes/{+layout.server.ts => +layout.ts} | 0 src/routes/weather/maps/+page.svelte | 47 +- .../weather/week/[location]/+page.svelte | 2 +- .../week/[location]/HourlyTable.svelte | 488 +++++++++--------- .../week/[location]/ModelSelector.svelte | 2 +- 7 files changed, 430 insertions(+), 276 deletions(-) create mode 100644 src/lib/utils/maps-domain.ts rename src/routes/{+layout.server.ts => +layout.ts} (100%) diff --git a/src/lib/components/charts/ChartContainer.svelte b/src/lib/components/charts/ChartContainer.svelte index 7710f99..ee6b24e 100644 --- a/src/lib/components/charts/ChartContainer.svelte +++ b/src/lib/components/charts/ChartContainer.svelte @@ -31,6 +31,8 @@ chartHeight?: number; /** Extra vertical padding in pixels added to the total min-height (default: 2) */ extraPadding?: number; + /** Minimum chart width in pixels; narrower viewports scroll sideways (default: 560) */ + minWidth?: number; /** Optional CSS class for the outer wrapper */ class?: string; /** Slot content (charts go here) */ @@ -42,6 +44,7 @@ chartCount = 1, chartHeight = 300, extraPadding = 2, + minWidth = 560, class: className = '', children }: Props = $props(); @@ -51,53 +54,63 @@ let minHeight = $derived(chartHeight * chartCount + extraPadding); -
- -
- {#if children} - {@render children()} - {/if} -
- - +
-
- - Loading charts... + +
+ {#if children} + {@render children()} + {/if} +
+ + +
+
+ + Loading charts... +