forked from kondasoft/ks-bootshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar-desktop-menu.liquid
40 lines (40 loc) · 1.34 KB
/
navbar-desktop-menu.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<ul class="nav-desktop-menu nav justify-content-center">
{% for link in linklists[block.settings.main_menu].links %}
<li class="nav-item {% if link.links %}dropdown{% endif %}">
{% if link.links == blank %}
<a
class="nav-link {% if link.active %}active{% endif %}"
href="{{ link.url }}"
aria-current="{% if link.active %}page{% endif %}">
{{ link.title }}
</a>
{% else %}
<a
class="nav-link dropdown-toggle {% if link.child_active %}active{% endif %}"
href="#"
data-bs-toggle="dropdown"
data-bs-display="static"
aria-expanded="false"
role="button">
{{ link.title }}
</a>
<ul class="dropdown-menu">
{% for child_link in link.links %}
<li>
{% if child_link.title == '-' %}
<hr class="dropdown-divider">
{% else %}
<a
class="dropdown-item {% if child_link.active %}active{% endif %}"
href="{{ child_link.url }}"
aria-current="{% if child_link.active %}page{% endif %}">
{{ child_link.title }}
</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>