{% set grid_size = theme_var('grid-size') %}
<!DOCTYPE html>
<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
<head>
{% block head %}
    <meta charset="utf-8" />
    <title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% include 'partials/metadata.html.twig' %}

    <link rel="icon" type="image/vnd.microsoft.icon" href="{{ url('theme://images/favicon.ico') }}"
          sizes="16x16 24x24 32x32 48x48 64x64" />
    <link rel="canonical" href="{{ page.url(true, true) }}" />

    {% block stylesheets %}
        {% do assets.addCss('theme://css-compiled/spectre.min.css') %}
        {% do assets.addCss('theme://css-compiled/theme.min.css') %}
        {% do assets.addCss('theme://css/custom.css') %}
        {#{% do assets.addCss('theme://css/line-awesome.min.css') %}#}
        {% do assets.addCss('theme://css/fontawesome-all.min.css') %}
    {% endblock %}
    {{ assets.css() }}

    {% block javascripts %}
        {% do assets.addJs('jquery', 101) %}
        {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}
        {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
    {% endblock %}
    {{ assets.js() }}

{% endblock head %}
</head>
<body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
    <div id="page-wrapper">
    {% block header %}
        <section id="header" class="section">
            <section class="container {{ grid_size }}">
                <nav class="navbar">
                    <section class="navbar-section logo">
                        <a href="{{ home_url }}" class="navbar-brand mr-10">{% include('@images/cheese-heart.svg') %}</a>
                        <h1><a href="{{ home_url }}">{{ config.site.title }}</a></h1>
                    </section>
                    <section class="navbar-section">

                        <nav class="dropmenu animated">
                            {% block header_navigation %}
                        {% include 'partials/navigation.html.twig' %}
                            {% endblock %}
                        </nav>

                        {% if config.plugins.login.enabled and grav.user.username %}
                            <span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' %}</span>
                        {% endif %}

                    </section>
                </nav>
            </section>
        </section>
        <div class="mobile-menu">
            <div class="button_container" id="toggle">
                <span class="top"></span>
                <span class="middle"></span>
                <span class="bottom"></span>
            </div>
        </div>
    {% endblock %}

    {% block hero %}{% endblock %}

        <section id="start">
        {% block body %}
            <section id="body-wrapper" class="section">
                <section class="container {{ grid_size }}">
                    {% block messages %}
                        {% include 'partials/messages.html.twig' ignore missing %}
                    {% endblock %}
                    {% block content %}{% endblock %}
                </section>
            </section>
        {% endblock %}
        </section>

    </div>
{% block footer %}
    <section id="footer" class="section">
        <section class="container">
        {% for icon, url in config.site.footer.links %}
            <p><a href="{{ url }}" target="_blank"><i class="fab fa-{{ icon }}"></i></a></p>
        {% endfor %}
        </section>
    </section>
{% endblock %}

    <div class="mobile-container">
        <div class="overlay" id="overlay">
            <div class="mobile-logo">
                {% include('@images/cheese-heart.svg') %}
            </div>
            <nav class="overlay-menu">
                {% include 'partials/navigation.html.twig' with {tree: true} %}
            </nav>
        </div>
    </div>

{% block bottom %}
    {{ assets.js('bottom') }}

{% endblock %}

</body>
