diff --git a/src/lib/components/Blog/Article.svelte b/src/lib/components/Blog/Article.svelte
index 9ea3c30..debe5cb 100644
--- a/src/lib/components/Blog/Article.svelte
+++ b/src/lib/components/Blog/Article.svelte
@@ -1,6 +1,7 @@
@@ -31,5 +32,6 @@
{@html doc.content}
+
End
diff --git a/src/lib/components/StickyToc.svelte b/src/lib/components/StickyToc.svelte
deleted file mode 100644
index 93da107..0000000
--- a/src/lib/components/StickyToc.svelte
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
diff --git a/src/lib/components/Toc/StickyToc.svelte b/src/lib/components/Toc/StickyToc.svelte
new file mode 100644
index 0000000..0819fef
--- /dev/null
+++ b/src/lib/components/Toc/StickyToc.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+ On this page
+
+
+ {#if $tocStore.items.size}
+
+ {#each $tocStore.items.values() as tocItem}
+ -
+
+
+
+ {/each}
+
+ {/if}
+
+
diff --git a/src/routes/blog/[year]/[slug]/+page.svelte b/src/routes/blog/[year]/[slug]/+page.svelte
index ecec4dd..6bcc36b 100644
--- a/src/routes/blog/[year]/[slug]/+page.svelte
+++ b/src/routes/blog/[year]/[slug]/+page.svelte
@@ -6,24 +6,9 @@
import { cn } from '$lib/utils.js';
import Article from '$lib/components/Blog/Article.svelte';
import { toc, createTocStore } from '@svelte-put/toc';
- import StickyToc from '$lib/components/StickyToc.svelte';
+ import StickyToc from '$lib/components/Toc/StickyToc.svelte';
import { onMount } from 'svelte';
- let distanceFromRight = 0;
-
- let mainElement: HTMLElement;
-
- const handleResize = () => {
- const screenWidth = window.innerWidth;
- const mainWidth = mainElement.offsetWidth;
- distanceFromRight = screenWidth - mainWidth - mainElement.offsetLeft;
- console.log(distanceFromRight);
- };
-
- onMount(() => {
- handleResize();
- });
-
const tocStore = createTocStore();
export let data: PageData;
@@ -48,21 +33,26 @@
-
+