privacyguides.org/_includes/nav.html

39 lines
1.8 KiB
HTML
Raw Normal View History

2021-01-17 03:50:44 +01:00
<nav class="navbar navbar-expand-lg navbar-light bg-primary">
2020-04-28 23:09:22 +02:00
<div class="container">
2020-05-12 18:15:32 +02:00
<a class="navbar-brand" href="/">
2021-01-16 06:13:01 +01:00
<h1>{% include svg/privacy-guides-logo.svg %}</h1>
2020-05-12 18:15:32 +02:00
</a>
2021-05-04 04:13:50 +02:00
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
2020-04-28 23:09:22 +02:00
<span class="navbar-toggler-icon"></span>
</button>
2020-12-04 05:44:27 +01:00
<div class="collapse navbar-collapse" id="navbarSupportedContent">
2021-05-04 04:13:50 +02:00
<div class="ms-auto"></div>
2020-04-28 23:09:22 +02:00
<ul class="navbar-nav mt-2 mt-lg-0">
2021-05-03 16:01:08 +02:00
{% for item_hash in site.data.nav %}
{% assign item = item_hash[1] %}
{% if item.type == "link" %}
2020-04-28 23:09:22 +02:00
<li class="nav-item">
2021-05-03 16:01:08 +02:00
<a class="nav-link" href="{% link {{ item.file }} %}">{{ item.title }}</a>
2020-12-04 05:44:27 +01:00
</li>
2021-05-03 16:01:08 +02:00
{% elsif item.type == "dropdown" %}
2020-12-04 05:44:27 +01:00
<li class="nav-item dropdown">
2021-05-04 04:13:50 +02:00
<a class="nav-link dropdown-toggle" href="#" id="providerDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2021-05-03 16:01:08 +02:00
{{ item.title }}
2020-12-04 05:44:27 +01:00
</a>
2021-05-04 04:13:50 +02:00
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
2021-05-03 16:01:08 +02:00
{% for subitem in item.items %}
{% if subitem.type == "link" %}
<a class="dropdown-item" href="{% link {{ subitem.file }} %}{%- if subitem.anchor -%}#{{ subitem.anchor }}{%- endif -%}"><span class="{{ subitem.icon | default: "fad fa-file" }} fa-fw"></span> {{ subitem.title }}</a>
{% elsif subitem.type == "divider" %}
<div class="dropdown-divider"></div>
{% endif %}
{% endfor %}
2020-12-04 05:44:27 +01:00
</div>
</li>
2021-05-03 16:01:08 +02:00
{% endif %}
{% endfor %}
2020-04-28 23:09:22 +02:00
</ul>
2020-05-12 08:28:28 +02:00
</div>
2020-04-28 23:09:22 +02:00
</div>
</nav>