Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/frjo/hugo-theme-zen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Jonsson <frjo@xdeb.org>2022-09-12 17:19:51 +0300
committerFredrik Jonsson <frjo@xdeb.org>2022-09-12 17:19:51 +0300
commit35443bce5c4cf0a970eba3912057cd900b6e6155 (patch)
treebf29c4edad91d81e3d6d9ac8cda30b45f4ecf29a
parent4d3658251f4e860b5424f2c36f4147a8b36022f1 (diff)
Add setting menuInHeader to allow the manin menu to be moved to the header.
-rw-r--r--README.md1
-rw-r--r--layouts/_default/baseof.html3
2 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 250fa40..08ed327 100644
--- a/README.md
+++ b/README.md
@@ -227,6 +227,7 @@ params:
mainSections: # The sections you want to have listed on the front page.
- "section1" # Default to the section with most content if not set.
- "section2" # Set to empty if no section should be listed.
+ menuInHeader: true # Move the main menu to the header, default false.
microUsername: "" # Your micro.blog username.
mobileMenu: true # Turn on a mobile menu on small screens, default false.
piwikSiteId: # Matamo site id
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7c00a8b..e5210e5 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -21,10 +21,11 @@
</h1>
<div class="region header__region">
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end -}}
+{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
</div>
</header>
-{{ partial "menu.html" . }}
+{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
{{ block "main" . }}{{ end }}