{% comment %}
    Base template for all django_cradmin templates.

    You should extend this directly for standalone pages like
    login and error pages. For pages that require a role,
    you should extend ``base.django.html`` instead.
{% endcomment %}{% spaceless %}
    {% load static %}
{% endspaceless %}<!DOCTYPE html>
<html lang="en" ng-app="djangoCradminUi">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        {% block extra_meta %}{% endblock extra_meta %}

        {% comment %}
            The title tag contains two blocks:

            - ``title``: Overridden per page.
            - ``title-pre`` and ``title-post``: Typically overridden by overriding ``standalone-base.django.html``
              to provide some common prefix/postfix for the the title tag for the entire site.
        {% endcomment %}
        <title>{% block title-pre %}{% endblock %}{% block title %}{% endblock %}{% block title-post %}{% endblock %}</title>

        {% block styles %}
            <link href='{% static DJANGO_CRADMIN_THEME_PATH %}' rel="stylesheet">
        {% endblock styles %}
        {% block iconlibrary %}
            <link href='{% static DJANGO_CRADMIN_CSS_ICON_LIBRARY_PATH %}' rel="stylesheet">
        {% endblock iconlibrary %}

        {% block jsimports %}
            <script src="{% static 'django_cradmin/dist/vendor/cradmin-vendorjs.js' %}" type="text/javascript"></script>
            <script src="{% static 'django_cradmin/dist/js/cradmin.min.js' %}" type="text/javascript"></script>
        {% endblock %}
    </head>
    <body class="
            {% block bodyclass %}
                {% if cradmin_hide_menu %}
                    django-cradmin-hide-menu
                {% endif %}
            {% endblock bodyclass %}
            ">
        <div id="django_cradmin_bodycontentwrapper">
            {% block global-pre-body %}
                {% comment %}
                    This block is here to be overridden in standalone-base.django.html
                    and base.django.html. It should be used to add some global component
                    before the body, such as a global navigation header.

                    This block is not intended to be, and should never be overridden in app views.
                {% endcomment %}
            {% endblock global-pre-body %}

            {% block body %}{% endblock body %}

            {% block global-post-body %}
                {% comment %}
                    This block is here to be overridden in standalone-base.django.html
                    and base.django.html. It should be used to add some global component
                    after the body, such as a global footer header.

                    This block is not intended to be, and should never be overridden in app views.
                {% endcomment %}
            {% endblock global-post-body %}

            {% block initialize_angular %}
                <script>
                    angular.module('djangoCradminUi', ['djangoCradmin']);
                </script>
            {% endblock %}
        </div>
        {% block outside-bodycontentwrapper %}{% endblock outside-bodycontentwrapper %}

        {% block end-of-body %}{% endblock end-of-body %}
    </body>
</html>
