change name

This commit is contained in:
Vincent van der Wal
2026-07-20 11:26:49 +02:00
parent faee466286
commit 54dbaeaadc
10 changed files with 34 additions and 26 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
<title>OMbrella</title>
<title></title>
<defs>
<linearGradient id="sky" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#e0f2fe" />

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -43,7 +43,7 @@
let {
charts = [],
fileName = 'ombrella-chart',
fileName = 'drizzli-chart',
class: className = '',
controls
}: Props = $props();
@@ -61,7 +61,7 @@
? 'justify-center'
: 'px-4'}"
onclick={onMobileClose}
aria-label="OMbrella home"
aria-label="Drizzli home"
>
<div
class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground"
@@ -87,7 +87,7 @@
</div>
{#if !collapsed}
<span class="text-sm font-bold tracking-tight whitespace-nowrap text-sidebar-foreground">
OMbrella
Drizzli
</span>
{/if}
</a>
+1 -1
View File
@@ -1,3 +1,3 @@
<svelte:head>
<title>OMbrella</title>
<title>Drizzli</title>
</svelte:head>
+1 -1
View File
@@ -8,6 +8,6 @@ describe('/+page.svelte', () => {
render(Page);
const title = document.querySelector('title');
expect(title?.textContent).toBe('OMbrella');
expect(title?.textContent).toBe('Drizzli');
});
});
+18 -10
View File
@@ -3,20 +3,28 @@
import { storedLocation } from '$lib/stores/settings';
// a #zoom/lat/lng(/bearing/pitch) hash on OUR url is piped through to the
// map, so map positions can be bookmarked/shared via ombrella links
// (the reverse direction is not possible: the iframe is cross-origin, so
// its internal hash changes are unreadable from here)
// Hash piping, both directions:
// - inbound: a #zoom/lat/lng(/bearing/pitch) hash on OUR url seeds the
// map, so positions can be bookmarked/shared via drizzli links
// - outbound: the (cross-origin) map posts its hash here on every moveend;
// we mirror it into our url with replaceState. hashOverride is only set
// once on mount, so these mirror updates never reload the iframe.
let hashOverride = $state<string | null>(null);
const MAP_HASH_RE = /^#\d+(\.\d+)?\/-?\d+(\.\d+)?\/-?\d+(\.\d+)?/;
onMount(() => {
const readHash = () => {
const hash = window.location.hash;
hashOverride = /^#\d+(\.\d+)?\/-?\d+(\.\d+)?\/-?\d+(\.\d+)?/.test(hash) ? hash : null;
const initialHash = window.location.hash;
hashOverride = MAP_HASH_RE.test(initialHash) ? initialHash : null;
const onMessage = (event: MessageEvent) => {
if (event.origin !== 'https://maps.open-meteo.com') return;
const { type, hash } = (event.data ?? {}) as { type?: string; hash?: string };
if (type !== 'om-maps:hash' || !hash || !MAP_HASH_RE.test(hash)) return;
history.replaceState(history.state, '', hash);
};
readHash();
window.addEventListener('hashchange', readHash);
return () => window.removeEventListener('hashchange', readHash);
window.addEventListener('message', onMessage);
return () => window.removeEventListener('message', onMessage);
});
// the embedded map understands maplibre's #zoom/lat/lng hash, so the iframe
@@ -120,8 +120,8 @@
</script>
<svelte:head>
<title>OMbrella | Weather</title>
<link rel="canonical" href="https://ombrella.servert.ch/weather/week" />
<title>Drizzli | Weather</title>
<link rel="canonical" href="https://drizz.li/weather/week" />
<meta name="description" content="7-day weather forecast with detailed hourly data" />
</svelte:head>