From 2ca6096cdff492d092723abd5ac235f8c6acf8cc Mon Sep 17 00:00:00 2001 From: Wen Junhua Date: Sun, 26 Nov 2023 23:15:17 +0800 Subject: [PATCH] fix: update hybrid menu as well --- exampleSite/config/_default/params.toml | 2 +- layouts/partials/head.html | 2 +- layouts/partials/header/hybrid.html | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index af12c3de..9e2bcb74 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -17,7 +17,7 @@ enableImageLazyLoading = true fingerprintAlgorithm = "sha256" [header] - layout = "hamburger" # valid options: basic, hamburger, hybrid, custom + layout = "hybrid" # valid options: basic, hamburger, hybrid, custom # logo = "img/logo.jpg" # logoDark = "img/dark-logo.jpg" showTitle = true diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 6a0c35fe..add457c7 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -47,7 +47,7 @@ {{ $jsCode := resources.Get "js/code.js" }} {{ $assets.Add "js" (slice $jsCode) }} {{ end }} - {{ if eq .Site.Params.header.layout "hamburger" }} + {{ if or (eq .Site.Params.header.layout "hamburger") (eq .Site.Params.header.layout "hybrid") }} {{ $jsMenu := resources.Get "js/menu.js" }} {{ $assets.Add "js" (slice $jsMenu) }} {{ end }} diff --git a/layouts/partials/header/hybrid.html b/layouts/partials/header/hybrid.html index b07bb523..34440e34 100644 --- a/layouts/partials/header/hybrid.html +++ b/layouts/partials/header/hybrid.html @@ -93,6 +93,7 @@ {{ with .Params.icon }}