From c2ba40c8aa7452fdbca4ddd34bcc65670655ed15 Mon Sep 17 00:00:00 2001 From: J-onasJones Date: Sun, 16 Jun 2024 20:26:52 +0200 Subject: [PATCH] fixed content displaying when post deleted --- src/routes/Post.svelte | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/routes/Post.svelte b/src/routes/Post.svelte index 03cc295..b68ea6d 100644 --- a/src/routes/Post.svelte +++ b/src/routes/Post.svelte @@ -50,6 +50,10 @@ if (await !post) { loading = false; error404 = true; + const markdowncontentElement = document.getElementById('markdowncontent'); + if (markdowncontentElement) { + markdowncontentElement.style.display = "none"; + } } if (params.month?.toString().length === 1) { @@ -137,22 +141,23 @@ function copyLink() { {:else} {#if error404} + {:else} +
+

by

+

{postAuthor}

+ + + + +

{postTitle}

+
{/if} {/if} -
-

by

-

{postAuthor}

- - - - -

{postTitle}

-
-
+