aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/forum_list/forum_list.svelte
blob: c8b48bcc2508cb2dd758210bcd139967f25a6990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<script lang="ts">
	import type { Forum } from '$lib/data/types';

	export let forums: Forum[];

	import { _ } from 'svelte-i18n';
	$: sortedForums = forums.slice().sort((a, b) => a.position - b.position);
</script>

<ul class="p-0 pl-2">
	{#each sortedForums as forum}
		<li class="block text-left mb-5">
			<a class="no-underline text-blue-600 visited:text-purple-500" href="/f/{forum.id}">
				<span aria-hidden="true" class="block text-2xl {forum.glyph}">{forum.glyph}</span>
				<span class="navigation-label">{$_(forum.label)}</span>
			</a>
		</li>
	{/each}
</ul>

<style>
	.☽ {
		font-size: 2rem;
	}
</style>