Newer
Older
pre-www / src / layout / partials / header / navbar.twig
<div class="site-header-navbar">
    <div class="site-header-navbar__inner">
        <div class="site-header-navbar__title">
            <a href="{{site.url}}">{{site.title}}</a>
        </div>
        <div class="site-header-navbar__main">
            <nav id="site-header-main-nav" aria-label="Menu principale" role="navigation">
                <ul>
                    {% for item in blocks.header.navbar.nav %}
                        <li class="{% if loop.index == currentSection+1 %}is-selected{% endif %}{% if item.children %} menu-item-has-children{% endif %}" {% if loop.index == currentSection+1 %}aria-current="true"{% endif %} aria-expanded="false">
                            <a href="{{item.url}}">{{item.name}}</a>
                            {% if item.children %}
                                {% include "../menu.twig" with {"items": item.children, "key": "site-header-navbar-submenu", "nesting": 0 } %}
                            {% endif %}
                        </li>
                    {% endfor %}
                </ul>
            </nav>
            <button class="hamburger-btn" id="menu-btn" role="button"><span></span></button>
        </div>
    </div>
</div>