mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-21 20:03:18 -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 }}
|
||||
{{ $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 }}
|
||||
{{ end }}
|
||||
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
||||
|
Loading…
Reference in New Issue
Block a user