{% load static %}

<!DOCTYPE html>
<html lang="es">
    <head>
        <meta charset="utf-8">

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        {% block ecom_statics_metas_extra %}{% endblock %}

        <title>
            {% block ecom_statics_browser_title %}
                {% block ecom_statics_left_browser_title %}Login{% endblock %}
                {% block ecom_statics_right_browser_title %} | Ecom Statics{% endblock %}
            {% endblock %}
        </title>

        <link rel="shortcut icon" href="{% block ecom_statics_favicon %}{% static 'ecom_statics/images/favicons/ecom.ico' %}{% endblock %}">

        <link rel="stylesheet" href="{% static 'ecom_statics/css/adminlte_variables.css' %}">
        <link rel="stylesheet" href="{% static 'ecom_statics/css/variables.css' %}">

        {% block ecom_statics_css_base %}
            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5.0.12/index.css" integrity="sha256-tXJfXfp6Ewt1ilPzLDtQnJV4hclT9XuaZUKyUvmyr+Q=" crossorigin="anonymous" media="print" onload="this.media='all'">

            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.11.0/styles/overlayscrollbars.min.css" crossorigin="anonymous">

            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css" crossorigin="anonymous">

            <link rel="stylesheet" href="{% static 'ecom_statics/css/adminlte.css' %}">
        {% endblock %}

        {% block ecom_statics_css_custom %}
            <link rel="stylesheet" href="{% static 'ecom_statics/css/custom_adminlte.css' %}">
        {% endblock %}

        {% block ecom_statics_links_extra %}{% endblock %}
    </head>

    <body class="login-page bg-body-secondary">
        <div class="login-box">
            <div class="card card-outline card-primary">
                <div class="card-header">
                    <a href="{% url 'home' %}" class="link-dark text-center link-offset-2 link-opacity-100 link-opacity-50-hover">
                        <h1 class="mb-0"><b>{% block ecom_statics_page_title %}Ecom Statics{% endblock %}</b></h1>
                    </a>
                </div>
                
                <div class="card-body login-card-body">
                    <p class="login-box-msg">Logueate para iniciar tu sesión</p>

                    <form method="post">
                        {% csrf_token %}

                        {% include 'ecom_statics/includes/form_errors.html' %}

                        {% block ecom_statics_items_base %}
                            <div class="input-group">
                                <div class="form-floating">
                                    <input id="loginUsername" name="username" type="text" class="form-control" placeholder="" required>
                                    <label for="loginUsername">Nombre de Usuario</label>
                                </div>

                                <div class="input-group-text">
                                    <span class="bi bi-person-fill"></span>
                                </div>
                            </div>

                            <div class="input-group mt-2">
                                <div class="form-floating">
                                    <input id="loginPassword" name="password" type="password" class="form-control" placeholder="" required>
                                    <label for="loginPassword">Contraseña</label>
                                </div>

                                <div class="input-group-text">
                                    <span class="bi bi-key-fill"></span>
                                </div>
                            </div>
                        {% endblock %}

                        {% block ecom_statics_items_extra %}
                            <div class="d-inline-flex align-items-center mt-2">
                                <div class="form-check mb-0">
                                    <input id="flexCheckDefault" type="checkbox" class="form-check-input" value="">
                                    <label class="form-check-label" for="flexCheckDefault">Recuérdame</label>
                                </div>
                            </div>
                        {% endblock %}

                        <div class="d-grid mt-3">
                            <button type="submit" class="btn btn-primary">
                                <i class="bi bi-box-arrow-in-right me-2"></i>Ingresar
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        {% block ecom_statics_js_base %}
            <script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.11.0/browser/overlayscrollbars.browser.es6.min.js" crossorigin="anonymous"></script>

            <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" crossorigin="anonymous"></script>

            <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>

            <script src="{% static 'ecom_statics/js/adminlte.js' %}"></script>
        {% endblock %}

        {% block ecom_statics_scripts_extra %}{% endblock %}
    </body>
</html>