{% load i18n %}

{% load appearance_tags %}
{% load common_tags %}
{% load navigation_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>

        <style id="style-javascript"></style>
        {% appearance_app_templates template_name='head' %}

        {% block stylesheets %}{% endblock %}

        <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 %}
    </body>
</html>

{% endspaceless %}
