]>
Commit | Line | Data |
---|---|---|
1 | <script lang="ts"> | |
2 | import '../app.css'; | |
3 | import '$lib/i18n'; | |
4 | ||
5 | import { isLoading } from 'svelte-i18n'; | |
6 | import { _ } from 'svelte-i18n'; | |
7 | ||
8 | import { forums } from '$lib/stores/forums'; | |
9 | ||
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'; | |
15 | </script> | |
16 | ||
17 | {#if $isLoading} | |
18 | <Loader /> | |
19 | {:else} | |
20 | <Header /> | |
21 | <main class="col-start-2 col-span-11"> | |
22 | <slot /> | |
23 | </main> | |
24 | <nav | |
25 | class="col-start-1 row-start-2 border-r border-r-black border-solid" | |
26 | title={$_('forum_list.title')} | |
27 | > | |
28 | {#if $forums.loading} | |
29 | <Loader /> | |
30 | {/if} | |
31 | {#if $forums.error} | |
32 | <ErrorBlock message={$_('forum_list.error.unavailable')} /> | |
33 | {/if} | |
34 | {#if $forums.data} | |
35 | <ForumList forums={$forums.data} /> | |
36 | {/if} | |
37 | </nav> | |
38 | <Footer /> | |
39 | {/if} |