{% load navigation_tags static wagtailuserbar %}
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
            {% block title %}
                {% if page.seo_title %}
                    {{ page.seo_title }}
                {% else %}
                    {{ page.title }}
                {% endif %}
            {% endblock %}
            {% block title_suffix %}
                | The Wagtail Bakery
            {% endblock %}
        </title>
        <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% endif %}">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        {# Force all links in the live preview panel to be opened in a new tab #}
        {% if request.in_preview_panel %}
            <base target="_blank">
        {% endif %}

        <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
        <link rel="stylesheet" href="{% static 'css/font-marcellus.css' %}">
        <link rel="stylesheet" href="{% static 'css/font-open-sans.css' %}">
        <link rel="stylesheet" href="{% static 'css/main.css' %}">
    </head>

    <body class="{% block body_class %}template-{{ self.get_verbose_name|slugify }}{% endblock %}">
        {% wagtailuserbar %}

        {% block header %}
            {% include "includes/header.html" with parent=site_root calling_page=self %}
        {% endblock header %}

        {% block breadcrumbs %}
            {# breadcrumbs is defined in base/templatetags/navigation_tags.py #}
            {% breadcrumbs %}
        {% endblock breadcrumbs %}

        {% block messages %}
            {% include "includes/messages.html" %}
        {% endblock messages %}

        <main>
            {% block content %}
            {% endblock content %}
        </main>

        <hr>

        {% include "includes/footer.html" %}

        <script type="module" src="{% static 'js/main.js' %}"></script>
    </body>
</html>
