add frontend skeleton

This commit is contained in:
sam 2024-03-26 22:10:04 +01:00
parent 0c52ebb7bc
commit a80f89d038
23 changed files with 2110 additions and 3 deletions

View file

@ -0,0 +1,12 @@
import request from "$lib/request";
export async function load({ fetch, cookies }) {
const meta = await request("GET", "/meta", { fetchFn: fetch });
let user;
if (cookies.get("pronounscc-token")) {
user = await request("GET", "/users/@me", { fetchFn: fetch });
}
return { meta, user };
}

View file

@ -0,0 +1,11 @@
<script lang="ts">
import "bootstrap/scss/bootstrap.scss";
import "bootstrap-icons/font/bootstrap-icons.scss";
import type { LayoutData } from "./$types";
export let data: LayoutData
</script>
{JSON.stringify(data.meta)}
<slot />

View file

@ -0,0 +1,2 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>