add /about/
This commit is contained in:
parent
d891ee8b7b
commit
edc38bb6a5
3 changed files with 33 additions and 1 deletions
13
src/routes/about/+page.svelte
Normal file
13
src/routes/about/+page.svelte
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { SvelteShowdown } from "svelte-showdown";
|
||||
|
||||
let { data }: { data: {content: string} } = $props();
|
||||
|
||||
let { content } = data;
|
||||
</script>
|
||||
|
||||
<article class="card">
|
||||
<p class="faint">About</p>
|
||||
|
||||
<SvelteShowdown {content} />
|
||||
</article>
|
||||
19
src/routes/about/+page.ts
Normal file
19
src/routes/about/+page.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { backend } from '$lib/backend.js';
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
|
||||
|
||||
export async function load(event) {
|
||||
|
||||
const resp = await backend.withEvent(event).fetch('about/about');
|
||||
|
||||
if(resp.status === 404) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
const respJ = await resp.json();
|
||||
|
||||
const { content } = respJ;
|
||||
|
||||
return { content };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue