use unocss, add blog, ui changes

This commit is contained in:
2022-12-27 17:28:47 +02:00
parent a6c4014327
commit ec15fac578
51 changed files with 838 additions and 732 deletions

View File

@ -3,10 +3,16 @@ import { compile } from "mdsvex";
import { env } from "$env/dynamic/private";
export const load: PageServerLoad = async () => {
return {
state: await fetch(env.VITE_API_URL + "/api/v1/state/announcements").then((res) => res.json()),
announcements: await fetch(env.VITE_API_URL + "/api/v1/announcements").then((res) => res.json()),
content: await fetch(env.VITE_API_URL + "/api/v1/announcements").then((res) => res.json()).then((res) => compile(res.title)).then((res) => res.code)
}
}
return {
state: await fetch(
env.VITE_API_URL + "/api/v1/state/announcements"
).then((res) => res.json()).catch(() => ({})),
announcements: await fetch(
env.VITE_API_URL + "/api/v1/announcements"
).then((res) => res.json()).catch(() => ({})),
content: await fetch(env.VITE_API_URL + "/api/v1/announcements")
.then((res) => res.json())
.then((res) => compile(res.title))
.then((res) => res?.code).catch(() => ({})),
};
};