From dd3699287f9986b4d66224e96f0d8264bb772a03 Mon Sep 17 00:00:00 2001 From: silberengel Date: Sun, 7 Dec 2025 12:42:46 +0100 Subject: [PATCH] add a beginning entry to the ToC, so that you can scroll all the way to the top of the page --- .../publications/TableOfContents.svelte | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/components/publications/TableOfContents.svelte b/src/lib/components/publications/TableOfContents.svelte index 8003fc5..117769a 100644 --- a/src/lib/components/publications/TableOfContents.svelte +++ b/src/lib/components/publications/TableOfContents.svelte @@ -157,6 +157,24 @@ + + {#if depth === 2} + { + e.preventDefault(); + window.scrollTo({ + top: 0, + behavior: 'smooth', + }); + onClose?.(); + }} + > + + + {/if} {#if depth === 2} {@const rootEntry = toc.getRootEntry()}