privacyguides.org/_includes/nav.html

39 lines
1.7 KiB
HTML
Raw Normal View History

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