Add active styling programatically
This commit is contained in:
parent
a40d14f826
commit
48e4b94175
|
@ -44,7 +44,7 @@
|
||||||
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% for link in site.main_menu %}
|
{% for link in site.main_menu %}
|
||||||
<li class="nav__{{ link.title|lower }}"><a href="{{ link.href }}">{{ link.title }}</a></li>
|
<li class="nav__{{ link.title|lower }}{% if page.url ~ '/' == link.href %} active{% endif %}"><a href="{{ link.href }}">{{ link.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>{# .nav-collapse #}
|
</div>{# .nav-collapse #}
|
||||||
|
|
Loading…
Reference in a new issue