diff options
Diffstat (limited to 'layouts/partials/main-menu-mobile.html')
-rw-r--r-- | layouts/partials/main-menu-mobile.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/main-menu-mobile.html b/layouts/partials/main-menu-mobile.html index 5211ea7..5b6e2a2 100644 --- a/layouts/partials/main-menu-mobile.html +++ b/layouts/partials/main-menu-mobile.html @@ -2,7 +2,9 @@ <ul> {{ $currentPage := . }} {{ range .Site.Menus.main }} - <li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"> + {{ $active := or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} + {{ $active = or $active (eq (.URL | relLangURL) ($currentPage.RelPermalink | relLangURL)) }} + <li class="menu-item-{{ .Name | lower }} {{ if $active }}active{{ end }}"> <a href="{{ .URL }}"> <span>{{ .Name }}</span> </a> |