{% extends "base.html" %}

{% block body %}
  <h1>Log In</h1>
  {{ error }}
  <hr>
  <p>
    <form method="POST">
      {% csrf_token %}
      <p>
        <div><input name="username" id="username" required type="text" pattern="[a-z0-9A-Z_][a-z0-9A-Z_\-]{0,28}[a-z0-9A-Z_]" maxlength="30" placeholder="Username"></div>
        <div><input name="password" id="password" required type="password" placeholder="Password" maxlength="100"></div>
      </p>
      <p><input type="submit" value="Log In"></p>
      {% if new_users %}
        <p><a href="/signup/{{ login_extra }}">Don't have an account?</a></p>
      {% endif %}
    </form>
  </p>
{% endblock %}
