{% load compress %}
{% load i18n %}
{% load static %}
<!DOCTYPE html>
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
<head>
    <title>{{ django_settings.PRETIX_INSTANCE_NAME }}</title>
    {% compress css %}
        <link rel="stylesheet" type="text/x-scss" href="{% static "pretixcontrol/scss/auth.scss" %}"/>
    {% endcompress %}
    <meta name="viewport" content="width=device-width, initial-scale=1">

    {% if development_warning or debug_warning %}
        <link rel="shortcut icon" href="{% static "pretixbase/img/favicon-debug.ico" %}">
    {% else %}
        <link rel="shortcut icon" href="{% static "pretixbase/img/favicon.ico" %}">
        <link rel="icon" type="image/png" sizes="32x32" href="{% static "pretixbase/img/icons/favicon-32x32.png" %}">
        <link rel="icon" type="image/png" sizes="194x194" href="{% static "pretixbase/img/icons/favicon-194x194.png" %}">
        <link rel="icon" type="image/png" sizes="16x16" href="{% static "pretixbase/img/icons/favicon-16x16.png" %}">
    {% endif %}
    <link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
    <link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
    <link rel="manifest" href="{% url "presale:site.webmanifest" %}">
    <link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
    <meta name="msapplication-TileColor" content="#3b1c4a">
    <meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
    <meta name="theme-color" content="#3b1c4a">
</head>
<body>
<div class="container">
    <a href="{% url "control:auth.login" %}">
        <img src="{% static "pretixbase/img/pretix-logo.svg" %}" class="logo"/>
    </a>
    {% if messages %}
        {% for message in messages %}
            <div class="alert {{ message.tags }}">
                {{ message }}
            </div>
        {% endfor %}
    {% endif %}
    {% if request.user.is_hijacked %}
        <div class="impersonate-warning">
            <span class="fa fa-user-secret"></span>
            {% blocktrans with user=request.user%}You are currently working on behalf of {{ user }}.{% endblocktrans %}

            <form action="{% url 'control:users.impersonate.stop' %}" method="post" class="helper-display-inline">
                {% csrf_token %}
                <button class="btn btn-default btn-sm">
                    {% trans "Stop impersonating" %}
                </button>
            </form>
        </div>
    {% endif %}

    {% block content %}
    {% endblock %}
    <footer>
        {{ poweredby }} {# removing or hiding this might be in violation of pretix' license #}
    </footer>
</div>
<script type="text/javascript" src="{% static "pretixcontrol/js/auth.js" %}"></script>
</body>
</html>
