CurseTechnique/templates/signup.html

31 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block title %}Sign Up{% endblock %}
{% block content %}
<section class="mx-auto max-w-md rounded-3xl border border-slate-200/80 bg-white/90 p-6 shadow-sm">
<h1 class="text-2xl font-bold tracking-tight">Create Account</h1>
<p class="mt-2 text-sm text-slate-600">First account created becomes admin.</p>
{% if !page.allow_signup %}
<p class="mt-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800">Sign-up is disabled by server config.</p>
{% endif %}
{% if !page.error.is_empty() %}
<p class="mt-3 rounded-lg border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-700">{{ page.error }}</p>
{% endif %}
<form method="post" action="/signup" class="mt-4 grid gap-3">
<input type="text" name="username" placeholder="Username" required class="rounded-lg border border-slate-300 px-3 py-2 text-sm" />
<input type="password" name="password" placeholder="Password (min 4 chars)" required minlength="4" class="rounded-lg border border-slate-300 px-3 py-2 text-sm" />
<input
type="text"
name="timezone"
value="{{ page.timezone_value }}"
placeholder="Timezone (UTC, -08:00, +05:30)"
required
class="rounded-lg border border-slate-300 px-3 py-2 text-sm"
/>
<button type="submit" class="rounded-lg bg-slate-900 px-4 py-2 text-sm font-semibold text-white hover:bg-slate-700" {% if !page.allow_signup %}disabled{% endif %}>Sign Up</button>
</form>
<p class="mt-3 text-sm text-slate-600">Already have an account? <a class="font-semibold text-slate-900 underline" href="/login">Sign in</a></p>
</section>
{% endblock %}