{% load i18n %}
{% load static %}

{% load appearance_tags %}
{% load common_tags %}
{% load navigation_tags %}
{% load smart_settings_tags %}

{% spaceless %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        {% include 'appearance/partials/meta.html' %}
        <title>
            {% block base_title %}
                {% block title %}{% endblock %} :: {% block project_name %}{% common_get_project_title %}{% endblock %}
            {% endblock base_title %}
        </title>

        {% include 'appearance/app/head.html' %}

        {% block stylesheets %}{% endblock %}

        <style>
            {% appearance_get_user_theme_stylesheet user=request.user %}
        </style>

        <script>
            // Detect if we are inside of an AJAX content container
            // and break free as this is supposed to be a top level
            // template.
            if (window.location.hash.length) {
                const url = new URL(
                    window.location.hash.substring(1), window.location.origin
                );
                window.location = url;
            }
        </script>
    </head>
    <body id="body-plain">
        {% block content %}{% endblock %}
        <script src="{% static 'appearance/node_modules/jquery/dist/jquery.min.js' %}" type="text/javascript"></script>
        <script src="{% static 'appearance/node_modules/bootstrap/dist/js/bootstrap.min.js' %}" type="text/javascript"></script>
        <script src="{% static 'appearance/node_modules/@fortawesome/fontawesome-free/js/all.min.js' %}" data-auto-replace-svg="nest" type="text/javascript"></script>
    </body>
</html>
{% endspaceless %}
