{% extends "base-site.html" %}

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

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

{% block content %}

        <div class="row">
          <div class="col-md-8">
            <div class="card">

              <form role="form" method="post" action="">
              
                {{ form.hidden_tag() }} 

                <div class="card-header">
                  <h5 class="title">Login</h5>

                  <h6 class="card-category">
                      {% if msg %}
                        <span class="text-danger">{{ msg | safe }}</span>
                      {% else %}
                      <span>
                        Use default credentials: test / pass
                        <br />
                        OR <a href={{ url_for('base_blueprint.create_user') }} >create your own user</a>
                      </span>
                      {% endif %}  
                  </h6>
                </div>

                <div class="card-body">

                    <div class="row">

                      <div class="col-md-3 px-md-1">
                        <div class="form-group">
                          <label>Username</label>
                          {{ form.username(class="form-control") }}
                        </div>
                      </div>

                    </div>
                    <div class="row">

                      <div class="col-md-3 px-md-1">
                        <div class="form-group">
                          <label>Password</label>
                          {{ form.password(class="form-control", type="password") }}
                        </div>
                      </div>

                    </div>
                    
                </div>
                <div class="card-footer">
                  <button type="submit" name="login" class="btn btn-fill btn-primary">Login</button>
                  &nbsp; &nbsp;
                  Don't have an account? <a href="{{ url_for('base_blueprint.create_user') }}" class="text-primary">Create</a>
                </div>

              </form>

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


{% endblock content %}

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