]>
Commit | Line | Data |
---|---|---|
1 | <script> | |
2 | import '$/config/i18n'; | |
3 | ||
4 | import { isLoading } from 'svelte-i18n'; | |
5 | import { _ } from 'svelte-i18n'; | |
6 | ||
7 | import { getForums } from '$/stores/forums'; | |
8 | ||
9 | import ErrorBlock from '$/components/error_block/error_block.svelte'; | |
10 | import ForumList from '$/components/forum_list/forum_list.svelte'; | |
11 | import Header from '$/components/header/header.svelte'; | |
12 | import Loader from '$/components/loader/loader.svelte'; | |
13 | import Footer from '$/components/footer/footer.svelte'; | |
14 | ||
15 | $: store = getForums(); | |
16 | $: forums = $store.data; | |
17 | </script> | |
18 | ||
19 | {#if $isLoading} | |
20 | <Loader /> | |
21 | {:else} | |
22 | <Header /> | |
23 | <main> | |
24 | <slot /> | |
25 | </main> | |
26 | <nav title={$_('forum_list.title')}> | |
27 | {#if $store.loading} | |
28 | <Loader /> | |
29 | {/if} | |
30 | {#if $store.error} | |
31 | <ErrorBlock message={$_('forum_list.error.unavailable')} /> | |
32 | {/if} | |
33 | {#if forums} | |
34 | <ForumList forums={forums} /> | |
35 | {/if} | |
36 | </nav> | |
37 | <Footer /> | |
38 | {/if} | |
39 | ||
40 | <style> | |
41 | nav { | |
42 | grid-column: col-start 1; | |
43 | grid-row: 2; | |
44 | border-right: 1px solid black; | |
45 | } | |
46 | </style> |