{% extends "layouts/base.html" %}

{% block title %} Login {% endblock %} 

<!-- Specific Page CSS goes HERE  -->
{% block stylesheets %}{% endblock stylesheets %}

{% block content %}

  <div class="row">
    <div class="col-md-5">
      <div class="card">
        <div class="card-header card-header-primary">
          <h4 class="card-title">
            Login
          </h4>
        </div>
        <div class="card-body">

          <h6 class="card-category">
              {% if msg %}
                <span class="text-danger">{{ msg | safe }}</span>
              {% else %}
                  Add your credentials
              {% endif %}  
          </h6>
          
          <br />

          <form role="form" method="post" action="">
              
            {% csrf_token %} 

            <div class="row">
              <div class="col-md-12">
                <div class="form-group">
                  <label class="bmd-label-floating">Username</label>
                  {{ form.username }}
                </div>
              </div>
            </div>

            <br />

            <div class="row">
              <div class="col-md-12">
                <div class="form-group">
                  <label class="bmd-label-floating">Password</label>
                  {{ form.password }}
                </div>
              </div>
            </div>

            <br />

            <button type="submit" name="login" class="btn btn-primary pull-left">Login</button>

            &nbsp; &nbsp; 
            <span class="pull-right">
              Don't have an account? <a href="{% url 'register' %}" class="text-primary">Create</a>
            </span>

            <div class="clearfix"></div>

          </form>
        </div>
      </div>
    </div>
  </div>

{% endblock content %}

<!-- Specific Page JS goes HERE  -->
{% block javascripts %}{% endblock javascripts %}
