style changes + add desktop footer + add terms & stuff
This commit is contained in:
parent
bffae34b3e
commit
76b946d55c
13 changed files with 136 additions and 7 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
13
src/routes/privacy/+page.svelte
Normal file
13
src/routes/privacy/+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">Privacy Policy</p>
|
||||
|
||||
<SvelteShowdown {content} />
|
||||
</article>
|
||||
19
src/routes/privacy/+page.ts
Normal file
19
src/routes/privacy/+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/privacy');
|
||||
|
||||
if(resp.status === 404) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
const respJ = await resp.json();
|
||||
|
||||
const { content } = respJ;
|
||||
|
||||
return { content };
|
||||
}
|
||||
13
src/routes/rules/+page.svelte
Normal file
13
src/routes/rules/+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">Community Guidelines</p>
|
||||
|
||||
<SvelteShowdown {content} />
|
||||
</article>
|
||||
19
src/routes/rules/+page.ts
Normal file
19
src/routes/rules/+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/rules');
|
||||
|
||||
if(resp.status === 404) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
const respJ = await resp.json();
|
||||
|
||||
const { content } = respJ;
|
||||
|
||||
return { content };
|
||||
}
|
||||
13
src/routes/terms/+page.svelte
Normal file
13
src/routes/terms/+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">Terms of Service</p>
|
||||
|
||||
<SvelteShowdown {content} />
|
||||
</article>
|
||||
19
src/routes/terms/+page.ts
Normal file
19
src/routes/terms/+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/terms');
|
||||
|
||||
if(resp.status === 404) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
const respJ = await resp.json();
|
||||
|
||||
const { content } = respJ;
|
||||
|
||||
return { content };
|
||||
}
|
||||
|
|
@ -10,8 +10,6 @@ export async function load(event) {
|
|||
if(resp.status === 404) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const respJ = await resp.json();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue