diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index f39d123..49f8485 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -139,7 +139,6 @@ and morbid.

` ] } }; - let svg: SVGElement; onMount(() => { //check whether the cookie is set. if not, show the modal @@ -149,9 +148,11 @@ and morbid.

` document.cookie = 'showInfoModal=true; max-age=15552000'; } }); + + let svgWidth: number; + let svgHeight: number; - (svg = svg)} />

A Literary Atlas of the Beach in the Long 20th Century

@@ -165,20 +166,35 @@ and morbid.

`
{#snippet button(href, baseColor, hoverColor, text)} {text} {/snippet} {#snippet atlanticButton()} - {@render button(`${base}/region/black-atlantic`, `secondary-500`, `surface-900`, `Black Atlantic`)} + {@render button( + `${base}/region/black-atlantic`, + `secondary-500`, + `surface-900`, + `Black Atlantic` + )} {/snippet} {#snippet mediterraneanButton()} - {@render button(`${base}/region/mediterranean`, `tertiary-500`, `surface-900`, `Mediterranean`)} + {@render button( + `${base}/region/mediterranean`, + `tertiary-500`, + `surface-900`, + `Mediterranean` + )} {/snippet} {#snippet northernButton()} - {@render button(`${base}/region/northern-sea`, `quarternary-500`, `surface-900`, `Northern Sea`)} + {@render button( + `${base}/region/northern-sea`, + `quarternary-500`, + `surface-900`, + `Northern Sea` + )} {/snippet} {#snippet deathButton()} {@render button(`${base}/topic/death`, `surface-900`, `primary-500`, `death`)} @@ -187,7 +203,12 @@ and morbid.

` {@render button(`${base}/topic/leisure`, `surface-900`, `primary-500`, `leisure`)} {/snippet} {#snippet migrationButton()} - {@render button(`${base}/topic/migration`, `surface-900`, `primary-500`, `migration and exile`)} + {@render button( + `${base}/topic/migration`, + `surface-900`, + `primary-500`, + `migration and exile` + )} {/snippet} {#snippet mythButton()} {@render button(`${base}/topic/myth`, `surface-900`, `primary-500`, `myth`)} @@ -196,7 +217,7 @@ and morbid.

` {@render button(`${base}/topic/pollution`, `surface-900`, `primary-500`, `pollution`)} {/snippet}
- +

explore by region

@@ -218,18 +239,18 @@ and morbid.

`
-
@@ -270,7 +287,8 @@ and morbid.

` preserveAspectRatio="xMidYMid slice" id="map" class="row-span-full col-span-full h-screen w-full" - bind:this={svg} + bind:clientHeight={svgHeight} + bind:clientWidth={svgWidth} > ` > - {#if svg?.clientWidth}