Files
qbank/web/templates/login.html
T
Jānis Kacēns d9de37d3d8 Phase 2: auth, session management, layout, PWA manifest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 11:54:37 +03:00

33 lines
1.3 KiB
HTML

{{define "content"}}
<div class="max-w-sm mx-auto mt-12">
<h1 class="text-2xl font-bold mb-8 text-center text-gray-800">Sign in to QBank</h1>
{{if .Error}}
<div class="mb-4 text-sm text-red-700 bg-red-50 border border-red-200 px-4 py-3 rounded-md">
{{.Error}}
</div>
{{end}}
<form method="post" action="/login" class="space-y-4">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Username</label>
<input type="text" name="username" required autofocus
class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm shadow-sm
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" name="password" required
class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm shadow-sm
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
</div>
<button type="submit"
class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2.5 px-4 rounded-md
text-sm font-semibold shadow-sm">
Sign in
</button>
</form>
</div>
{{end}}