Fix navbar active

This commit is contained in:
Pk11 2020-12-27 03:39:20 -06:00
parent 747f324365
commit b10f44b97b

View File

@ -11,7 +11,8 @@
{% for item in site.data[page.collection].nav %} {% for item in site.data[page.collection].nav %}
{% if item.url %} {% if item.url %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link {% if item.title == page.title %} active {% endif %}" href="{% unless page.collection == "en-US" %}/{{ page.collection }}{% endunless %}{{ item.url }}">{{ item.title }}</a> {% assign section = "/" | append: page.section %}
<a class="nav-link {% if item.url == section %} active {% endif %}" href="{% unless page.collection == "en-US" %}/{{ page.collection }}{% endunless %}{{ item.url }}">{{ item.title }}</a>
</li> </li>
{% endif %} {% endif %}
{% if item.items %} {% if item.items %}