forked from data.coop/website
Mark current page active in menu
This commit is contained in:
parent
8af9ecc791
commit
e939f07c03
|
@ -1,7 +1,8 @@
|
|||
<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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue