Compare commits

..

2 commits

Author SHA1 Message Date
valberg e33bf7b8c5 Mark current page active in menu (#49)
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-12 05:58:20 +00:00
Benjamin Bach e939f07c03
Mark current page active in menu
All checks were successful
continuous-integration/drone/pr Build is passing
2022-11-12 00:17:57 +01:00

View file

@ -1,7 +1,8 @@
<nav> <nav>
<ol> <ol>
{{ $currentPage := . }}
{{ range .Site.Menus.nav }} {{ 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 }} {{ end }}
</ol> </ol>