diff --git a/src/routes/_layout.svelte b/src/routes/_layout.svelte index bed2997..ca1aee1 100644 --- a/src/routes/_layout.svelte +++ b/src/routes/_layout.svelte @@ -6,8 +6,14 @@ export let segment let wrapper - onMount(() => { + function resize() { wrapper.style.height = `${window.innerHeight}px` + } + + onMount(() => { + const listener = window.addEventListener('resize', resize) + resize() + return () => window.removeEventListener(listener) })