]>
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 { getForums } 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 | ||
16 | $: store = getForums(); | |
17 | $: forums = $store.data; | |
18 | </script> | |
19 | ||
20 | {#if $isLoading} | |
21 | <Loader /> | |
22 | {:else} | |
23 | <Header /> | |
24 | <main> | |
25 | <slot /> | |
26 | </main> | |
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> | |
38 | <Footer /> | |
39 | {/if} | |
40 | ||
41 | <style> | |
42 | nav { | |
43 | grid-column: col-start 1; | |
44 | grid-row: 2; | |
45 | border-right: 1px solid black; | |
46 | } | |
47 | </style> |