add login/register/reset/logout views

This commit is contained in:
2025-01-05 23:54:50 +01:00
parent 273918f542
commit 48491d0786
7 changed files with 271 additions and 25 deletions

View File

@@ -1,6 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title> {{ .title }}</title>
</head>
<body>
<html lang="en">
<head>
<title>FreiRaum</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/static/output.css" rel="stylesheet">
</head>
<body>
<nav class="bg-gray-800">
<div class="mx-auto max-w-7xl px-4 sm:px-8 lg:px-8">
<div class="relative flex h-16 items-center justify-between">
<div class="flex flex-1 items-center">
<div class="flex shrink-0">
<img class="h-8 w-auto" src="https://tailwindui.com/plus/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
</div>
<!--
{{ if .loggedIn }}
<div class="hidden sm:ml-6 sm:block">
<div class="flex space-x-4">
<a href="#" class="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Logged In</a>
</div>
</div>
{{ end }}
-->
</div>
{{ if .loggedIn }}
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 px-4 sm:px-8">
<a href="settings" class="rounded-md bg-gray-900 m-2 px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Settings</a>
<a href="logout" class="rounded-md bg-gray-900 m-2 px-3 py-2 text-sm font-medium text-red-300 hover:bg-gray-700 hover:text-white">Logout</a>
</div>
{{ else }}
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 px-4 sm:px-8">
<a href="login" class="rounded-md bg-gray-900 m-2 px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Login</a>
<a href="register" class="rounded-md bg-gray-900 m-2 px-3 py-2 text-sm font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Register</a>
</div>
{{ end }}
</div>
</div>
<!-- Mobile menu, show/hide based on menu state. -->
<!--
{{ if .loggedIn }}
<div class="sm:hidden" id="mobile-menu">
<div class="space-y-1 px-2 pb-3 pt-2">
<a href="#" class="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-gray-700 hover:text-white">Logged In</a>
</div>
</div>
{{ end }}
-->
</nav>