diff --git a/src/lib/components/post/PostContent.svelte b/src/lib/components/post/PostContent.svelte index 25923c6..be2341e 100644 --- a/src/lib/components/post/PostContent.svelte +++ b/src/lib/components/post/PostContent.svelte @@ -59,15 +59,25 @@ {#if hasValidContent}
-
- -
- {@html post.content} -
- - +
{#if tocNodes.length > 0} - + +
+ +
+ {@html post.content} +
+ + + +
+ {:else} + +
+
+ {@html post.content} +
+
{/if}
@@ -75,19 +85,21 @@ {:else}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+

Loading post content...

-

Loading post content...

-
-
+ +

{/if} @@ -109,4 +121,4 @@ background-color: var(--button-bg); opacity: 0.6; } - + \ No newline at end of file diff --git a/src/lib/components/post/ToCUI.svelte b/src/lib/components/post/ToCUI.svelte index 00d24f1..8258bc0 100644 --- a/src/lib/components/post/ToCUI.svelte +++ b/src/lib/components/post/ToCUI.svelte @@ -11,7 +11,7 @@ let tocOpen = false; const closeDrawer = () => (tocOpen = false); - // Scroll progress for desktop + // Scroll progress for desktop and mobile let scrollProgress = 0; const updateScrollProgress = () => { const scrollTop = window.scrollY; @@ -57,7 +57,7 @@ }); - + {#if tocNodes.length > 0} +{:else} + {/if} - + +
+
+
+ + {#if tocNodes.length > 0} {#if showTOCButton} @@ -201,4 +211,4 @@ transform: none; } } - + \ No newline at end of file