diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 480d8fe7..bd5fadd5 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -7,105 +7,7 @@ {{/* Main menu */}} {{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }} {{ end }} diff --git a/layouts/partials/header/basic/basic-content.html b/layouts/partials/header/basic/basic-content.html new file mode 100644 index 00000000..3b4d7d65 --- /dev/null +++ b/layouts/partials/header/basic/basic-content.html @@ -0,0 +1,99 @@ +{{ if .Site.Menus.main }} + {{ range .Site.Menus.main }} + {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }} + {{ continue }} + {{ end }} +
  • + {{ if eq .Params.action "search" }} + {{ $.Scratch.Add "searchCount" 1 }} + {{ if $.Site.Params.enableSearch | default false }} + + {{ end }} + {{ else if eq .Params.action "appearance" }} + {{ $.Scratch.Add "switchCount" 1 }} + + {{ else if eq .Params.action "locale" }} + {{ $.Scratch.Add "localeCount" 1 }} + {{ partial "translations.html" . }} + {{ else }} + {{ with .Params.icon }} + + {{- partial "icon.html" . -}} + + {{- end -}}{{- if .Params.showName | default true -}} + {{ .Name | markdownify | emojify }} + {{ end }} + {{ end }} +
  • + {{ end }} + {{ if and ($.Site.Params.enableSearch | default false) (eq ($.Scratch.Get "searchCount") 0) }} +
  • + +
  • + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/header/hamburger.html b/layouts/partials/header/hamburger.html index fbd5e12c..ddd58df1 100644 --- a/layouts/partials/header/hamburger.html +++ b/layouts/partials/header/hamburger.html @@ -7,124 +7,7 @@ {{/* Hamburger menu */}} {{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }} {{ end }} diff --git a/layouts/partials/header/hamburger/hamburger-content.html b/layouts/partials/header/hamburger/hamburger-content.html new file mode 100644 index 00000000..bcf2f45d --- /dev/null +++ b/layouts/partials/header/hamburger/hamburger-content.html @@ -0,0 +1,118 @@ + +
    + {{ partial "icon.html" "bars" }} +
    + \ No newline at end of file diff --git a/layouts/partials/header/hybrid.html b/layouts/partials/header/hybrid.html index 69aba1e1..122b09bf 100644 --- a/layouts/partials/header/hybrid.html +++ b/layouts/partials/header/hybrid.html @@ -5,229 +5,13 @@ {{ partial "logo.html" . }} {{ if or .Site.Menus.main (.Site.Params.enableSearch | default false) }} - {{/* Hamburger menu */}} {{/* Basic menu */}} {{ end }}