{% load static wagtailcore_tags wagtailuserbar %}
{% load menu_tags %}

<!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 %}
            {% wagtail_site as current_site %}
            {% if current_site and current_site.site_name %}- {{ current_site.site_name }}{% endif %}
            {% endblock %}
        </title>
        {% if page.search_description %}
        <meta name="description" content="{{ 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 %}

        {# Global stylesheets #}
        <link rel="stylesheet" type="text/css" href="{% static 'css/artel.css' %}">
        <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/css/bootstrap.min.css' %}">

        {% block extra_css %}
        {# Override this in templates to add extra stylesheets #}
        {% endblock %}
    </head>

    <body class="{% block body_class %}{% endblock %}">
        {% wagtailuserbar %}
        <div class="container">
            <div class="row">
                <div class="col-md-3 mt-5 ml-2">
                    {% main_menu max_levels=3 template="menu/custom_main_menu.html" %}
                </div>
                <div class="col-md-9 mt-5 ml-2">
                    {% for message in messages %}
                        <div class="alert alert-{{message.tags}}" role="alert">
                            {{message}}
                        </div>
                    {% endfor %}
                    {% block content %}{% endblock %}
                </div>
            </div>
        </div>

        {# Global javascript #}
        <script type="text/javascript" src="{% static 'js/jquery-3.6.4.min.js' %}"></script>
        <script type="text/javascript" src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}"></script>
        <script type="text/javascript" src="{% static 'js/artel.js' %}"></script>
        <script src="{% static 'js/cart.js' %}"></script>
        {% block extra_js %}
        {# Override this in templates to add extra javascript #}
        {% endblock %}
    </body>
</html>
