{% extends 'components/shell.html' %}
{% block content %}
<section class="site-section site-section--login">
  <h1 class="site-section__heading">Login</h1>
  <p class="site-section__register-cta">
    Don't have an account? <a href="{{ url_for('account.get_register', location=location) }}">Register!</a> Your favorites will automatically be saved.
  </p>
  <form
    id="login_form"
    class="form"
    method="POST"
    action="{{ url_for('account.post_login') }}"
  >
    <input type="hidden" name="location" value="{{location}}" />

    <div class="form__section">
      <label class="form__label" for="old-username">
        Username:
      </label>
      <input
        id="old-username"
        class="form__input"
        type="text"
        name="username"/>
    </div>

    <div class="form__section">
      <label class="form__label" for="old-password">
        Password:
      </label>
      <input
        id="old-password"
        class="form__input"
        type="password"
        name="password"
        autocomplete="current-password"
      >
    </div>

    <div class="form__section">
      <button
        class="form__button form__button--submit"
        type="submit"
      >
        Login
      </button>
    </div>
  </form>
</section>
{% endblock %}
