{% extends '_layout.html' %}

{% block content %}
    <div class="columns">
        <div class="column is-one-third is-offset-one-third">
            <div class="box">
                <h1 class="title has-text-centered">Log in</h1>
                <form method="POST" action="/login?next={{ next | safe }}">
                    {{ form.csrf_token }}
                    <div class="field">
                        <label class="label is-small">{{ form.username.label }}</label>
                        <p class="control has-icons-left has-icons-right">
                            {{ form.username(size=24, class_="input") }}
                            <span class="icon is-small is-left">
                        <i class="fas fa-envelope"></i>
                    </span>
                        </p>
                    </div>
                    <div class="field">
                        <label class="label is-small">{{ form.password.label }}</label>
                        <p class="control has-icons-left">
                            {{ form.password(size=24, class_="input") }}
                            <span class="icon is-small is-left">
                        <i class="fas fa-lock"></i>
                    </span>
                        </p>
                    </div>
                    <div class="buttons has-addons is-right pt-3">
                        <input class="button is-primary is-outlined" type="submit" value="Login"/>
                    </div>
                </form>
            </div>
        </div>
    </div>
{% endblock %}