Commit f46204d9 authored by Avris's avatar Avris

Bootstrap 4

parent b397b680
<div class="navbar navbar-expand-lg {{ class|default('fixed-top navbar-dark bg-primary') }}">
<div class="container">
<a href="{{ brand.link }}" class="navbar-brand">
{% if brand.image is defined %}
<img src="{{ brand.image.src }}" alt="{{ brand.image.alt|default('') }}"/>
{% endif %}
{{ brand.text }}
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
{% for nav in navs %}
<ul class="navbar-nav {{ nav.class|default('') }}">
{% for item in nav.items if item.condition is not defined or item.condition %}
{% if item.items is defined %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle {{ subitem.class|default('') }}" data-toggle="dropdown" href="#" id="{{ item.id }}" aria-expanded="false">
{% if item.icon is defined %}<span class="{{ item.icon }}"></span>{% endif %}
{% if item.wrapper is defined%}<span class="{{ item.wrapper }}">{% endif %}
{{ item.html|default('')|raw }}
{{ item.text|default('') }}
{% if item.wrapper is defined%}</span>{% endif %}
<span class="caret"></span>
</a>
<div class="dropdown-menu" aria-labelledby="{{ item.id }}">
{% for subitem in item.items if subitem.condition is not defined or subitem.condition %}
{% if subitem.divider|default(false) %}
<div class="dropdown-divider"></div>
{% else %}
<a class="dropdown-item {{ subitem.class|default('') }}" href="{{ subitem.link }}" {% if subitem.external|default(false) %}target="_blank" rel="noopener"{% endif %}>
{% if subitem.icon is defined %}<span class="{{ subitem.icon }}"></span>{% endif %}
{{ subitem.html|default('')|raw }}
{{ subitem.text|default('') }}
</a>
{% endif %}
{% endfor %}
</div>
</li>
{% else %}
<li class="nav-item {{ subitem.class|default('') }}">
<a class="nav-link" href="{{ item.link }}" {% if item.external|default(false) %}target="_blank" rel="noopener"{% endif %}>
{% if item.icon is defined %}<span class="{{ item.icon }}"></span>{% endif %}
{% if item.wrapper is defined%}<span class="{{ item.wrapper }}">{% endif %}
{{ item.html|default('')|raw }}
{{ item.text|default('') }}
{% if item.wrapper is defined%}</span>{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment