save username in cookie

This commit is contained in:
Florian Hoss 2022-04-04 11:40:34 +02:00
parent 539a36dffe
commit 2d98665f92
7 changed files with 149 additions and 95 deletions

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ .title }}</title>
{{template "head" .}}
</head>
<body>
{{template "navbar" .}}
<div class="position-absolute top-50 start-50 translate-middle">
<div class="fs-3">{{ .title }}</div>
<hr>
</div>
{{template "scripts" .}}
<script>
userLoggedIn().then((loggedIn) => !loggedIn && redirect("/login"));
</script>
</body>
</html>