forked from data.coop/website
Mark current page active in menu (#49)
This commit is contained in:
commit
e33bf7b8c5
|
@ -1,15 +1,16 @@
|
||||||
<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>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<ol>
|
<ol>
|
||||||
{{ range $.Site.Home.AllTranslations }}
|
{{ range $.Site.Home.AllTranslations }}
|
||||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ol>
|
</ol>
|
||||||
</footer>
|
</footer>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue