]> git.r.bdr.sh - rbdr/forum/blob - src/lib/components/forum/forum.svelte
e9841a94862a09c3c3507844e18804783b536b7b
[rbdr/forum] / src / lib / components / forum / forum.svelte
1 <script lang="ts">
2 import type { Forum } from '$lib/data/types';
3 import { topicsForForum } from '$lib/stores/topics';
4
5 export let forum: Forum;
6
7 import { _ } from 'svelte-i18n';
8 import TopicSummary from '$lib/components/topic_summary/topic_summary.svelte';
9 </script>
10
11 <h1 class="py-4 font-bold text-3xl">{forum.glyph} {$_(forum.label)}</h1>
12 <ul class="list-disc list-inside pl-2">
13 {#if forum.topics}
14 {#each forum.topics as topic}
15 <TopicSummary {topic} />
16 {/each}
17 {/if}
18 </ul>