{% extends "nopaque.html.j2" %}

{% set headline = ' ' %}

{% block page_content %}
<style>
  main {
    background-image: url("{{ url_for('static', filename='images/parallax_lq/04_german_text_book_paper.jpg') }}");
    background-repeat: no-repeat;
    background-size: cover;
  }
</style>

<div class="col s12 m4">
  <div class="card medium">
    <div class="card-content">
      <h2>Log in</h2>
      <p>Want to boost your research and get going? nopaque is free and no download is needed. Register now!</p>
    </div>
    <div class="card-action right-align">
      <a class="btn" href="{{ url_for('auth.register') }}"><i class="material-icons left">person_add</i>Register</a>
    </div>
  </div>
</div>

<div class="col s12 m8">
  <div class="card medium">
    <form method="POST">
      <div class="card-content">
        {{ login_form.hidden_tag() }}
        <div class="input-field">
          <i class="material-icons prefix">person</i>
          {{ login_form.user(class='validate') }}
          {{ login_form.user.label }}
          {% for error in login_form.user.errors %}
            <span class="helper-text red-text">{{ error }}</span>
          {% endfor %}
        </div>
        <div class="input-field">
          <i class="material-icons prefix">vpn_key</i>
          {{ login_form.password(class='validate') }}
          {{ login_form.password.label }}
          {% for error in login_form.password.errors %}
            <span class="helper-text red-text">{{ error }}</span>
          {% endfor %}
        </div>
        <div class="row" style="margin-bottom: 0;">
          <div class="col s6 left-align">
            <a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a>
          </div>
          <div class="col s6 right-align">
            <div class="switch">
              <label>
                Remember me
                {{ login_form.remember_me(class='validate') }}
                <span class="lever"></span>
              </label>
            </div>
          </div>
        </div>
      </div>
      <div class="card-action right-align">
        {{ macros.submit_button(login_form.submit) }}
      </div>
    </form>
  </div>
</div>
{% endblock %}
