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">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% 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 %}
|
||||
</ul>
|
||||
</div>{# .nav-collapse #}
|
||||
|
|
Reference in a new issue