File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
website_and_docs/layouts/partials Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 1010 < ul class ="navbar-nav mr-4 mb-2 mb-lg-0 ps-4 ps-lg-2 ">
1111 {{ $p := . }}
1212 {{ range .Site.Menus.main }}
13- < li class ="nav-item mr-4 mb-2 mb-lg-0 ">
14- {{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }}
15- {{ with .Page }}
16- {{ $active = or $active ( $.IsDescendant .) }}
17- {{ end }}
18- {{ $pre := .Pre }}
19- {{ $post := .Post }}
20- {{ $url := urls.Parse .URL }}
21- {{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
22- {{ if .HasChildren }}
13+ {{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }}
14+ {{ with .Page }}
15+ {{ $active = or $active ( $.IsDescendant .) }}
16+ {{ end }}
17+ {{ $pre := .Pre }}
18+ {{ $post := .Post }}
19+ {{ $url := urls.Parse .URL }}
20+ {{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
21+ {{ if .HasChildren }}
2322 < li class ="nav-item dropdown ">
2423 < a class ="nav-link {{if $active }} active{{end}} dropdown-toggle " href ="# " id ="navbarDropdown " role ="button " data-bs-toggle ="dropdown " aria-haspopup ="true " aria-expanded ="false ">
2524 {{ .Name }}
3130 {{ end }}
3231 </ div >
3332 </ li >
34- {{ else }}
35- < a class ="nav-link{{if $active }} active{{end}} " href ="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }} " {{ if ne $url.Host $baseurl.Host }}target ="_blank " {{ end }} > {{ with .Pre}}{{ $pre }}{{ end }}< span {{if $active }} class ="active "{{end}} > {{ .Name }}</ span > {{ with .Post}}{{ $post }}{{ end }}</ a >
36- {{ end }}
37- </ li >
33+ {{ else }}
34+ < li class ="nav-item mr-4 mb-2 mb-lg-0 ">
35+ < a class ="nav-link{{if $active }} active{{end}} " href ="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }} " {{ if ne $url.Host $baseurl.Host }}target ="_blank " {{ end }} > {{ with .Pre}}{{ $pre }}{{ end }}< span {{if $active }} class ="active "{{end}} > {{ .Name }}</ span > {{ with .Post}}{{ $post }}{{ end }}</ a >
36+ </ li >
37+ {{ end }}
3838 {{ end }}
3939 {{ if .Site.Params.versions }}
4040 < li class ="nav-item dropdown d-none d-lg-block ">
You can’t perform that action at this time.
0 commit comments