Apply the new design-system primitives across the remaining pages so the whole app shares one visual language: - Auth/entry: redesigned index, login, register (centered card layout, SVG icons, semantic tokens) - Admin: sidebar nav with icons, cohesive admin dashboard/users/library/ processing-issues/settings (tables use border-line + hover states; scan/websocket attributes preserved) - Secondary: analytics (stat cards), devices, progress, conflicts, queue, profile + form/modal all migrated to .card/.btn/.input primitives and SVG action icons - Docs + API explorer + setup wizard + collection/rules/modals + unlinked books + book-detail modals: consistent chrome, modal scrims use --surface-overlay, close buttons use icon-btn - reader.templ and error.templ intentionally left unchanged
73 lines
3.8 KiB
Templ
73 lines
3.8 KiB
Templ
package templates
|
|
|
|
templ Register() {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>Register - Bookhoard</title>
|
|
<script src="/static/htmx.min.js"></script>
|
|
<script type="module" src="/static/main.js"></script>
|
|
<link href="/static/style.css" rel="stylesheet"/>
|
|
</head>
|
|
<body class="theme-tokyo-night flex min-h-screen items-center justify-center px-4 py-8" x-data="register" x-init="initRegisterTheme()">
|
|
<div class="w-full max-w-md">
|
|
<div class="mb-6 flex items-center justify-center gap-2 text-2xl font-bold tracking-tight text-content">
|
|
@Icon("book-open", "h-7 w-7 text-brand")
|
|
Bookhoard
|
|
</div>
|
|
<div class="card p-6">
|
|
<h1 class="mb-5 text-xl font-bold text-content">Create your account</h1>
|
|
<form hx-post="/api/auth/register" hx-target="#result" hx-swap="innerHTML" class="space-y-4">
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Email</label>
|
|
<input type="email" id="email" name="email" class="input" required/>
|
|
</div>
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Username</label>
|
|
<input type="text" id="username" name="username" class="input" required/>
|
|
</div>
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">First Name</label>
|
|
<input type="text" name="first_name" placeholder="Optional" class="input"/>
|
|
</div>
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Last Name</label>
|
|
<input type="text" name="last_name" placeholder="Optional" class="input"/>
|
|
</div>
|
|
</div>
|
|
<div id="password-requirements" class="rounded-xl border border-line bg-surface p-4 text-sm">
|
|
<p class="mb-2 font-semibold text-content">Password Requirements</p>
|
|
<ul class="space-y-1.5 text-content-muted">
|
|
<li id="req-length" class="flex items-center gap-2"><span class="requirement-icon">○</span> At least 8 characters</li>
|
|
<li id="req-upper" class="flex items-center gap-2"><span class="requirement-icon">○</span> One uppercase letter</li>
|
|
<li id="req-lower" class="flex items-center gap-2"><span class="requirement-icon">○</span> One lowercase letter</li>
|
|
<li id="req-number" class="flex items-center gap-2"><span class="requirement-icon">○</span> One number</li>
|
|
<li id="req-special" class="flex items-center gap-2"><span class="requirement-icon">○</span> One special character</li>
|
|
<li id="req-match" class="flex items-center gap-2"><span class="requirement-icon">○</span> Passwords match</li>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Password</label>
|
|
<input type="password" id="password" name="password" class="input" required/>
|
|
</div>
|
|
<div>
|
|
<label class="mb-1.5 block text-xs font-semibold uppercase tracking-wide text-content-muted">Confirm Password</label>
|
|
<input type="password" id="confirm-password" name="confirm_password" class="input" required/>
|
|
</div>
|
|
<button type="submit" id="register-btn" class="btn btn-primary w-full opacity-50 cursor-not-allowed" disabled>
|
|
Register
|
|
</button>
|
|
</form>
|
|
<div id="result" class="mt-4 text-center text-sm"></div>
|
|
<div class="mt-4 border-t border-line pt-4 text-center">
|
|
<a href="/login" class="text-sm text-content-muted transition-colors hover:text-content">Already have an account? Login</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
}
|