From f3393f3c070ba04277cc1b0caebba778815694e4 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 5 Apr 2026 00:22:36 +0100 Subject: [PATCH] Add timezone warning to top of +layout.svelte conditionally displayed when the users device is not in the Europe/London timezone --- src/lib/components/ui/TimezoneWarning.svelte | 42 ++++++++++++++++++++ src/routes/+layout.svelte | 3 ++ 2 files changed, 45 insertions(+) create mode 100644 src/lib/components/ui/TimezoneWarning.svelte diff --git a/src/lib/components/ui/TimezoneWarning.svelte b/src/lib/components/ui/TimezoneWarning.svelte new file mode 100644 index 0000000..c2ebf57 --- /dev/null +++ b/src/lib/components/ui/TimezoneWarning.svelte @@ -0,0 +1,42 @@ + + +{#if isNotLondon} +

+ All times are shown in {londonZone} +

+{/if} + + \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 79d6f94..6be2492 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -6,6 +6,8 @@ import { LOCATIONS } from '$lib/locations-object.svelte'; import { nearestStationsState } from '$lib/geohash.svelte'; + import TimezoneWarning from '$lib/components/ui/TimezoneWarning.svelte'; + import '$lib/global.css'; import logoText from '$lib/assets/round-logo-text.svg'; @@ -78,6 +80,7 @@
+ {@render children()}