87 lines
5.6 KiB
HTML
87 lines
5.6 KiB
HTML
<header id="header-container" class="bg-inherit">
|
|
<div class="z-10 bg-dark1 w-screen">
|
|
<div class="relative z-50">
|
|
<div class="mx-auto bg-dark1 flex z-50 bg-transparent justify-between items-center pl-6 pr-2 md:pl-0 md:pr-0 lg:py-5 sm:px-8 md:px-12 py-2 lg:px-20 lg:justify-start lg:space-x-20">
|
|
<div>
|
|
<a href="/" class="flex">
|
|
<img src="images/tf_dark.png" alt="ODFZ Logo" />
|
|
</a>
|
|
</div>
|
|
<div class="-mr-2 -my-2 lg:hidden">
|
|
<button id="hamburger-btn" class="menu-mobile inline-flex items-center justify-center p-2 rounded-md text-white hover:text-gray-200 hover:bg-gray-800 focus:outline-none transition duration-150 ease-in-out my-2">
|
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
|
</svg>
|
|
</button>
|
|
<button id="close-hamburger-btn" class="menu-mobile hidden inline-flex items-center justify-center p-2 rounded-md text-white hover:text-gray-500 hover:bg-gray-700 focus:outline-none transition duration-150 ease-in-out my-2">
|
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="hidden lg:flex-1 lg:flex lg:items-center lg:justify-end lg:space-x-12">
|
|
<nav class="flex space-x-10">
|
|
{% for header_item in header_items %}
|
|
{% if not loop.first %}
|
|
{% set header_arr = header_item | split(pat="</li>") %}
|
|
{% set header_label = header_arr[0] %}
|
|
{% if '<a' in header_label %}
|
|
{% set link_label = header_label | striptags %}
|
|
{% set link_path = header_label | split(pat="%22") | safe%}
|
|
{% set current = get_url(path=link_path[1]) ~ "/" %}
|
|
{% if header_label is containing("http") %}
|
|
{% if header_label is not containing("threefold") %}
|
|
<a href="{{link_path[1]}}" target="_blank" class="text-lg py-3 leading-6 font-medium text-gray-900 hover:text-gray-500 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
|
{{link_label}}
|
|
</a>
|
|
{% endif %}
|
|
{% elif current_url and current == current_url %}
|
|
<a href="{{ get_url(path=link_path[1])}}" class="text-lg py-3 leading-6 font-normal active hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
|
{{link_label}}
|
|
</a>
|
|
{% else %}
|
|
<a href="{{ get_url(path=link_path[1])}}" class="text-lg py-3 leading-6 font-normal text-gray-900 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
|
{{link_label}}
|
|
</a>
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="relative">
|
|
{% set button_id = header_label ~ "-menu-btn" | slugify %}
|
|
<button type="button" id="{{button_id}}" class="nav_btn py-3 text-gray-900 group inline-flex items-center space-x-2 text-lg leading-6 font-normal hover:text-gray-500 focus:outline-none transition ease-in-out duration-150">
|
|
<span>{{ header_label }}</span>
|
|
<div class="-rotate-90 transition-transform"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg></div>
|
|
</button>
|
|
</div>
|
|
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% for header_item in header_items %}
|
|
{% set header_parts = header_item | split(pat="</li>") %}
|
|
{% set header_label = header_parts[0] %}
|
|
{% set header_menu = header_parts[1] %}
|
|
{% set menu_id = header_label ~ "-menu" | slugify %}
|
|
<nav>
|
|
<div id="{{menu_id}}" class="mt-16 z-30 absolute inset-x-0 transform lg:backdrop-blur transition duration-200 ease-in opacity-0 -translate-y-1 hidden">
|
|
<div class="bg-gray-800 lg:bg-gray-900">
|
|
<div class="mx-8 lg:mx-20 px-6 py-4 text-white">
|
|
{{ header_menu | safe }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{% endfor %}
|
|
</div>
|
|
</header>
|
|
|
|
<style>
|
|
.bg-dark1 {
|
|
background: rgba(15,15,15,1);
|
|
}
|
|
</style>
|