cleaned up code

This commit is contained in:
J-onasJones 2024-06-16 20:08:24 +02:00
parent 4c86ca9db7
commit 590e2e92cc

View file

@ -1,8 +1,8 @@
<script lang="ts">
import { onMount } from "svelte";
import { marked } from 'marked';
import Loading from './Loading.svelte';
import NotFound from "./NotFound.svelte";
import Loading from '../components/Loading.svelte';
import NotFound from "./Error.svelte";
import navigate from 'svelte-spa-router';
export let params: {year: string, month: string, day: string, title: string} = {
@ -94,6 +94,7 @@
while (true) {
if (thisHref != location.href) {
location.reload()
console.log("reloading")
}
await new Promise(resolve => setTimeout(resolve, 1000));
}
@ -133,10 +134,10 @@ function copyLink() {
</script>
{#if loading}
<Loading />
{/if}
{#if error404}
<NotFound />
{:else}
{#if error404}
<NotFound />
{/if}
{/if}
<div class="post">
@ -148,7 +149,7 @@ function copyLink() {
<div class="copy-link" on:click={copyLink}>
<i class="fas fa-link"></i>
<span>{clickText}</span>
</div>
</div>
<h1 class="postHead">{postTitle}</h1>
<div id="markdowncontent"></div>
</div>