1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-21 01:52:19 +01:00

layouts/_default/baseof.html: Add "active" class to nav if page is home

Not sure how to do this for other pages yet, but I'll solve that
once I start enumerating pages into the nav.
This commit is contained in:
Alan Orth 2016-09-14 14:55:29 +03:00
parent 6d2693465c
commit 2bb9509bbb
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -28,7 +28,7 @@
<div class="blog-masthead"> <div class="blog-masthead">
<div class="container"> <div class="container">
<nav class="nav blog-nav"> <nav class="nav blog-nav">
<a class="nav-link" href="{{ .Site.BaseURL }}">Home</a> <a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL }}">Home</a>
</nav> </nav>
</div> </div>
</div> </div>