]> git.r.bdr.sh - rbdr/forum/blame - src/lib/components/forum_list/forum_list.svelte
Don't remember what this WIP was about
[rbdr/forum] / src / lib / components / forum_list / forum_list.svelte
CommitLineData
a7cf03c1 1<script lang="ts">
be1ce532
RBR
2 import type { Forum } from '$lib/data/types';
3
4 export let forums: Forum[];
879fa389 5
be1ce532 6 import { _ } from 'svelte-i18n';
6ccc6f60 7 $: sortedForums = forums.slice().sort((a, b) => a.position - b.position);
890274a7
BB
8</script>
9
852ee620 10<ul class="p-0 pl-2">
cac85db0 11 {#each sortedForums as forum}
852ee620
RBR
12 <li class="block text-left mb-5">
13 <a class="no-underline text-blue-600 visited:text-purple-500" href="/f/{forum.id}">
14 <span aria-hidden="true" class="block text-2xl {forum.glyph}">{forum.glyph}</span>
cac85db0
RBR
15 <span class="navigation-label">{$_(forum.label)}</span>
16 </a>
17 </li>
18 {/each}
879fa389 19</ul>
66dc4cae
BB
20
21<style>
58f7d521
RBR
22 .☽ {
23 font-size: 2rem;
24 }
66dc4cae 25</style>