From 86976c5bf81df4dcc6ae21d5ba65895883d36e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nu=C5=A1a=20Puk=C5=A1i=C4=8D?= Date: Sun, 4 May 2025 12:39:49 +0200 Subject: [PATCH] Update ArticleNav --- src/lib/components/util/ArticleNav.svelte | 61 ++++++++--------------- src/routes/publication/+page.svelte | 6 +-- 2 files changed, 23 insertions(+), 44 deletions(-) diff --git a/src/lib/components/util/ArticleNav.svelte b/src/lib/components/util/ArticleNav.svelte index f810d39..8df36bf 100644 --- a/src/lib/components/util/ArticleNav.svelte +++ b/src/lib/components/util/ArticleNav.svelte @@ -5,24 +5,6 @@ import { publicationColumnVisibility } from "$lib/stores"; import InlineProfile from "$components/util/InlineProfile.svelte"; import type { NDKEvent } from "@nostr-dev-kit/ndk"; - import { onMount } from 'svelte'; - import { fade } from 'svelte/transition'; - - let scrollY = $state(0); - - // Run this every time the scroll event happens - function updateScroll() { - scrollY = window.scrollY; - } - - onMount(() => { - window.addEventListener('scroll', updateScroll); - updateScroll(); // Set initial value - - return () => { - window.removeEventListener('scroll', updateScroll); - }; - }); let { rootId, @@ -51,31 +33,28 @@ - \ No newline at end of file diff --git a/src/routes/publication/+page.svelte b/src/routes/publication/+page.svelte index f0695e2..ac297c4 100644 --- a/src/routes/publication/+page.svelte +++ b/src/routes/publication/+page.svelte @@ -46,14 +46,14 @@ -{#key data} - -{/key}
{#await data.waitable} {:then} + {#key data} + + {/key}