{% extends "base.html" %}
{% block content %}
<h1>Register</h1>
{% if let Some(err) = error %}
<p class="error">{{ err }}</p>
{% endif %}
<form method="POST" action="/register">
  <label>
    Username<br>
    <small>2–30 chars: letters, digits, underscores, hyphens. This becomes your ActivityPub handle.</small><br>
    <input type="text" name="username" required autocomplete="username"
           pattern="[a-z0-9_\-]{2,30}" title="2–30 lowercase letters, digits, underscores or hyphens">
  </label>
  <label>
    Email<br>
    <input type="email" name="email" required autocomplete="email">
  </label>
  <label>
    Password<br>
    <input type="password" name="password" required autocomplete="new-password">
  </label>
  <input type="hidden" name="_csrf" value="{{ ctx.csrf_token }}">
  <button type="submit">Register</button>
</form>
{% endblock %}
