{% extends "base.html" %}

{% block page_class %}page-narrow{% endblock %}

{% block subtitle %}
<p class="sub">First-run setup</p>
{% endblock %}

{% block content %}
  <section class="card">
    <h2 class="card-title">Create the admin account</h2>
    <p class="sub">This server has no users yet. The account you create here
      is the administrator: it can enroll other users and manage every
      frame. Any frame this server already knows about is linked to it
      automatically.</p>
    {% if error %}<div class="status err">{{ error }}</div>{% endif %}
    <form method="post" action="/setup">
      <label>Username
        <input type="text" name="username" maxlength="64" required autofocus autocomplete="username">
      </label>
      <label>Display name (optional)
        <input type="text" name="display_name" maxlength="64" autocomplete="name">
      </label>
      <label>Password
        <input type="password" name="password" minlength="8" required autocomplete="new-password">
      </label>
      <button type="submit">Create admin account</button>
    </form>
  </section>
{% endblock %}
