mirror of
https://github.com/rvtr/wiki.git
synced 2025-06-19 03:25:40 -04:00
Fix active
for links in dropdowns
This commit is contained in:
parent
50c9bcece0
commit
d2cdf00464
@ -17,14 +17,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.items %}
|
{% if item.items %}
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link
|
{% assign section = "/" | append: page.section %}
|
||||||
{% for entry in item.items %}
|
<a class="nav-link {% for entry in item.items %}{% if entry.url == section %} active {% endif %}{% endfor %} dropdown-toggle" href="#" id="navbar-dropdown-menu-link-{{ item.title }}" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ item.title }}</a>
|
||||||
{% if entry.page_title == page.title %} active {% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
dropdown-toggle" href="#" id="navbar-dropdown-menu-link-{{ item.title }}" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ item.title }}</a>
|
|
||||||
<div class="dropdown-menu hover-content" aria-labelledby="navbar-dropdown-menu-link-{{ item.title }}">
|
<div class="dropdown-menu hover-content" aria-labelledby="navbar-dropdown-menu-link-{{ item.title }}">
|
||||||
{% for entry in item.items %}
|
{% for entry in item.items %}
|
||||||
<a class="dropdown-item{% if entry.page_title == page.title %} active {% endif %}" href="{% unless page.collection == "en-US" %}/{{ page.collection }}{% endunless %}{{ entry.url }}">{{ entry.title }}</a>
|
<a class="dropdown-item{% if entry.url == section %} active {% endif %}" href="{% unless page.collection == "en-US" %}/{{ page.collection }}{% endunless %}{{ entry.url }}">{{ entry.title }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user