]> git.r.bdr.sh - rbdr/forum/blame - src/routes/__layout.svelte
Don't remember what this WIP was about
[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
852ee620 8 import { forums } 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';
58f7d521
RBR
15</script>
16
17{#if $isLoading}
18 <Loader />
19{:else}
20 <Header />
be1ce532 21 <main class="col-start-2 col-span-11">
58f7d521
RBR
22 <slot />
23 </main>
be1ce532 24 <nav
852ee620 25 class="col-start-1 row-start-2 border-r border-r-black border-solid"
be1ce532
RBR
26 title={$_('forum_list.title')}
27 >
852ee620 28 {#if $forums.loading}
cac85db0
RBR
29 <Loader />
30 {/if}
852ee620 31 {#if $forums.error}
cac85db0
RBR
32 <ErrorBlock message={$_('forum_list.error.unavailable')} />
33 {/if}
852ee620
RBR
34 {#if $forums.data}
35 <ForumList forums={$forums.data} />
cac85db0
RBR
36 {/if}
37 </nav>
58f7d521
RBR
38 <Footer />
39{/if}