{% extends "root.html" %}
{% block inner %}
<div class="hero min-h-screen bg-base-200">
<div class="hero-content flex-col lg:flex-row-reverse">
<div class="text-center lg:text-left">
<h1 class="text-5xl font-bold">Register</h1>
<p class="py-6">Create your account to access the dank macro stash.</p>
{% if invite_token %}
<div class="alert alert-success">
<i class="fas fa-envelope-open-text"></i>
<span>You're using an invite link. The token has been pre-filled below.</span>
</div>
{% elif registration_open %}
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<span>Open registration is enabled. You still need a valid invite token to register.</span>
</div>
{% endif %}
</div>
<div class="card flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100">
<form class="card-body" action="/auth/register" method="post">
<div class="form-control">
<label class="label"><span class="label-text">Username</span></label>
<input type="text" name="username" placeholder="Choose a username" class="input input-bordered" required autofocus/>
</div>
<div class="form-control">
<label class="label"><span class="label-text">Email</span></label>
<input type="email" name="email" placeholder="your@email.com" class="input input-bordered" required/>
</div>
<div class="form-control">
<label class="label"><span class="label-text">Password</span></label>
<input type="password" name="password" placeholder="Password" class="input input-bordered" required/>
</div>
<div class="form-control">
<label class="label"><span class="label-text">Confirm Password</span></label>
<input type="password" name="confirm_password" placeholder="Confirm Password" class="input input-bordered" required/>
</div>
<div class="form-control">
<label class="label"><span class="label-text">Registration Token</span></label>
<input
type="text"
name="registration_token"
placeholder="Enter your invite token"
class="input input-bordered{% if invite_token %} input-disabled{% endif %}"
value="{{ invite_token or '' }}"
{% if invite_token %}readonly{% endif %}
required
/>
</div>
<div class="form-control mt-6">
<button class="btn btn-primary" type="submit">
<i class="fas fa-user-plus mr-2"></i>
Register
</button>
</div>
<div class="text-center mt-4">
<p class="text-sm">
Already have an account?
<a href="/login" class="link link-primary">Login here</a>
</p>
</div>
</form>
</div>
</div>
</div>
{% endblock %}
⭐
Log in to mark this repository.
3.3 KiB · text
History
1ce9641