From 35443bce5c4cf0a970eba3912057cd900b6e6155 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Mon, 12 Sep 2022 16:19:51 +0200 Subject: [PATCH] Add setting menuInHeader to allow the manin menu to be moved to the header. --- README.md | 1 + layouts/_default/baseof.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 @@
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end -}} +{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
-{{ partial "menu.html" . }} +{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}} {{ block "main" . }}{{ end }}