From 0eebe03bf8c2c21d51bf213dd454f5142b742c25 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Tue, 10 Feb 2026 21:18:49 +0300 Subject: [PATCH] feat(Page): add id and pass it to scrollBreadcrumbStore --- src/routes/Page.svelte | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/routes/Page.svelte b/src/routes/Page.svelte index bd5f546..d6b6bcb 100644 --- a/src/routes/Page.svelte +++ b/src/routes/Page.svelte @@ -23,9 +23,14 @@ let searchContainer: HTMLElement; let isExpanded = $state(false); -function handleTitleStatusChanged(index: number, isPast: boolean, title?: Snippet<[{ className?: string }]>) { +function handleTitleStatusChanged( + index: number, + isPast: boolean, + title?: Snippet<[{ className?: string }]>, + id?: string, +) { if (isPast && title) { - scrollBreadcrumbsStore.add({ index, title }); + scrollBreadcrumbsStore.add({ index, title, id }); } else { scrollBreadcrumbsStore.remove(index); } @@ -50,7 +55,7 @@ function handleTitleStatusChanged(index: number, isPast: boolean, title?: Snippe class="p-2 sm:p-3 md:p-4 h-full flex flex-col gap-3 sm:gap-4" in:fade={{ duration: 500, delay: 150, easing: cubicIn }} > -
+
{#snippet icon({ className })} {/snippet} @@ -62,7 +67,12 @@ function handleTitleStatusChanged(index: number, isPast: boolean, title?: Snippe
-
+
{#snippet icon({ className })} {/snippet} @@ -74,7 +84,12 @@ function handleTitleStatusChanged(index: number, isPast: boolean, title?: Snippe
-
+
{#snippet icon({ className })} {/snippet} @@ -86,7 +101,12 @@ function handleTitleStatusChanged(index: number, isPast: boolean, title?: Snippe
-
+
{#snippet icon({ className })} {/snippet}