<!DOCTYPE html>
<html lang="{% block html_lang %}{{ app.request.locale|split('_')[0] }}{% endblock html_lang %}">
<head>
    {% block head %}
        {% block meta_tags %}
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
            {% if meta_title is defined or page_title is defined %}
                <meta content="{{ meta_title is defined ? meta_title : page_title }}" name="title"/>
            {% endif %}
            {% if meta_description is defined or page_description is defined %}
                <meta content="{{ meta_description is defined ? meta_description : page_description }}" name="description"/>
            {% endif %}
            <meta name="author" content="">
        {% endblock meta_tags %}
        <title>Frontend Comitium | {% block title %}{{ (page_title is defined ? page_title|trans : '') }}{% endblock %}</title>
        {% block styles %}{% endblock styles %}
    {% endblock head %}
</head>

<body {% block body_attr %}id="page-top"{% endblock body_attr %}>
    {% block content_base %}{% endblock %}
    {% block javascripts %}{% endblock javascripts %}

    <script>
        document.addEventListener("DOMContentLoaded", function() {
            var navBtn = $('[data-nav-btn]'),
                navElement = $('[data-nav-element]');
            navBtn.click(function() {
                event.preventDefault();
                navElement.toggleClass('is-reduced');
//                if (navElement.hasClass('is-reduced')) {
//                    navElement.deleteClass("is-reduced");
//                } else {
//                    navElement.addClass("is-reduced");
//                }
            });
        });
    </script>
</body>

</html>
