summaryrefslogtreecommitdiff
path: root/app/src/routes/login/+page.svelte
blob: 3e3e3c7f5a1ea959eb2933bed3b02b54b10bd02c (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
<script lang="ts">
	import { enhance } from "$app/forms";
	import type { PageProps } from "./$types";
	let { data, form }: PageProps = $props();
</script>

<svelte:head>
	<title>Log ind</title>
</svelte:head>

<!-- If login completed successfully and we dont have ?redirectTo -->
{#if form?.success}
	<p>Du er nu logget ind!</p>
{/if}

<form method="POST" use:enhance>
	{#if form?.failure}<p class="error">{form?.error}</p>{/if}
	<label>
		Email
		<input name="email" type="email" />
	</label>
	<label>
		Kodeord
		<input name="password" type="password" />
	</label>
	<button>Log ind</button>
</form>

<style>
	label {
		display: block;
	}
</style>