]> git.r.bdr.sh - rbdr/forum/blame - src/routes/__layout.svelte
Remove icloud files
[rbdr/forum] / src / routes / __layout.svelte
CommitLineData
cac85db0
RBR
1<script lang="ts">
2 import '../app.css';
a7cf03c1 3 import '$lib/i18n';
879fa389 4
58f7d521 5 import { isLoading } from 'svelte-i18n';
879fa389
RBR
6 import { _ } from 'svelte-i18n';
7
a7cf03c1 8 import { getForums } from '$lib/stores/forums';
879fa389 9
a7cf03c1
RBR
10 import ErrorBlock from '$lib/components/error_block/error_block.svelte';
11 import ForumList from '$lib/components/forum_list/forum_list.svelte';
12 import Header from '$lib/components/header/header.svelte';
13 import Loader from '$lib/components/loader/loader.svelte';
14 import Footer from '$lib/components/footer/footer.svelte';
73973eda
RBR
15
16 $: store = getForums();
17 $: forums = $store.data;
58f7d521
RBR
18</script>
19
20{#if $isLoading}
21 <Loader />
22{:else}
23 <Header />
24 <main>
25 <slot />
26 </main>
cac85db0
RBR
27 <nav title={$_('forum_list.title')}>
28 {#if $store.loading}
29 <Loader />
30 {/if}
31 {#if $store.error}
32 <ErrorBlock message={$_('forum_list.error.unavailable')} />
33 {/if}
34 {#if forums}
35 <ForumList {forums} />
36 {/if}
37 </nav>
58f7d521
RBR
38 <Footer />
39{/if}
879fa389
RBR
40
41<style>
42 nav {
43 grid-column: col-start 1;
44 grid-row: 2;
45 border-right: 1px solid black;
46 }
47</style>