<section id="authentication">
    <link href="/css/auth.css" rel="stylesheet">

    {% if account is not empty %}
    <h3 class="unselectable">Аккаунт</h3>
    <div id="account">
        <p><b class="unselectable">Почта:</b><span title="{{ account.mail }}">{{ account.mail }}</span></p>
        <a class="exit unselectable" type="button" href='/account/deauthentication'>Выход</a>
    </div>
    {% else %}
    <h3 class="unselectable">Аутентификация</h3>
    <form method="POST" accept-charset="UTF-8">
        <input type="text" name="mail" placeholder="Почта">
        <input type="password" name="password" placeholder="Пароль">

        <div class="submit">
            <label class="button unselectable fas fa-unlock" for="remember"
                onclick="return remember_switch(this);"></label>
            <input type="checkbox" name="remember" value="1">
            <input type="submit" value="Войти" onclick="return authentication(this.parentElement.parentElement);">
        </div>
        <input type="submit" class="registration" value="Зарегистрироваться"
            onclick="return registration(this.parentElement);">

        {% if errors is not empty %}
        {% if errors.account is not empty %}
        <ul class="errors">
            {% for error in errors.account %}
            <li>{{ error }}</li>
            {% endfor %}
        </ul>
        {% endif %}
        {% endif %}
    </form>
    {% endif %}

    <script type="text/javascript" src="/js/auth.js" defer></script>
</section>