{% extends "account/login.html" %}
{% load i18n %}
{% load allauth_ui %}
{% load widget_tweaks %}
{% block content %}
    {% trans "Sign In" as heading %}
    {% #container heading=heading  %}
    {% if not SOCIALACCOUNT_ONLY %}
        <div class="py-3">
            {% blocktranslate %}If you have not created an account yet, then please
            <a class="link" href="{{ signup_url }}">sign up</a> first.{% endblocktranslate %}
        </div>
        {% url 'account_login' as action_url %}
        {% #form form=form url=action_url button_text=heading %}
        {% if form.remember %}
        <div class="items-start my-2 form-control">
            <label class="cursor-pointer label">
                {% render_field form.remember class="checkbox checkbox-accent" %}
                <span class="ml-2 label-text">{% trans "Remember me" %}</span>
            </label>
        </div>
        {% endif %}
        {{ redirect_field }}
        {% csrf_token %}
        <div class="flex flex-col">
            <a class="link self-end text-sm"
               href="{% url "account_reset_password" %}">{% trans "Forgot password?" %}</a>
        </div>
        {% /form %}
    {% endif %}
    {% if LOGIN_BY_CODE_ENABLED %}
        <div class="divider divider-neutral"></div>
        <a href="{{ request_login_code_url }}" class="btn btn-neutral">{% trans "Mail me a sign-in code" %}</a>
    {% endif %}
    {% if SOCIALACCOUNT_ENABLED %}
        {% include "socialaccount/snippets/login.html" with page_layout="entrance" %}
    {% endif %}
    {% /container %}
{% endblock content %}
