{% extends 'base.html' %}

{% block content %}
<div class="uk-container uk-margin-top login__container">
    <h1 class="uk-text-center"><span>LOGIN</span></h1>
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <div class="uk-alert-danger" uk-alert>
                <a class="uk-alert-close" uk-close></a>
                {{ messages[0] }}
            </div>
        {% endif %}
    {% endwith %}
    <form class="uk-form-stacked" action="{{ url_for('login') }}" method="post">
        <div class="uk-margin">
            <label class="uk-form-label" for="form-stacked-text">Username</label>
            <div class="uk-form-controls">
                <input class="uk-input" id="form-stacked-text" type="text" placeholder="Username..." name="username">
            </div>
        </div>
        <div class="uk-margin">
            <label class="uk-form-label" for="form-stacked-text">Password</label>
            <div class="uk-form-controls">
                <input class="uk-input" id="form-stacked-text" type="password" placeholder="Password..." name="password">
            </div>
        </div>
        <div class="uk-margin">
            <button class="uk-button uk-button-default login__btn">Log In</button>
        </div>
    </form>
</div>
{% endblock %}
