GravTheme/templates/partials/header.html.twig

66 lines
3.0 KiB
Twig

{% macro menu(menuid,pages) %}
<!-- UNSEARCHABLE -->
<div id="{{ menuid }}">
<div id="{{ menuid }}-container">
<div class="hamburger-button hamburger-component">
<div>
<div>
<div class="hamburger-bar"></div>
<div class="hamburger-bar"></div>
<div class="hamburger-bar"></div>
</div>
</div>
</div>
<ul class="menu-mobile-animated hidden">
<div class="hamburger-menu-background-container hamburger-component">
<div class="hamburger-menu-background menu-mobile menu-mobile-animated hidden">
<div class="hamburger-menu-close-button"><span>&times;</span></div>
</div>
</div>
{%- for page in pages.children.visible %}{% set active_page = (page.active or page.activeChild) ? ' nav-label-active' : '' %}<li class="{% if page.children.visible.count > 0 %}nav-level{% else %}imPage{% endif %}{{ active_page }}">
<a class="main-nav-label" href="{% if page.routable %}{{ page.url(true)|e }}{% else %}#{% endif %}" {% if page.header.external_url %}target="_blank"{% endif %}>{{ page.menu }}</a>
{%- if page.children.visible.count > 0 %}
<ul data-original-position="open-bottom" class="open-bottom">
{%- for cpage in page.children.visible %}
{% set active_cpage = (cpage.active or cpage.activeChild) ? ' nav-label-active' : '' %}
<li class="nav-level{{ active_cpage }}">
<a class="sub-nav-label" href="{{ cpage.url(true)|e }}" {% if cpage.header.external_url %}target="_blank"{% endif %}>{{ cpage.menu }}</a>
</li>
{% endfor -%}
</ul>
{% endif -%}
</li>{% endfor -%}
</ul>
</div>
</div><!-- UNSEARCHABLE END -->
{% endmacro %}
<header id="imHeader">
<div id="imHeaderObjects">
<div id="imHeader_imObjectImage_02_wrapper" class="template-object-wrapper">
<img loading="lazy" alt="4Creative Logo" style="position: relative; left: 0px; top: 0px; user-select: none;" draggable="false" unselectable="on" src="/{{ theme.header.logo|first.path|e }}">
</div>
<div id="nav-top_wrapper" class="template-object-wrapper">
{{ _self.menu('nav-top',pages) }}
</div>
<div id="imHeader_imObjectTitle_05_wrapper" class="template-object-wrapper">
<div id="imHeader_imObjectTitle_05"><span id="imHeader_imObjectTitle_05_text">Weltenverbund im Opensim</span></div>
</div>
</div>
</header>
<div id="imStickyBarContainer">
<div id="imStickyBarGraphics"></div>
<div id="imStickyBar">
<div id="imStickyBarObjects">
<div id="imStickyBar_imObjectImage_02_wrapper" class="template-object-wrapper">
<div id="imStickyBar_imObjectImage_02">
<img loading="lazy" alt="4Creative Logo transparent" style="width: 110px; height: 64px; position: relative; left: 0px; top: 0px; user-select: none;" draggable="false" width="110" height="64" unselectable="on" src="/{{ theme.header.stickylogo|first.path|e }}">
</div>
</div>
<div id="nav-sticky_wrapper" class="template-object-wrapper">
{{ _self.menu('nav-sticky',pages) }}
</div>
</div>
</div>
</div>
<a class="imHidden" href="#imGoToCont" title="Überspringen Sie das Hauptmenü">Direkt zum Seiteninhalt</a>