Skip to content

Commit 2bafd1f

Browse files
committed
Add possibility to use bootstrap4.
1 parent c9d8c4f commit 2bafd1f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
2+
{% for item in items %}
3+
{% if item.visible %}
4+
<a class="dropdown-item {% if item.selected %} active{% endif %}{% if item.children %} dropdown-submenu{% endif %}" href="{{ item.url }}">{{ item.title }}
5+
{% if item.children %}
6+
{% with items=item.children template_name='bootstrap-navbar-submenu.html' %}
7+
{% include template_name %}
8+
{% endwith %}
9+
{% endif %}
10+
</a>
11+
{% endif %}
12+
{% endfor %}
13+
</div>

menu/templates/bootstrap4-navbar.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% for item in menu %}
2+
{% if item.visible %}
3+
{% if item.separator %}
4+
<li class="divider-vertical"></li>
5+
{% endif %}
6+
7+
<li class="nav-item {% if item.selected %} active{% endif %}{% if item.children %} dropdown{% endif %}" id="top-menu-{{ item.slug }}">
8+
<a href="{{ item.url }}" {% if not item.children %}class=nav-link {% endif%} {% if item.children %} class="nav-link dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"{% endif %}>
9+
{% if item.icon %}
10+
<i class="icon-{{ item.icon }} icon-white"></i>&nbsp;
11+
{% endif %}
12+
<span>{{ item.title }}</span>
13+
{% if item.children %}
14+
&nbsp;<b class="caret"></b>
15+
{% endif %}
16+
</a>
17+
{% if item.children %}
18+
{% include 'bootstrap4-navbar-submenu.html' with items=item.children %}
19+
{% endif %}
20+
</li>
21+
{% endif %}
22+
{% endfor %}

0 commit comments

Comments
 (0)