{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
<!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>
    {% include 'partials/metadata.html.twig' %}
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
    <link rel="canonical" href="{{ page.url(true, true) }}" />

    {% block stylesheets %}
        {% do assets.addCss('theme://css/pure-0.5.0/grids-min.css', 103) %}
        {% do assets.addCss('theme://css-compiled/nucleus.css', 102) %}
        {% do assets.addCss('theme://css-compiled/template.css', 101) %}
        {% do assets.addCss('theme://css/custom.css', 100) %}
        {% do assets.addCss('theme://css/font-awesome.min.css', 100) %}
        {% do assets.addCss('theme://css/slidebars.min.css') %}
        {% do assets.addCss('theme://css/slick.css') %}
        {% do assets.addCss('theme://css/slick-theme.css') %}
        {# <link rel="stylesheet" type="text/css" href="slick/slick.css"/>
        // Add the new slick-theme.css if you want the default styling
        <link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/> #}


        {% if browser.getBrowser == 'msie' and browser.getVersion == 10 %}
            {% do assets.addCss('theme://css/nucleus-ie10.css') %}
        {% endif %}
        {% if browser.getBrowser == 'msie' and browser.getVersion >= 8 and browser.getVersion <= 9 %}
            {% do assets.addCss('theme://css/nucleus-ie9.css') %}
            {% do assets.addJs('theme://js/html5shiv-printshiv.min.js') %}
        {% endif %}
    {% endblock %}

    {% block javascripts %}
        {% do assets.addJs('jquery', 101) %}
        {% do assets.addJs('theme://js/modernizr.custom.71422.js', 100) %}
        {% do assets.addJs('theme://js/antimatter.js') %}
        {% do assets.addJs('theme://js/parallax.js') %}
        {% do assets.addJs('theme://js/slidebars.min.js') %}
        {% do assets.addJs('theme://js/slick.min.js') %}
        {# <script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
         <script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
         <script type="text/javascript" src="slick/slick.min.js"></script>#}
                        
    {% endblock %}

    {% block assets deferred %}
        {{ assets.css()|raw }}
        {{ assets.js()|raw }}
    {% endblock %}

{% endblock head %}
</head>
<body id="top" class="{{ page.header.body_classes }}">
    <div id="sb-site">
        {% block header %}
        <header id="header">
            <a href="http://www.epau.archi.fr">
                <div id="logo">
                    <img id="gouv" src="{{ url('theme://images/logo_REP_header_0.png')}}" alt="logo République Française">
                    <img id="epau" src="{{ url('theme://images/logo_EPAU_header_1.png')}}"  alt="logo EPAU">
                </div>
            </a>
            <div id="navbar">
                {% block header_extra %}{% endblock %}
                {% if config.plugins.langswitcher.enabled %}
                {% include 'partials/langswitcher.html.twig' %}
                {% endif %}
                {% block header_navigation %}
                {% include 'partials/navigation.html.twig' %}
                {% endblock %}
                <!-- <span class="panel-activation sb-toggle-left navbar-left menu-btn fa fa-bars"></span> -->
            </div>
        </header>
        {% endblock %}

        {% block showcase %}{% endblock %}

        {% block body %}
        <section id="body" class="{{ class }} parallax-window"
        data-parallax="scroll"
        data-image-src="{{ url('theme://images/04_photo_ AE_PlanDAou_36.jpg') }}">
            {% block content %}{% endblock %}
        </section>
        {% endblock %}

        <!-- {% block footer %}
        <footer id="footer">
            <div class="totop">
                <span><a href="#" id="toTop"><i class="fa fa-arrow-up"></i></a></span>
            </div>

        </footer>
        {% endblock %} -->
    </div>
    {% block sidebar_navigation %}
        <div class="sb-slidebar sb-left sb-width-thin">
            <div id="panel">
              {% import _self as macros %}

              {% macro loop(page) %}
                  {% import _self as macros %}
                  {% for p in page.children.visible %}
                      {% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
                      {% if p.children.visible.count > 0 %}
                          <li class="has-children {{ current_page }}">
                              <a href="{{ p.url }}">
                                  {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
                                  {{ p.menu }}
                                  <span></span>
                              </a>
                              <ul>
                                  {{ macros.loop(p) }}
                              </ul>
                          </li>
                      {% else %}
                          <li class="{{ current_page }}">
                              <a href="{{ p.url }}">
                                  {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
                                  {{ p.menu }}
                              </a>
                          </li>
                      {% endif %}
                  {% endfor %}
              {% endmacro %}

              <ul class="navigation">
                  {% if theme_config.dropdown.enabled %}
                      {{ macros.loop(pages) }}
                  {% else %}
                      {% for page in pages.children.visible %}
                          {% set current_page = (page.active or page.activeChild) ? 'active' : '' %}
                          <li class="{{ current_page }}">
                              <a href="{{ page.url }}">
                                  {% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
                                  {{ page.menu }}
                              </a>
                          </li>
                      {% endfor %}
                  {% endif %}
                  {% for mitem in site.menu %}
                      <li>
                          <a href="{{ mitem.url }}">
                              {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
                              {{ mitem.text }}
                          </a>
                      </li>
                  {% endfor %}
                  {% if config.plugins.login.enabled and grav.user.username %}
                      <li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
                  {% endif %}
              </ul>


            <!-- {% include 'partials/navigation.html.twig' %} -->
            </div>
        </div>
    {% endblock %}
    {% block bottom %}
         <script>
        $(function () {
            $(document).ready(function() {
              $.slidebars({
                hideControlClasses: true,
                scrollLock: true
              });
            });
        });
        </script>
        {{ assets.js('bottom')|raw }}
    {% endblock %}
</body>
</html>
