From 650aa280d45997ca082f3c5234935ccb24ee50f8 Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Thu, 15 May 2025 09:14:00 -0500 Subject: [PATCH] Add comments with implementation plan --- src/lib/components/TableOfContents.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/components/TableOfContents.svelte b/src/lib/components/TableOfContents.svelte index 9e606fb..e26cdb9 100644 --- a/src/lib/components/TableOfContents.svelte +++ b/src/lib/components/TableOfContents.svelte @@ -5,12 +5,14 @@ let { rootAddress } = $props<{ rootAddress: string }>(); + // Determine the event kind. + // If index, use the publication tree to build the table of contents. + // If single event, build the table of contents from the rendered HTML. + // Each rendered `` should receive an entry in the ToC. + let toc = $state([]); const publicationTree = getContext('publicationTree') as PublicationTree; - - // TODO: Build the table of contents. - // Base hrefs on d-tags for events within the publication.