mirror of
https://github.com/JonasunderscoreJones/blog.jonasjones.dev.git
synced 2025-10-22 21:29:18 +02:00
cleaned up code
This commit is contained in:
parent
4c86ca9db7
commit
590e2e92cc
1 changed files with 8 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
import Loading from './Loading.svelte';
|
import Loading from '../components/Loading.svelte';
|
||||||
import NotFound from "./NotFound.svelte";
|
import NotFound from "./Error.svelte";
|
||||||
import navigate from 'svelte-spa-router';
|
import navigate from 'svelte-spa-router';
|
||||||
|
|
||||||
export let params: {year: string, month: string, day: string, title: string} = {
|
export let params: {year: string, month: string, day: string, title: string} = {
|
||||||
|
@ -94,6 +94,7 @@
|
||||||
while (true) {
|
while (true) {
|
||||||
if (thisHref != location.href) {
|
if (thisHref != location.href) {
|
||||||
location.reload()
|
location.reload()
|
||||||
|
console.log("reloading")
|
||||||
}
|
}
|
||||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
}
|
}
|
||||||
|
@ -133,10 +134,10 @@ function copyLink() {
|
||||||
</script>
|
</script>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<Loading />
|
<Loading />
|
||||||
{/if}
|
{:else}
|
||||||
|
{#if error404}
|
||||||
{#if error404}
|
<NotFound />
|
||||||
<NotFound />
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="post">
|
<div class="post">
|
||||||
|
@ -148,7 +149,7 @@ function copyLink() {
|
||||||
<div class="copy-link" on:click={copyLink}>
|
<div class="copy-link" on:click={copyLink}>
|
||||||
<i class="fas fa-link"></i>
|
<i class="fas fa-link"></i>
|
||||||
<span>{clickText}</span>
|
<span>{clickText}</span>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="postHead">{postTitle}</h1>
|
<h1 class="postHead">{postTitle}</h1>
|
||||||
<div id="markdowncontent"></div>
|
<div id="markdowncontent"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue