]> git.r.bdr.sh - rbdr/forum/blame - src/components/header/header.svelte
Mock config for tests
[rbdr/forum] / src / components / header / header.svelte
CommitLineData
bd8e98d7 1<script>
58f7d521
RBR
2 import { _ } from 'svelte-i18n';
3 import { version } from '$/config/config';
4 import { actions } from '$/stores/actions';
bd8e98d7 5
58f7d521 6 $: topic_id = $actions.topic_id;
bd8e98d7
RBR
7</script>
8
58f7d521
RBR
9<header title={$_('header.title')}>
10 <ul>
11 <li>
12 <strong
13 ><a href="/" aria-label={$_('header.long_version', { values: { version } })}
14 >{$_('header.short_version', { values: { version } })}</a
15 ></strong
16 >
17 </li>
18 <li>
19 <a href="/new" aria-label={$_('header.action.new.title')}
20 >{@html $_('header.action.new.display')}</a
21 >
22 </li>
23 {#if topic_id}
24 <li>
25 <a href="/reply/{topic_id}" aria-label={$_('header.action.reply.title')}
26 >{@html $_('header.action.reply.display')}</a
27 >
28 </li>
29 {/if}
30 <li>
31 <a href="/search" aria-label={$_('header.action.search.title')}
32 >{@html $_('header.action.search.display')}</a
33 >
34 </li>
35 <li>
36 <a href="/logout" aria-label={$_('header.action.log_out.title')}
37 >{@html $_('header.action.log_out.display')}</a
38 >
39 </li>
40 </ul>
bd8e98d7
RBR
41</header>
42
43<style>
58f7d521
RBR
44 header {
45 grid-column: col-start 1 / span 12;
46 border-bottom: 1px solid black;
47 }
bd8e98d7 48
58f7d521
RBR
49 ul {
50 padding: 0;
51 }
bd8e98d7 52
58f7d521
RBR
53 li {
54 display: inline;
55 margin: 5px;
56 }
bd8e98d7 57
58f7d521
RBR
58 a {
59 text-decoration: none;
60 line-height: 3em;
61 display: inline-block;
62 }
bd8e98d7 63
58f7d521
RBR
64 strong a {
65 color: blue;
66 text-decoration: underline;
67 }
bd8e98d7 68</style>