mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -06:00
Fix navbar highlighting on section page itself
This commit is contained in:
parent
c0426f191a
commit
fde24f7438
@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
{{ $isActive := false }}
|
{{ $isActive := false }}
|
||||||
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
{{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}}
|
||||||
|
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
|
||||||
{{ $isActive = true }}
|
{{ $isActive = true }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user