{% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
{% block layout_main_navigation %}
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
<script>
var j$ = jQuery.noConflict();
j$(document).ready(function(){
j$("#fullscreen-nav-toggle").click(function(){
j$("body").toggleClass("open");
j$("#nav-icon").toggleClass('clicked');
j$(".fullscreen-nav").fadeToggle();
});
});
</script>
<div class="fullscreen-nav">
<div class="fullscreen-nav-inner">
{% block layout_main_navigation_menu_items %}
{% set activePath = page.header.navigation.active.path %}
{% for treeItem in page.header.navigation.tree %}
<div class="fullscreen-nav-item">
{% set category = treeItem.category %}
{% set name = category.translated.name %}
{# @deprecated tag:v6.5.0 - Use "category.id" directly instead. #}
{% set categorId = category.id %}
{% block layout_main_navigation_menu_item %}
{% if category.type == 'folder' %}
<div class="nav-link main-navigation-link"
{% if treeItem.children|length > 0 %}
data-flyout-menu-trigger="{{ category.id }}"
{% endif %}
title="{{ name }}">
<div class="main-navigation-link-text">
<span itemprop="name">{{ name }}</span>
</div>
</div>
{% else %}
<a class="nav-link main-navigation-link{% if category.id == page.header.navigation.active.id or category.id in activePath %} active{% endif %}"
href="{{ category_url(category) }}"
itemprop="url"
{% if treeItem.children|length > 0 %}data-flyout-menu-trigger="{{ category.id }}"{% endif %}
{% if category_linknewtab(category) %}target="_blank"{% endif %}
title="{{ name }}">
<div class="main-navigation-link-text">
<span itemprop="name">{{ name }}</span>
</div>
</a>
{% endif %}
{% endblock %}
</div>
{% endfor %}
{% endblock %}
</div>
</div>
{% endblock %}