Add active styling programatically

This commit is contained in:
Oliver Davies 2015-08-31 20:04:50 +01:00
parent a40d14f826
commit 48e4b94175

View file

@ -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 #}