navbar menu highlight when in single page

This commit is contained in:
zzossig 2020-01-02 16:28:37 +09:00
parent dd5918ae73
commit 1bc2c744ff
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@
{{ $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) }}
{{ $active = or $active (eq .Name $current.Title) }}
{{ $active = or $active (eq (lower .URL) (lower $current.Title)) }}
{{ $active = or $active (eq (lower .URL) (lower $current.Type)) }}
{{ if .HasChildren }}
<div class="navbar__dropdown navbar__slide-down">
<a href="{{ .URL | relLangURL }}" class="navbar__menu-item {{ if $active }}active{{ end }}">