mirror of
https://github.com/JonasunderscoreJones/blog.jonasjones.dev.git
synced 2025-10-22 18:49:19 +02:00
fixed content displaying when post deleted
This commit is contained in:
parent
e106e7271c
commit
c2ba40c8aa
1 changed files with 18 additions and 13 deletions
|
@ -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}
|
||||
<NotFound />
|
||||
{:else}
|
||||
<div class="post">
|
||||
<p class="postHead">by</p>
|
||||
<h3 class="postHead">{postAuthor}</h3>
|
||||
<p class="postHead postDate">{postDate}</p>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div class="copy-link" on:click={copyLink}>
|
||||
<i class="fas fa-link"></i>
|
||||
<span>{clickText}</span>
|
||||
</div>
|
||||
<h1 class="postHead">{postTitle}</h1>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div class="post">
|
||||
<p class="postHead">by</p>
|
||||
<h3 class="postHead">{postAuthor}</h3>
|
||||
<p class="postHead postDate">{postDate}</p>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div class="copy-link" on:click={copyLink}>
|
||||
<i class="fas fa-link"></i>
|
||||
<span>{clickText}</span>
|
||||
</div>
|
||||
<h1 class="postHead">{postTitle}</h1>
|
||||
<div id="markdowncontent"></div>
|
||||
</div>
|
||||
<div class="post" id="markdowncontent"></div>
|
||||
|
||||
|
||||
<style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue