{% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
{% block layout_main_navigation %}
{% set WolfGraphicMenu = config('WolfPlatformGraphicMenu.config') %}
{% set navigationMaxDepth = WolfGraphicMenu.levels|last %}
<style>.navigation-flyout-categories.is-level-0 > .navigation-flyout-col {border-color: {{ WolfGraphicMenu.tileborder }}!important;}
.navigation-flyout-categories.is-level-0 > .navigation-flyout-col:hover {border-color: {{ WolfGraphicMenu.tileborderhover }}!important;}
{% if WolfGraphicMenu.flyoutColorSet %}
.navigation-flyout { background-color: {{ WolfGraphicMenu.bgFlyout}};}
.navigation-flyout-link {color: {{ WolfGraphicMenu.linkFlyout }}; }
.navigation-flyout-link:hover {color: {{ WolfGraphicMenu.linkFlyoutHover }}; }
.nav-link {color: {{ WolfGraphicMenu.linkFlyout }}; } .nav-link:hover {color: {{ WolfGraphicMenu.linkFlyoutHover }}; }
{% endif %}
</style>
{% if page.header.navigation.active.id !="" %}{% set activeId = page.header.navigation.active.id %}{% endif %}
{{ parent() }}
{% endblock %}
{% block layout_main_navigation_menu_home %}
{% if WolfGraphicMenu.showHome %}
{{ parent() }}
{% endif %}
{% endblock %}
{% 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="{{ categorId }}"
{% endif %}
title="{{ name }}">
<div class="main-navigation-link-text">
{% if WolfGraphicMenu.showteaserimageTop %}
{% sw_thumbnails 'menu--picture--main' with {
media: treeItem.category.media,
sizes: {
'default': (WolfGraphicMenu.iconTopHeight ~ 'px')
},
attributes: {
'class': 'menu--picture--main',
'alt': (navigationTree.category.translated.name ?: ''),
'title': (navigationTree.category.translated.name ?: ''),
'data-object-fit': 'contain',
'style': 'height: ' ~ (WolfGraphicMenu.iconTopHeight)~ 'px'
}
} %}
{% endif %}
<span itemprop="name">{{ name }}</span>
</div>
</div>
{% else %}
<a class="nav-link main-navigation-link{% if categorId is same as(page.header.navigation.active.id) %} active{% endif %}"
href="{% if category.externalLink %}{{ category.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: categorId }) }}{% endif %}"
itemprop="url"
{% if treeItem.children|length > 0 %}
data-flyout-menu-trigger="{{ categorId }}"
{% endif %}
title="{{ name }}">
<div class="main-navigation-link-text">
{% if WolfGraphicMenu.showteaserimageTop %}
{% sw_thumbnails 'menu--picture--main' with {
media: treeItem.category.media,
sizes: {
'default': (WolfGraphicMenu.iconTopHeight ~ 'px')
},
attributes: {
'class': 'menu--picture--main',
'alt': (navigationTree.category.translated.name ?: ''),
'title': (navigationTree.category.translated.name ?: ''),
'data-object-fit': 'contain',
'style': 'height: ' ~ (WolfGraphicMenu.iconTopHeight)~ 'px'
}
} %}
{% endif %}
<span itemprop="name">{{ name }}</span>
</div>
</a>
{% endif %}
{% endblock %}