Add login and auth
This commit is contained in:
3
templates/components/login_error.html
Normal file
3
templates/components/login_error.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="text-danger">
|
||||
{{ .message }}
|
||||
</div>
|
||||
24
templates/login.html
Normal file
24
templates/login.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
{{ template "header" . }}
|
||||
</head>
|
||||
<body data-bs-theme="dark" class="h-auto">
|
||||
<div class="container-fluid bg-dark mt-5 p-4 rounded-3 text-light text-center" style="max-width: 500px;">
|
||||
<h3>Login</h3>
|
||||
<hr>
|
||||
<form hx-post="/login" hx-target="#login-result">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" type="text" id="username" name="username" placeholder="Username" required>
|
||||
<label for="username">Username</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<input class="form-control form-control-lg" type="password" id="password" name="password" placeholder="Passwort" required>
|
||||
<label for="password">Passwort</label>
|
||||
</div>
|
||||
<button class="btn btn-lg btn-primary mt-3" type="submit">Anmelden</button>
|
||||
</form>
|
||||
<div id="login-result" class="mt-4 fs-4"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user