Commit c0b78fd9 authored by Yohan Jarosz's avatar Yohan Jarosz

add active class in headers

parent 00d93676
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
{% assign link = nav | split:"$" %} {% assign link = nav | split:"$" %}
{% assign myurl = link[0] %} {% assign myurl = link[0] %}
{% if myurl contains '://' %} {% if myurl contains '://' %}
<li class="{% if page.url contains nav %}active{% endif %}"><a href="{{myurl}}">{{link[1]}}</a></li> <li class="{% if page.url contains myurl %}active{% endif %}"><a href="{{myurl}}">{{link[1]}}</a></li>
{% else %} {% else %}
<li class="{% if page.url contains nav %}active{% endif %}"><a href="{{myurl}}.html">{{link[1]}}</a></li> <li class="{% if page.url contains myurl %}active{% endif %}"><a href="{{myurl}}.html">{{link[1]}}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment