{% do jsConfig().add({
'loadCart': url('cart_overlay')
}) %}
{% set siteConfig = getSiteConfig() %}
{% set microSiteConfig = siteConfig is instanceof('\\Pimcore\\Model\\DataObject\\MicroSiteConfig') ? siteConfig : null %}
{% set isTradepage = document.property("isTradepage") ? document.property("isTradepage") : false %}
{% if microSiteConfig and microSiteConfig.name == 'alpineCrossing' %}
{# only alpine crossing navigation should not be fixed #}
{% set isFixed = false %}
{% endif %}
{% set polygonImage = siteConfig.polygonImage %}
{% set bgImageSrc = polygonImage ? polygonImage.thumbnail('sustainability-area-bg').getAsFormat("webp") : null %}
{% set trackingKey = 'click-header-logo' %}
{% set trackingData = {
"trigger": "click",
'datalayer': {
'event': 'click_header_icon',
'click_item': 'logo',
'click_url': (document.property('navigationRoot')|default('')).getPath()
}
} %}
{% set hideNavigation = document.getProperty('hideNavigation') %}
{% do jsConfig('_trackingData').add({
(trackingKey): trackingData
}) %}
<header class="main-navbar js-main-navbar {{ initiallyTransparent|default(false) ? 'js-nav--scroll-transform is-transparent' : '' }} {{ isFixed is defined ? isFixed == true ? 'position-sticky' : 'position-absolute' : '' }}">
{{ include('includes/main-navbar-meta.html.twig') }}
{% if not hideNavigation|default(false) %}
<a href="{{ document.property('navigationRoot') }}" class="pointer-events-auto {{ microSiteConfig and microSiteConfig.name == 'alpineCrossing' ? 'main-navbar__brand--mobile-big' : '' }} main-navbar__brand--mobile js-cursor__interaction" data-event-tracking-key="{{ trackingKey }}">
<img class="js-nav__logo-white main-navbar__brand__logo {{ initiallyTransparent|default(false) ? 'is-active' : '' }}"
width="132px" height="20px" src="{{ elements_cache_buster(elements_staticFolder() ~ '/img/logo-white.svg') }}" alt="{{ 'header.logo'|trans }}"
>
<img class="js-nav__logo-color main-navbar__brand__logo {{ initiallyTransparent|default(false) ? '' : 'is-active' }}"
width="132px" height="20px" src="{{ elements_cache_buster(elements_staticFolder() ~ '/img/logo-color.svg') }}" alt="{{ 'header.logo'|trans }}"
>
</a>
<nav class="main-navbar-nav js-nav">
{% if microSiteConfig and not microSiteConfig.hideHeaderLiveInfo %}
{{ include('includes/header-live-info.html.twig') }}
{% endif %}
{% if not microSiteConfig or not microSiteConfig.hideNav %}
<button class="main-navbar-toggle collapsed js-nav__toggle-overlay js-nav__toggle-overlay--main js-navigation-expand-background-button" type="button"
aria-expanded="false" aria-label="{{ 'header.toggle-navbar'|trans }}" data-nav-overlay-target="#main-navbar-nav"
aria-controls="main-navbar-nav"
>
<img class="main-navbar-toggle__expand-background js-navigation-expand-background" data-fill-screen-scale-x="20" data-fill-screen-scale-y="10" alt="" src="{{ bgImageSrc }}" />
<span class="main-navbar-toggle__button">
<svg class="main-navbar-toggle__ham main-navbar-toggle__ham--rotate" viewBox="0 0 100 100" width="80" onclick="this.classList.toggle('active')">
<path
class="main-navbar-toggle__ham-line"
d="m 70,33 h -40 c 0,0 -8.5,-0.149796 -8.5,8.5 0,8.649796 8.5,8.5 8.5,8.5 h 20 v -20" />
<path
class="main-navbar-toggle__ham-line"
d="m 70,50 h -40" />
<path
class="main-navbar-toggle__ham-line"
d="m 30,67 h 40 c 0,0 8.5,0.149796 8.5,-8.5 0,-8.649796 -8.5,-8.5 -8.5,-8.5 h -20 v 20" />
</svg>
</span>
<span class="main-navbar-toggle__text">{{ 'header.menu'|trans }}</span>
</button>
{% endif %}
{{ include('navigation/partials/left-links.html.twig', {
'microSiteConfig': microSiteConfig,
'siteConfig': siteConfig
}) }}
{% set logo = microSiteConfig ? microSiteConfig.logo.fullPath : elements_cache_buster(elements_staticFolder() ~ '/img/logo-color.svg') %}
<a href="{{ document.property('navigationRoot') }}" class="{{ microSiteConfig ? "mx-md-auto" : " "}} pointer-events-auto main-navbar__brand js-cursor__interaction" data-event-tracking-key="{{ trackingKey }}">
<img class="js-nav__logo-white main-navbar__brand__logo {{ initiallyTransparent|default(false) ? 'is-active' : '' }}"
src="{{ elements_cache_buster(elements_staticFolder() ~ '/img/logo-white.svg') }}"
alt="{{ 'header.logo'|trans }}" width="200px" height="30px"
>
<img class="js-nav__logo-color main-navbar__brand__logo {{ initiallyTransparent|default(false) ? '' : 'is-active' }}"
src="{{ logo }}" alt="{{ 'header.logo'|trans }}" width="200px" height="30px"
>
</a>
<div class="main-navbar__right">
{# to-do: remove class "justify-content-start" when it's not just alpine crossing anymore and the menu is shown #}
<ul class="list-unstyled main-navbar__link-list justify-content-start">
{% if not microSiteConfig or not microSiteConfig.hideLanguageSwitch %}
{# to-do: remove class "ms-4" and re-add class "main-navbar__link-list-item--hidden-xs" when it's not just alpine crossing anymore and the menu is shown #}
<li class="main-navbar__link-list-item ms-4 ">
{{ include('navigation/language-switch.html.twig') }}
</li>
{% endif %}
{% if not microSiteConfig or not microSiteConfig.hideSearch %}
{% set trackingKey = 'click-header-icon-search' %}
{% set trackingData = {
"trigger": "click",
'datalayer': {
'event': 'click_header_icon',
'click_item': 'search',
}
} %}
{% do jsConfig('_trackingData').add({
(trackingKey): trackingData
}) %}
<li class="main-navbar__link-list-item">
<button role="button" aria-expanded="false" aria-label="{{ 'header.toggle-search'|trans }}"
class="main-navbar__link btn-no-styling font-decorative collapsed js-nav__toggle-overlay"
data-nav-overlay-target="#main-navbar-search" aria-controls="main-navbar-search"
data-event-tracking-key="{{ trackingKey }}"
>
<span class="icon icon-search main-navbar__link-icon" aria-hidden="true"></span>
<span class="main-navbar__link__text">{{ 'header.search'|trans }}</span>
</button>
{{ include('includes/overlays/search-overlay.html.twig') }}
</li>
{% endif %}
{% if (not microSiteConfig or not microSiteConfig.hideProfile) and not isTradepage %}
{% set trackingKey = 'click-header-icon-login' %}
{% set trackingData = {
"trigger": "click",
'datalayer': {
'event': 'click_header_icon',
'click_item': 'login',
'click_url': url('cdm_auth_login')
}
} %}
{% do jsConfig('_trackingData').add({
(trackingKey): trackingData
}) %}
<li class="main-navbar__link-list-item">
<a class="main-navbar__link" href="{{ url('cdm_auth_login') }}" data-event-tracking-key="{{ trackingKey }}">
<span class="icon icon-avatar main-navbar__link-icon" aria-hidden="true"></span>
<span class="main-navbar__link__text">
{% if app.user is instanceof('App\\Model\\DataObject\\Customer') %}
{{ 'header.profile'|trans }}
{% else %}
{{ 'header.login'|trans }}
{% endif %}
</span>
</a>
</li>
{% endif %}
{% set cart = cart|default(getCart()) %}
{% if ((not microSiteConfig or not microSiteConfig.hideCart) and cart|default(false)) and not isTradepage %}
{% set trackingKey = 'click-header-icon-cart' %}
{% set trackingData = {
"trigger": "click",
'datalayer': {
'event': 'click_header_icon',
'click_item': 'cart'
}
} %}
{% do jsConfig('_trackingData').add({
(trackingKey): trackingData
}) %}
<li class="main-navbar__link-list-item">
<button type="button" class="main-navbar__link js-nav__toggle-overlay js-load-cart btn-no-styling"
aria-expanded="false" aria-label="{{ 'header.toggle-cart'|trans }}"
data-nav-overlay-target="#main-navbar-cart" aria-controls="main-navbar-cart"
data-event-tracking-key="{{ trackingKey }}"
>
<span class="icon icon-cart main-navbar__link-icon"></span>
<span class="visually-hidden">{{ 'header.cart'|trans }}</span>
<span class="main-navbar__cart-count js-load-cart__count">{{ cart.itemAmount }}</span>
</button>
{{ include('includes/overlays/cart-overlay.html.twig', {
'className': isFixed|default(true) ? '' : 'main-navbar__cart-overlay--absolute'
}) }}
</li>
{% endif %}
</ul>
{% if ((siteConfig or not microSiteConfig.hideShop) and siteConfig.shopOverview()) and not isTradepage %}
{% set trackingKey = 'click-header-icon-shop' %}
{% set trackingData = {
"trigger": "click",
'datalayer': {
'event': 'click_header_icon',
'click_item': 'shop'
}
} %}
{% do jsConfig('_trackingData').add({
(trackingKey): trackingData
}) %}
<a href="{{ siteConfig.shopOverview() }}" class="main-navbar__button js-cursor__interaction" data-event-tracking-key="{{ trackingKey }}">
<span class="icon icon-ticket main-navbar__button__icon" aria-hidden="true"></span>
<span class="main-navbar__button__text">{{ 'header.shop'|trans }}</span>
</a>
{% endif %}
{% if not microSiteConfig or not microSiteConfig.hideNav %}
{{ include('navigation/nav.html.twig') }}
{% endif %}
</div>
</nav>
{% endif %}
</header>