style changes + add desktop footer + add terms & stuff

This commit is contained in:
Yusur 2025-11-21 10:15:50 +01:00
parent bffae34b3e
commit 76b946d55c
13 changed files with 136 additions and 7 deletions

View file

@ -9,6 +9,7 @@ import type { ServerHealth, UserEntry } from '$lib/backend';
import { getFlash } from 'sveltekit-flash-message';
import { page } from "$app/state";
import FlashMessage from '$lib/FlashMessage.svelte';
import DesktopFooter from '$lib/DesktopFooter.svelte';
let { data, children } : {
data: {me: UserEntry},
@ -53,6 +54,8 @@ let colorThemeCls = $derived(`color-scheme-${colorScheme} color-theme-${colorThe
{@render children()}
</main>
<DesktopFooter />
<MobileFooter />
</div>

View 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">Privacy Policy</p>
<SvelteShowdown {content} />
</article>

View 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/privacy');
if(resp.status === 404) {
error(404);
}
const respJ = await resp.json();
const { content } = respJ;
return { content };
}

View 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">Community Guidelines</p>
<SvelteShowdown {content} />
</article>

19
src/routes/rules/+page.ts Normal file
View 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/rules');
if(resp.status === 404) {
error(404);
}
const respJ = await resp.json();
const { content } = respJ;
return { content };
}

View 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">Terms of Service</p>
<SvelteShowdown {content} />
</article>

19
src/routes/terms/+page.ts Normal file
View 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/terms');
if(resp.status === 404) {
error(404);
}
const respJ = await resp.json();
const { content } = respJ;
return { content };
}

View file

@ -10,8 +10,6 @@ export async function load(event) {
if(resp.status === 404) {
error(404);
}
const respJ = await resp.json();