- Alle fehler-Boxen: role=alert + tabindex=-1 - Login: aria-invalid/aria-describedby auf Feldern bei Fehler - Pflichtfelder: aria-required=true ergänzt
45 lines
2.3 KiB
HTML
45 lines
2.3 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Anmelden — {{ app_name }}</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
</head>
|
|
<body class="bg-slate-100 text-slate-800 min-h-screen flex items-center justify-center px-4">
|
|
<div class="bg-white shadow-md rounded-xl p-8 w-full max-w-sm">
|
|
<h1 class="text-xl font-bold mb-1 flex items-center gap-2">{% from "icons.html" import icon_wuerfelbecher %}{{ icon_wuerfelbecher("h-6 w-6 text-emerald-700") }} {{ app_name }}</h1>
|
|
<p class="text-sm text-slate-500 mb-6">Bitte anmelden.</p>
|
|
{% if fehler %}
|
|
<div id="login-fehler" class="mb-4 rounded-lg border border-red-300 bg-red-50 text-red-700 text-sm px-3 py-2" role="alert" tabindex="-1">
|
|
{{ fehler }}
|
|
</div>
|
|
{% endif %}
|
|
<form method="post" action="/login" class="space-y-4">
|
|
<div>
|
|
<label for="username" class="block text-sm font-medium mb-1">Benutzername</label>
|
|
<input id="username" name="username" value="{{ username }}" required autocomplete="username"
|
|
{% if fehler %}aria-invalid="true" aria-describedby="login-fehler"{% endif %}
|
|
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-emerald-500">
|
|
</div>
|
|
<div>
|
|
<label for="password" class="block text-sm font-medium mb-1">Passwort</label>
|
|
<input id="password" name="password" type="password" required autocomplete="current-password"
|
|
{% if fehler %}aria-invalid="true" aria-describedby="login-fehler"{% endif %}
|
|
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-emerald-500">
|
|
</div>
|
|
<button type="submit"
|
|
class="w-full min-h-[44px] bg-emerald-600 hover:bg-emerald-700 active:bg-emerald-800 text-white font-medium rounded-lg px-3 py-2">
|
|
Anmelden
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<div class="mt-6 text-center">
|
|
<a href="https://boardgamegeek.com" target="_blank" rel="noopener noreferrer">
|
|
<img src="/static/powered-by-bgg.png" alt="Powered by BoardGameGeek"
|
|
width="120" height="35" class="inline-block opacity-80 hover:opacity-100">
|
|
</a>
|
|
</div>
|
|
</body>
|
|
</html>
|