Order classes

master
Will Faught 3 years ago
parent 0dca2ca51a
commit f98f3d1af2

@ -22,6 +22,6 @@
{{ $pagePath := strings.TrimPrefix $basePath $p.RelPermalink }}
{{ $menuPath := strings.TrimPrefix $basePath .URL }}
{{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }}
<a href="{{ .URL }}" class="nav-link{{ if $active }} active{{ if $links }} link-secondary{{ end }}{{ end }}"{{ if $active }} aria-current="page"{{ end }}>{{ .Name }}</a>
<a href="{{ .URL }}" class="{{ if $active }}active {{ if $links }}link-secondary {{ end }}{{ end }}nav-link"{{ if $active }} aria-current="page"{{ end }}>{{ .Name }}</a>
{{ end }}
</nav>

Loading…
Cancel
Save