Remove link-secondary from links menu style

master
Will Faught 2 years ago
parent c765fb1981
commit 38da9652bc

@ -2,7 +2,6 @@
{{ $basepath := path.Clean (urls.Parse site.BaseURL).Path }} {{ $basepath := path.Clean (urls.Parse site.BaseURL).Path }}
{{ $breakpoint := $page.Param "paige.menu.breakpoint" | default "sm" }} {{ $breakpoint := $page.Param "paige.menu.breakpoint" | default "sm" }}
{{ $links := false }}
{{ $pills := false }} {{ $pills := false }}
{{ if eq $basepath "/" }} {{ if eq $basepath "/" }}
@ -12,11 +11,9 @@
{{ $pagepath := strings.TrimPrefix $basepath $page.RelPermalink }} {{ $pagepath := strings.TrimPrefix $basepath $page.RelPermalink }}
{{ with $page.Param "paige.menu.style" }} {{ with $page.Param "paige.menu.style" }}
{{ if eq . "links" }} {{ if eq . "pills" }}
{{ $links = true }}
{{ else if eq . "pills" }}
{{ $pills = true }} {{ $pills = true }}
{{ else }} {{ else if ne . "links" }}
{{ errorf "paige/menu: invalid menu style: %q" . }} {{ errorf "paige/menu: invalid menu style: %q" . }}
{{ end }} {{ end }}
{{ else }} {{ else }}
@ -37,7 +34,7 @@
{{ $sectionprefix := (and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section))) }} {{ $sectionprefix := (and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section))) }}
{{ $active := or $home $menuprefix $sectionprefix }} {{ $active := or $home $menuprefix $sectionprefix }}
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" href="{{ .URL | safeURL }}">{{ .Name }}</a> <a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ end }} nav-link" href="{{ .URL | safeURL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</div> </div>
</div> </div>

Loading…
Cancel
Save