1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2025-05-08 05:26:00 +02: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:
2016-09-14 14:55:29 +03:00
parent 6d2693465c
commit 2bb9509bbb

View File

@ -28,7 +28,7 @@
<div class="blog-masthead">
<div class="container">
<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>
</div>
</div>