🐛 Fixed the children menus links.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<nav class="site-nav">
|
||||
<ul class="main-menu menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ $active := $curP.IsMenuCurrent "main" . }}
|
||||
{{ $active := $curP.IsMenuCurrent .Menu . }}
|
||||
<li class="menu-item menu-item-{{ .Identifier }}">
|
||||
<a href="{{ .URL | relLangURL }}" class="{{ if .HasChildren }}menus-parent{{ end }} hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
|
||||
{{ if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{ .Name }}
|
||||
@@ -15,9 +15,9 @@
|
||||
{{ if .HasChildren }}
|
||||
<ul class="menu-children">
|
||||
{{ range .Children }}
|
||||
{{ $active = $curP.IsMenuCurrent "main" . }}
|
||||
{{ $active = or ($curP.IsMenuCurrent .Menu .) ($curP.HasMenuCurrent .Menu .) }}
|
||||
<li class="menu-child-item">
|
||||
<a href="{{ .URL | relLangURL }}" class="hvr-icon-pulse {{if $active }}menu-item-active{{ end }}" rel="section">
|
||||
<a href="{{ .PageRef | relLangURL }}" class="hvr-icon-pulse {{if $active }}menu-item-active{{ end }}" rel="section">
|
||||
<i class="fa hvr-icon"></i>{{ .Name }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user