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