Mark current page active in menu #49

Merged
valberg merged 1 commit from benjaoming/website:active-menu-item into new 2022-11-12 05:58:20 +00:00
Showing only changes of commit e939f07c03 - Show all commits

View file

@ -1,15 +1,16 @@
<nav>
<ol>
{{ $currentPage := . }}
{{ range .Site.Menus.nav }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
<li><a href="{{ .URL }}"{{ if (eq $currentPage.URL .URL) }} class="active"{{ end }}>{{ .Name }}</a></li>
{{ end }}
</ol>
<footer>
<ol>
{{ range $.Site.Home.AllTranslations }}
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
{{ end }}
</ol>
</footer>
</nav>