aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Header.svelte
blob: 6ab7a336130989ef974a1d73e52fa982a37e3221 (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
<script lang="ts">
	import { enhance } from '$lib/form'

	export let backArrowHref = '/'
</script>

<header id="main-header">
	<a href={backArrowHref} class="back-arrow-anchor" aria-label="back">
		<svg class="back-arrow" height="33" width="23">
			<path d="M 14 0 l -13 13 l 13 13" stroke-width="2" fill="none" />
		</svg>
	</a>
	<form action="/player" method="post" class="user-form" use:enhance>
		<!-- use:enhance={{
			result: async ({ form }) => {
				form.reset()
			},
		}} -->
		<input
			class="enter-username-button"
			type="text"
			placeholder="Enter username"
			name="user-search"
			autocomplete="off"
			autocorrect="off"
			autocapitalize="off"
			spellcheck="false"
			aria-label="Enter username"
		/>
	</form>
</header>