From 0c79aff77b338facaa92b81deb4b0f96646a5bcc Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 29 Dec 2021 18:52:26 +0100 Subject: [PATCH] sidepanel --- src/lib/components/ArticleOverview.svelte | 55 +++++++++++++++++++++++ src/lib/components/WPAdapter.svelte | 50 ++++++++++++--------- 2 files changed, 85 insertions(+), 20 deletions(-) create mode 100644 src/lib/components/ArticleOverview.svelte diff --git a/src/lib/components/ArticleOverview.svelte b/src/lib/components/ArticleOverview.svelte new file mode 100644 index 0000000..1dde117 --- /dev/null +++ b/src/lib/components/ArticleOverview.svelte @@ -0,0 +1,55 @@ + + + + +
+ Outline + {#each headings as { text, level, href }} +
+ + + {text} + +
+ {/each} +
+ + diff --git a/src/lib/components/WPAdapter.svelte b/src/lib/components/WPAdapter.svelte index 54b3066..a2b4f6d 100644 --- a/src/lib/components/WPAdapter.svelte +++ b/src/lib/components/WPAdapter.svelte @@ -1,14 +1,16 @@
+ {#if headings} + + {/if} {@html content}