From a408c543238922445d2d7061d5133d24d56dbac6 Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Mon, 26 May 2025 09:00:19 -0500 Subject: [PATCH] Reorganize ToC modules The `` component is moved to the same subdirectory as the publication components. Most of the component logic is moved into a class defined in `table_of_contents.svelte.ts`, which will serve as a companion module for ``. --- .../publications/TableOfContents.svelte | 20 ++++++ .../table_of_contents.svelte.ts} | 62 +++++++++---------- src/lib/data_structures/table_of_contents.ts | 6 -- 3 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 src/lib/components/publications/TableOfContents.svelte rename src/lib/components/{TableOfContents.svelte => publications/table_of_contents.svelte.ts} (52%) delete mode 100644 src/lib/data_structures/table_of_contents.ts diff --git a/src/lib/components/publications/TableOfContents.svelte b/src/lib/components/publications/TableOfContents.svelte new file mode 100644 index 0000000..50b383a --- /dev/null +++ b/src/lib/components/publications/TableOfContents.svelte @@ -0,0 +1,20 @@ + + + diff --git a/src/lib/components/TableOfContents.svelte b/src/lib/components/publications/table_of_contents.svelte.ts similarity index 52% rename from src/lib/components/TableOfContents.svelte rename to src/lib/components/publications/table_of_contents.svelte.ts index 78aa83a..548d4f5 100644 --- a/src/lib/components/TableOfContents.svelte +++ b/src/lib/components/publications/table_of_contents.svelte.ts @@ -1,35 +1,38 @@ - - - +} diff --git a/src/lib/data_structures/table_of_contents.ts b/src/lib/data_structures/table_of_contents.ts deleted file mode 100644 index 8bf447f..0000000 --- a/src/lib/data_structures/table_of_contents.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface TocEntry { - title: string; - href: string; - expanded: boolean; - children: Array | null; -}