2025-01-08 18:06:08 +01:00
|
|
|
<!-- Template for Subitems -->
|
|
|
|
{% macro render_subitems(subitems) %}
|
|
|
|
{% for subitem in subitems %}
|
|
|
|
{% if subitems.subitems %}
|
|
|
|
<li class="dropdown-submenu">
|
|
|
|
<a class="dropdown-item dropdown-toggle" href="#">
|
|
|
|
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
{{ render_subitems(subitem.subitems) }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{% elif subitem.popup %}
|
|
|
|
<li>
|
|
|
|
<a class="dropdown-item" onclick='openDynamicPopup({{subitem|tojson|safe}})''>
|
|
|
|
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li>
|
|
|
|
<a class="dropdown-item" href="{{ subitem.href }}" {% if subitem.target %} target="{{subitem.target}}" {% endif %}>
|
|
|
|
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endmacro %}
|
2025-01-08 17:09:45 +01:00
|
|
|
|
|
|
|
<!-- Navigation Bar -->
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<!--
|
|
|
|
<a class="navbar-brand" href="#">Navbar</a>
|
|
|
|
-->
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
2025-01-08 19:37:24 +01:00
|
|
|
<ul class="navbar-nav {% if menu_type == 'header' %}ms-auto{% endif %}">
|
|
|
|
{% for item in navigation[menu_type] %}
|
2025-01-08 17:09:45 +01:00
|
|
|
{% if item.href %}
|
|
|
|
<!-- Single Item -->
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{{ item.href }}">
|
|
|
|
<i class="{{ item.icon_class }}"></i> {{ item.name }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<!-- Dropdown Menu -->
|
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown{{ loop.index }}" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
|
|
<i class="{{ item.icon_class }}"></i> {{ item.name }}
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu" aria-labelledby="navbarDropdown{{ loop.index }}">
|
|
|
|
{{ render_subitems(item.subitems) }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2025-01-08 18:06:08 +01:00
|
|
|
</nav>
|