First pass of authentication

This commit is contained in:
Leon Mika 2026-02-25 22:04:47 +11:00
parent c943864edc
commit 01c6e9de87
15 changed files with 311 additions and 42 deletions

12
views/layouts/bare.html Normal file
View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weiro</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/assets/main.css">
</head>
<body class="min-vh-100 d-flex flex-column">
{{ embed }}
</body>
</html>

19
views/login/login.html Normal file
View file

@ -0,0 +1,19 @@
<div class="mx-auto p-2" style="width: 400px; margin-block-start: 100px;">
<div class="text-center mb-3">
<h3>Weiro Login</h3>
</div>
<input type="hidden" name="_login_challenge" value="{{ .challenge }}">
<form action="/login" method="post">
<div class="mb-2">
<label for="login_username" class="form-label">Login</label>
<input type="email" class="form-control" id="login_username">
</div>
<div class="mb-3">
<label for="login_password" class="form-label">Password</label>
<input type="password" class="form-control" id="login_password">
</div>
<div class="mb-3 text-end">
<input type="submit" class="btn btn-primary" value="Login">
</div>
</form>
</div>