templates/galilea/import/components/header.twig line 1
<header class="fixed top-0 z-20 w-full text-sm pointer-events-none" :class="{'text-black': overlay && !$store.header.open, 'text-white': !overlay || $store.header.open}" x-data="header" @scroll.window.passive="handleScroll" @resize.window="handleResize" x-cloak>
<div class="relative transition-transform" :class="{'-translate-y-[150%]': hide && !$store.header.open}">
<div class="absolute inset-0 w-full transition-colors" :class="{'bg-white/70 backdrop-blur-[3rem]': overlay && !$store.header.open}"></div>
<div class="container relative pointer-events-auto">
<div class="flex relative items-center h-16 lg:h-24">
<a href="{{ homepage_url ?: '/' }}" class="block z-20 w-28 transition-colors lg:mr-16 xl:mr-32 shrink-0">
{{ include((baseIncludePath ? baseIncludePath : '') ~ 'components/logo.twig') }}
</a>
<nav class="flex gap-6 items-center mr-6 max-lg:hidden">
{% for item in header_nav %}
{% if item.children %}
<div class="relative group">
<a href="{{item.url}}" class="flex gap-1 items-center transition-colors" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} :class="{'hover:text-brand-50': overlay, 'hover:text-secondary-50': !overlay}">
{{ item.title }}
{% if item.target %}
<span class="inline-block relative w-[0.6em] -top-[0.1em]">
{% include (baseIncludePath ? baseIncludePath : '') ~ 'svgs/external.twig' %}
</span>
{% endif %}
</a>
<div class="absolute left-0 top-full pt-3 text-black opacity-0 transition-all translate-y-4 pointer-events-none group-hover:opacity-100 group-hover:translate-y-0 group-hover:pointer-events-auto" :class="{'!pointer-events-none': hide}">
<nav class="relative -left-4 p-4 space-y-3 bg-white rounded-2xl">
{% for item in item.children %}
<a href="{{ item.url }}" class="block transition-colors hover:text-brand-50">
{{item.title}}
</a>
{% endfor %}
</nav>
</div>
</div>
{% else %}
<a href="{{item.url}}" class="flex gap-1 items-center transition-colors" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} :class="{'hover:text-brand-50': overlay, 'hover:text-secondary-50': !overlay}">
{{ item.title }}
{% if item.target %}
<span class="inline-block relative w-[0.6em] -top-[0.1em]">
{% include (baseIncludePath ? baseIncludePath : '') ~ 'svgs/external.twig' %}
</span>
{% endif %}
</a>
{% endif %}
{% endfor %}
</nav>
<!-- If we only have two languages, we can toggle here without a select, just show en / de -->
<!-- TODO: the language link for the page has to be inserted here -->
<a href="{{ language_link }}" class="flex gap-2 items-center mr-6 ml-auto uppercase transition-colors lg:mr-10" :class="{'hover:text-brand-50': overlay, 'hover:text-secondary-50': !overlay}">
<span class="size-4">
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 15 15">
<path d="M7.5 14.5c1.657 0 3-3.134 3-7s-1.343-7-3-7-3 3.134-3 7 1.343 7 3 7ZM.5 7.5h14" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M7.5 14.5a7 7 0 1 0 0-14 7 7 0 0 0 0 14Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</span>
<span>{{ language_label }}</span>
</a>
<nav class="flex gap-10 items-center max-lg:hidden">
{% for item in header_subnav %}
<a href="{{item.url}}" class="flex gap-1 items-center transition-colors" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} :class="{'hover:text-brand-50': overlay, 'hover:text-secondary-50': !overlay}">
{{ item.title }}
{% if item.target %}
<span class="inline-block relative w-[0.6em] -top-[0.1em]">
{% include (baseIncludePath ? baseIncludePath : '') ~ 'svgs/external.twig' %}
</span>
{% endif %}
</a>
{% endfor %}
{% for cta in header_ctas %}
<a href="{{ cta.url }}" class="btn btn-lg" :class="{'btn-tertiary': !overlay || $store.header.open, 'btn-tertiary-inverted': overlay && !$store.header.open}" {{ cta.target ? ('target="' ~ cta.target ~ '" rel="noopener noreferrer"')|raw }}>
{{ cta.title }}
</a>
{% endfor %}
</nav>
<button class="flex z-20 justify-center items-center rounded-full lg:hidden size-12 bg-white/15" @click="$store.header.open = !$store.header.open">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 18 7" class="absolute w-[1.125rem]" x-show="!$store.header.open"><path fill="currentColor" fill-rule="evenodd" d="M18 0H0v1h18V0Zm0 6H0v1h18V6Z" clip-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 14 14" class="absolute w-4" x-show="$store.header.open"><path fill="currentColor" fill-rule="evenodd" d="m7.707 7 6.01-6.01-.707-.707L7 6.293.99.283.282.99 6.292 7l-6.01 6.01.708.708L7 7.708l6.01 6.01.707-.707L7.707 7Z" clip-rule="evenodd"/></svg>
</button>
</div>
</div>
</div>
<div class="fixed top-0 z-10 w-full h-screen bg-black transition-opacity duration-500" :class="{'opacity-0 pointer-events-none': !$store.header.open, 'pointer-events-auto': $store.header.open}">
<canvas class="absolute inset-0 pointer-events-none size-full" x-rive="{{ footer_animation }}"></canvas>
<div class="flex overflow-auto absolute inset-0 flex-col px-6 pt-32 pb-10 h-full transition-transform size-full header-mask" :class="{'-translate-x-full': subnav}" data-lenis-prevent>
<nav class="space-y-5 text-2xl mainnav">
{% for item in header_nav %}
{% if item.children %}
<a href="#" class="flex gap-1 items-center transition-colors hover:text-secondary-50" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} @click.prevent="subnav = {{ loop.index }}">
{{ item.title }}
<span class="pt-0.5 ml-2 w-2.5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 12 19"><path fill="currentColor" fill-rule="evenodd" d="M8.364 9.808.586 17.586 2 19l9.192-9.192L2 .615.586 2.03l7.778 7.779Z" clip-rule="evenodd"/></svg>
</span>
</a>
{% else %}
<a href="{{item.url}}" class="flex gap-1 items-center transition-colors hover:text-secondary-50" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} @click="$store.header.open = false">
{{ item.title }}
{% if item.target %}
<span class="inline-block relative w-[0.6em] -top-[0.1em]">
{% include (baseIncludePath ? baseIncludePath : '') ~ 'svgs/external.twig' %}
</span>
{% endif %}
</a>
{% endif %}
{% endfor %}
{% for item in header_subnav %}
<a href="{{item.url}}" class="flex gap-1 items-center transition-all hover:text-secondary-50" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} @click="$store.header.open = false">
{{ item.title }}
{% if item.target %}
<span class="inline-block relative w-[0.6em] -top-[0.1em]">
{% include (baseIncludePath ? baseIncludePath : '') ~ 'svgs/external.twig' %}
</span>
{% endif %}
</a>
{% endfor %}
</nav>
<nav class="flex pt-10 mt-auto">
{% for cta in header_ctas %}
<a href="{{ cta.url }}" class="shrink basis-full btn btn-lg btn-primary" {{ cta.target ? ('target="' ~ cta.target ~ '" rel="noopener noreferrer"')|raw }} @click="$store.header.open = false">
<span class="btndot"></span>
{{ cta.title }}
</a>
{% endfor %}
</nav>
</div>
{% for item in header_nav %}
{% if item.children %}
<div class="flex overflow-auto absolute inset-0 flex-col px-6 pt-32 pb-10 h-full transition-transform size-full header-mask" :class="{'translate-x-full': subnav !== {{ loop.index }}}" data-lenis-prevent>
<nav class="space-y-5 text-2xl">
<a href="#" @click.prevent="subnav = false" class="flex gap-3 items-center h-8 text-base text-white/70">
<span class="w-3">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 13 14"><path stroke="#fff" stroke-opacity=".7" d="M6.364 12.657.707 7m0 0 5.657-5.656M.707 7H12.02"/></svg>
</span>
{{ item.title}}
</a>
{% for item in item.children %}
<a href="{{item.url}}" class="flex gap-1 items-center transition-colors hover:text-secondary-50" {{ item.target ? ('target="' ~ item.target ~ '" rel="noopener noreferrer"')|raw }} @click="$store.header.open = false">
{{ item.title }}
{% if item.target %}
<span class="inline-block relative w-[0.6em] -top-[0.1em]">
{% include (baseIncludePath ? baseIncludePath : '') ~ 'svgs/external.twig' %}
</span>
{% endif %}
</a>
{% endfor %}
</nav>
</div>
{% endif %}
{% endfor %}
</div>
</header>