]> git.r.bdr.sh - rbdr/forum/blobdiff - src/routes/__layout.svelte
Don't remember what this WIP was about
[rbdr/forum] / src / routes / __layout.svelte
index 234d26ac0d7ae32dffe7d78ba4156c1d40079c12..16ae5dc3f5aa535e307f8b70e65f9be974670e55 100644 (file)
@@ -1,46 +1,39 @@
-<script>
-       import '$/config/i18n';
+<script lang="ts">
+       import '../app.css';
+       import '$lib/i18n';
 
        import { isLoading } from 'svelte-i18n';
        import { _ } from 'svelte-i18n';
 
-       import { getForums } from '$/stores/forums';
+       import { forums } from '$lib/stores/forums';
 
-       import ErrorBlock from '$/components/error_block/error_block.svelte';
-       import ForumList from '$/components/forum_list/forum_list.svelte';
-       import Header from '$/components/header/header.svelte';
-       import Loader from '$/components/loader/loader.svelte';
-       import Footer from '$/components/footer/footer.svelte';
-
-       $: store = getForums();
-       $: forums = $store.data;
+       import ErrorBlock from '$lib/components/error_block/error_block.svelte';
+       import ForumList from '$lib/components/forum_list/forum_list.svelte';
+       import Header from '$lib/components/header/header.svelte';
+       import Loader from '$lib/components/loader/loader.svelte';
+       import Footer from '$lib/components/footer/footer.svelte';
 </script>
 
 {#if $isLoading}
        <Loader />
 {:else}
        <Header />
-       <main>
+       <main class="col-start-2 col-span-11">
                <slot />
        </main>
-  <nav title={$_('forum_list.title')}>
-    {#if $store.loading}
-      <Loader />
-    {/if}
-    {#if $store.error}
-      <ErrorBlock message={$_('forum_list.error.unavailable')} />
-    {/if}
-    {#if forums}
-      <ForumList forums={forums} />
-    {/if}
-  </nav>
+       <nav
+               class="col-start-1 row-start-2 border-r border-r-black border-solid"
+               title={$_('forum_list.title')}
+       >
+               {#if $forums.loading}
+                       <Loader />
+               {/if}
+               {#if $forums.error}
+                       <ErrorBlock message={$_('forum_list.error.unavailable')} />
+               {/if}
+               {#if $forums.data}
+                       <ForumList forums={$forums.data} />
+               {/if}
+       </nav>
        <Footer />
 {/if}
-
-<style>
-       nav {
-               grid-column: col-start 1;
-               grid-row: 2;
-               border-right: 1px solid black;
-       }
-</style>