{% extends "base.html"%}
{% block content %}
<div class="hold-transition login-page">
<div class="login-box">
  <div class="login-logo">
    <a></a><b>Login</b></a>
  </div>
  <!-- /.login-logo -->
  <div class="card">
    <div class="card-body login-card-body">
      <p class="login-box-msg">Sign in to start your session</p>

      <form action="" method="POST">
        {% csrf_token %}
        <div class="input-group mb-3">
          <input type="email" class="form-control" name="username"  minlength="4"  maxlength="40" placeholder="Email">
          <div class="input-group-append">
            <div class="input-group-text">
              <span class="fas fa-envelope"></span>
            </div>
          </div>
        </div>
        <div class="input-group mb-3">
          <input type="password" class="form-control" name="password" maxlength="40" placeholder="Password">
          <div class="input-group-append">
            <div class="input-group-text">
              <span class="fas fa-lock"></span>
            </div>
          </div>
        </div>
        <div class="message" id="message">{% if messages %}
            <ul class="list">
               {% for message in messages %}
               {% if message|stringformat:"s" == "link sent" or message|stringformat:"s" == "changed" or message|stringformat:"s" == "error" %}
               {% else %}
                   <li >{{ message }}</li>
                   {% endif %}
               {% endfor %}
            </ul>
            {% endif %}</div> 
          <!-- /.col -->
          <div class="d-flex d-flex justify-content-between">
            <div class="">
            <button type="submit" class="btn btn-primary btn-block">Sign In</button></div>
            <div class=""><a href="/password_reset/">Reset password</a></div>
          </div>
        
  
          <!-- /.col -->
        </div>
      </form>
    </div>
    <!-- /.login-card-body -->
  </div>
<!-- /.login-box -->

</div>
{% endblock %}
