Boding the current section on the main menu

This commit is contained in:
Felipe M 2018-03-25 13:09:04 +02:00
parent 683dd93aa3
commit 49a173baaa
Signed by: fmartingr
GPG key ID: 716BC147715E716F
2 changed files with 7 additions and 4 deletions

View file

@ -50,6 +50,9 @@ p:first-child
.text-right
text-align: right
.text-bold
font-weight: bold
.text-size-normal
font-size: $font-size-normal

View file

@ -23,10 +23,10 @@
<h1>Felipe Martín</h1>
<h2>Be incomprehensible. If they can't understand, they can't disagree.</h2>
<nav class="main-menu">
<a href="{{ '/'|url }}">/about</a> &nbsp;
<a href="{{ '/blog'|url }}">/blog</a> &nbsp;
<a href="{{ '/portfolio'|url }}">/portfolio</a> &nbsp;
<a href="{{ '/contact'|url }}">/contact</a>
<a {% if this.path == '/' %}class="text-bold"{% endif %} href="{{ '/'|url }}">/about</a> &nbsp;
<a {% if this.is_child_of('/blog') %}class="text-bold"{% endif %} href="{{ '/blog'|url }}">/blog</a> &nbsp;
<a {% if this.is_child_of('/portfolio') %}class="text-bold"{% endif %} href="{{ '/portfolio'|url }}">/portfolio</a> &nbsp;
<a {% if this.is_child_of('/contact') %}class="text-bold"{% endif %} href="{{ '/contact'|url }}">/contact</a>
</nav>
<hr class="light">
</header>