+
+ {{ $p := . -}}
+ {{ $last := len .Site.Menus.main -}}
+ {{ range $i, $e := .Site.Menus.main -}}
+ {{ $longContent := gt (len $e.Name) 8 -}}
+ {{ $isLast := eq $i (sub $last 1) -}}
+ -
+ {{ $active := or ($p.IsMenuCurrent "main" $e) ($p.HasMenuCurrent "main" $e) -}}
+ {{ with $e.Page }}{{ $active = or $active ( $.IsDescendant $e) }}{{ end -}}
+ {{ $pre := $e.Pre -}}
+ {{ $post := $e.Post -}}
+ {{ $url := urls.Parse $e.URL -}}
+ {{ $baseurl := urls.Parse $.Site.Params.Baseurl -}}
+
{{- with $e.Pre }}{{ $pre }}{{ end -}}
{{- $e.Name -}}
{{- with $e.Post }}{{ $post }}{{ end -}}
-
-
- {{ end -}}
- -
-
-
- -
- {{ partial "theme-toggler" . }}
-
- {{ if .Site.Params.versions -}}
- -
- {{ partial "navbar-version-selector.html" . -}}
-
- {{ end -}}
- {{ if (gt (len .Site.Home.Translations) 0) -}}
- -
- {{ partial "navbar-lang-selector.html" . -}}
-
- {{ end -}}
-
+
+
+ {{ end -}}
+
+
+
+
+ {{ partial "search-input.html" . }}
+
+
+ {{ partial "theme-toggler" . }}
+
+ {{ if .Site.Params.versions -}}
+
+ {{ partial "navbar-version-selector.html" . -}}
+
+ {{ end -}}
+ {{ if (gt (len .Site.Home.Translations) 0) -}}
+
+ {{ partial "navbar-lang-selector.html" . -}}
+
+ {{ end -}}
+
+