aboutsummaryrefslogtreecommitdiff
path: root/src/components/header/header.svelte
blob: f33e77bf445cdb38fb17176f3a259e8f6031088e (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<script>
	import { _ } from 'svelte-i18n';
	import { version } from '$/config/config';
	import { actions } from '$/stores/actions';

	$: topic_id = $actions.topic_id;
</script>

<header title={$_('header.title')}>
	<ul>
		<li>
			<strong
				><a href="/" aria-label={$_('header.long_version', { values: { version } })}
					>{$_('header.short_version', { values: { version } })}</a
				></strong
			>
		</li>
		<li>
			<a href="/new" aria-label={$_('header.action.new.title')}
				>{@html $_('header.action.new.display')}</a
			>
		</li>
		{#if topic_id}
			<li>
				<a href="/reply/{topic_id}" aria-label={$_('header.action.reply.title')}
					>{@html $_('header.action.reply.display')}</a
				>
			</li>
		{/if}
		<li>
			<a href="/search" aria-label={$_('header.action.search.title')}
				>{@html $_('header.action.search.display')}</a
			>
		</li>
		<li>
			<a href="/logout" aria-label={$_('header.action.log_out.title')}
				>{@html $_('header.action.log_out.display')}</a
			>
		</li>
	</ul>
</header>

<style>
	header {
		grid-column: col-start 1 / span 12;
		border-bottom: 1px solid black;
	}

	ul {
		padding: 0;
	}

	li {
		display: inline;
		margin: 5px;
	}

	a {
		text-decoration: none;
		line-height: 3em;
		display: inline-block;
	}

	strong a {
		color: blue;
		text-decoration: underline;
	}
</style>