add menu active class
This commit is contained in:
parent
7abe373063
commit
0532220ff3
1 changed files with 2 additions and 1 deletions
|
@ -92,8 +92,9 @@
|
|||
|
||||
{{ if site.Menus.main }}
|
||||
<nav class="menu">
|
||||
{{ $url := .URL }}
|
||||
{{ range site.Menus.main }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
<a class="{{ if eq $url .URL }}active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue