{% extends "admin/login.html" %}
{% load static i18n simpletags %}

{% block css %}
    {{ block.super }}
    <link rel="stylesheet" href="{% static '/admin/simplepro/css/login.css' %}">
{% endblock %}

{% block bg %}
    <style type="text/css">
        .bg {
            background: #f0f2f5;
            background-image: url('{% static '/admin/simplepro/images/bg.svg' %}');
            min-height: 100%;
            background-repeat: no-repeat;
            background-position: 50%;
            background-size: 100%;
            padding: 20px 0;
            position: relative;
        }
    </style>
{% endblock %}
{% block particles %}{% endblock %}
{% block logo %}
    <div class="banner">
            {% if "SIMPLEUI_LOGO"|get_config %}
                <img src="{{ "SIMPLEUI_LOGO"|get_config |safe }}">
            {% else %}
                <img src="{% static 'admin/simplepro/images/banner.png' %}">
            {% endif %}
    </div>
{% endblock %}
{% block icon %}
{#    <link rel="icon" href="{% static '/admin/simplepro/images/favicon.ico' %}">#}
{% endblock %}
{% block form %}
    <form class="simpleui-form" action="{{ app_path }}" method="post" id="login-form">
        {% csrf_token %}
        <div class="simpleui-input-inline">
            <el-input prefix-icon="el-icon-user" v-model="username" name="username"
                      placeholder="{% trans 'username' %}"></el-input>
        </div>
        <div class="simpleui-input-inline">
            <el-input prefix-icon="el-icon-lock" type="password" v-model="password" name="password"
                      @keyup.enter.native="login()"
                      placeholder="{% trans 'password' %}" show-password></el-input>
        </div>
        <div class="simpleui-input-inline login-btn">
            <el-button :icon="loading?'el-icon-loading':''" @click="login()"
                       type="primary">{% trans 'Log in' %}</el-button>
        </div>

        <input type="hidden" name="next" value="{{ next }}"/>
    </form>

{% endblock %}