From 25a60fffd1551e671e8ba29f50ca03680d03179b Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Wed, 26 Apr 2023 18:49:53 +0100 Subject: [PATCH 01/14] =?UTF-8?q?=E2=9C=A8[#676]=20Add=20logo=20dark/light?= =?UTF-8?q?=20mode=20switching=20mechanism?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/appearance.js | 29 ++++++++++++++++++++++++++--- config/_default/languages.en.toml | 1 + 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/assets/js/appearance.js b/assets/js/appearance.js index 0acf9f18..d0663390 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -26,16 +26,20 @@ window.addEventListener("DOMContentLoaded", (event) => { const switcher = document.getElementById("appearance-switcher"); const switcherMobile = document.getElementById("appearance-switcher-mobile"); + var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" updateMeta() + updateLogo(targetAppearance) if (switcher) { switcher.addEventListener("click", () => { document.documentElement.classList.toggle("dark"); + var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" localStorage.setItem( "appearance", - document.documentElement.classList.contains("dark") ? "dark" : "light" + targetAppearance ); updateMeta() + updateLogo(targetAppearance) }); switcher.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -45,11 +49,13 @@ window.addEventListener("DOMContentLoaded", (event) => { if (switcherMobile) { switcherMobile.addEventListener("click", () => { document.documentElement.classList.toggle("dark"); + var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" localStorage.setItem( "appearance", - document.documentElement.classList.contains("dark") ? "dark" : "light" + targetAppearance ); updateMeta() + updateLogo(targetAppearance) }); switcherMobile.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -64,4 +70,21 @@ var updateMeta = () => { elem = document.querySelector('body'); style = getComputedStyle(elem); document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor); -} \ No newline at end of file +} + +var updateLogo = (targetAppearance) => { + {{ if and (.Site.Params.Logo) (.Site.Params.SecondaryLogo) }} + {{ $primaryLogo := resources.Get .Site.Params.Logo }} + {{ $secondaryLogo := resources.Get .Site.Params.SecondaryLogo }} + {{ if and ($primaryLogo) ($secondaryLogo) }} + var elems; + elems = document.querySelectorAll("img.logo") + targetLogoPath = + targetAppearance == "{{ .Site.Params.DefaultAppearance }}" ? + "{{ $primaryLogo.RelPermalink }}" : "{{ $secondaryLogo.RelPermalink }}" + for (const elem of elems) { + elem.setAttribute("src", targetLogoPath) + } + {{ end }} + {{- end }} +} diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index 379c57ba..31e570ba 100644 --- a/config/_default/languages.en.toml +++ b/config/_default/languages.en.toml @@ -7,6 +7,7 @@ rtl = false title = "Blowfish" # logo = "img/logo.png" +# secondaryLogo = "img/secondary-logo.png" # description = "My awesome website" # copyright = "Copy, _right?_ :thinking_face:" From 9e7abf32cf518ccca8be84d8683617781e6c9b4f Mon Sep 17 00:00:00 2001 From: schachem <39915210+schachem@users.noreply.github.com> Date: Sun, 30 Apr 2023 14:25:25 +0200 Subject: [PATCH 02/14] Fix missing URL for Top-level menu entry in nested menue --- layouts/partials/header/header-option-nested.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/partials/header/header-option-nested.html b/layouts/partials/header/header-option-nested.html index 1cc761b4..068f30e0 100644 --- a/layouts/partials/header/header-option-nested.html +++ b/layouts/partials/header/header-option-nested.html @@ -5,7 +5,8 @@ {{ partial "icon.html" .Pre }} {{ end }} - + {{ .Name | markdownify | emojify }} @@ -31,4 +32,4 @@ - \ No newline at end of file + From bf8f63b4a60d8ea359cad4239bd4b30be8586a6e Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Mon, 1 May 2023 21:50:54 +0100 Subject: [PATCH 03/14] [#676] Add accidentally un-committed files --- layouts/partials/head.html | 2 +- layouts/partials/header/basic.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 34a89492..daa8f821 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -50,7 +50,7 @@ {{ $jsAppearance := resources.Get "js/appearance.js" }} - {{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint "sha512" }} + {{ $jsAppearance = $jsAppearance | resources.ExecuteAsTemplate $jsAppearance.RelPermalink . | resources.Minify | resources.Fingerprint "sha512" }} {{ if .Site.Params.enableSearch | default false }} diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 4a020e1a..c370accc 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -8,7 +8,7 @@ {{ .Site.Title | markdownify | emojify }} {{ .Site.Title }} + class="logo max-h-[5rem] max-w-[5rem] object-scale-down object-left nozoom" alt="{{ .Site.Title }}" /> From b8f23598c85e0e39c043377fa54a6eb034b68334 Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Wed, 26 Apr 2023 18:49:53 +0100 Subject: [PATCH 04/14] =?UTF-8?q?=E2=9C=A8[#676]=20Add=20logo=20dark/light?= =?UTF-8?q?=20mode=20switching=20mechanism?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/appearance.js | 29 ++++++++++++++++++++++++++--- config/_default/languages.en.toml | 1 + 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/assets/js/appearance.js b/assets/js/appearance.js index 0acf9f18..d0663390 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -26,16 +26,20 @@ window.addEventListener("DOMContentLoaded", (event) => { const switcher = document.getElementById("appearance-switcher"); const switcherMobile = document.getElementById("appearance-switcher-mobile"); + var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" updateMeta() + updateLogo(targetAppearance) if (switcher) { switcher.addEventListener("click", () => { document.documentElement.classList.toggle("dark"); + var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" localStorage.setItem( "appearance", - document.documentElement.classList.contains("dark") ? "dark" : "light" + targetAppearance ); updateMeta() + updateLogo(targetAppearance) }); switcher.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -45,11 +49,13 @@ window.addEventListener("DOMContentLoaded", (event) => { if (switcherMobile) { switcherMobile.addEventListener("click", () => { document.documentElement.classList.toggle("dark"); + var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" localStorage.setItem( "appearance", - document.documentElement.classList.contains("dark") ? "dark" : "light" + targetAppearance ); updateMeta() + updateLogo(targetAppearance) }); switcherMobile.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -64,4 +70,21 @@ var updateMeta = () => { elem = document.querySelector('body'); style = getComputedStyle(elem); document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor); -} \ No newline at end of file +} + +var updateLogo = (targetAppearance) => { + {{ if and (.Site.Params.Logo) (.Site.Params.SecondaryLogo) }} + {{ $primaryLogo := resources.Get .Site.Params.Logo }} + {{ $secondaryLogo := resources.Get .Site.Params.SecondaryLogo }} + {{ if and ($primaryLogo) ($secondaryLogo) }} + var elems; + elems = document.querySelectorAll("img.logo") + targetLogoPath = + targetAppearance == "{{ .Site.Params.DefaultAppearance }}" ? + "{{ $primaryLogo.RelPermalink }}" : "{{ $secondaryLogo.RelPermalink }}" + for (const elem of elems) { + elem.setAttribute("src", targetLogoPath) + } + {{ end }} + {{- end }} +} diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index 379c57ba..31e570ba 100644 --- a/config/_default/languages.en.toml +++ b/config/_default/languages.en.toml @@ -7,6 +7,7 @@ rtl = false title = "Blowfish" # logo = "img/logo.png" +# secondaryLogo = "img/secondary-logo.png" # description = "My awesome website" # copyright = "Copy, _right?_ :thinking_face:" From e3869849bd5ee651c2fa09c92dc22fd6dd6b967c Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Mon, 1 May 2023 21:50:54 +0100 Subject: [PATCH 05/14] [#676] Add accidentally un-committed files --- layouts/partials/head.html | 2 +- layouts/partials/header/basic.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 34a89492..daa8f821 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -50,7 +50,7 @@ {{ $jsAppearance := resources.Get "js/appearance.js" }} - {{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint "sha512" }} + {{ $jsAppearance = $jsAppearance | resources.ExecuteAsTemplate $jsAppearance.RelPermalink . | resources.Minify | resources.Fingerprint "sha512" }} {{ if .Site.Params.enableSearch | default false }} diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 4a020e1a..c370accc 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -8,7 +8,7 @@ {{ .Site.Title | markdownify | emojify }} {{ .Site.Title }} + class="logo max-h-[5rem] max-w-[5rem] object-scale-down object-left nozoom" alt="{{ .Site.Title }}" /> From 0e07a9f265ed7c11b2026f0f5675ed347066e3a3 Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Tue, 2 May 2023 11:04:13 +0100 Subject: [PATCH 06/14] =?UTF-8?q?=F0=9F=93=9D[#676]=20Update=20documentati?= =?UTF-8?q?on=20for=20'secondaryLogo'=20parameter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/content/docs/configuration/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 69066178..33dfaf55 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -140,6 +140,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | | `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | | `logo` | _Not set_ | The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions. | +| `secondaryLogo` | _Not set_ | The relative path to the secondary site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions. This should have an inverted/contrasting colour scheme to `logo`. If set, this logo will be shown when users toggle from the `defaultAppearance` mode. | | `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | | `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | | `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | From c6869834ea0ad6ddc18296b48dc5369ade770576 Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Tue, 2 May 2023 20:46:56 +0100 Subject: [PATCH 07/14] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20[#676]=20Optimise=20?= =?UTF-8?q?appearance.js=20for=20no=20secondary=20logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/appearance.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/js/appearance.js b/assets/js/appearance.js index d0663390..21c62d10 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -28,7 +28,7 @@ window.addEventListener("DOMContentLoaded", (event) => { var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" updateMeta() - updateLogo(targetAppearance) + this.updateLogo?.(targetAppearance) if (switcher) { switcher.addEventListener("click", () => { @@ -39,7 +39,7 @@ window.addEventListener("DOMContentLoaded", (event) => { targetAppearance ); updateMeta() - updateLogo(targetAppearance) + this.updateLogo?.(targetAppearance) }); switcher.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -55,7 +55,7 @@ window.addEventListener("DOMContentLoaded", (event) => { targetAppearance ); updateMeta() - updateLogo(targetAppearance) + this.updateLogo?.(targetAppearance) }); switcherMobile.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -72,11 +72,11 @@ var updateMeta = () => { document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor); } +{{ if and (.Site.Params.Logo) (.Site.Params.SecondaryLogo) }} +{{ $primaryLogo := resources.Get .Site.Params.Logo }} +{{ $secondaryLogo := resources.Get .Site.Params.SecondaryLogo }} +{{ if and ($primaryLogo) ($secondaryLogo) }} var updateLogo = (targetAppearance) => { - {{ if and (.Site.Params.Logo) (.Site.Params.SecondaryLogo) }} - {{ $primaryLogo := resources.Get .Site.Params.Logo }} - {{ $secondaryLogo := resources.Get .Site.Params.SecondaryLogo }} - {{ if and ($primaryLogo) ($secondaryLogo) }} var elems; elems = document.querySelectorAll("img.logo") targetLogoPath = @@ -85,6 +85,6 @@ var updateLogo = (targetAppearance) => { for (const elem of elems) { elem.setAttribute("src", targetLogoPath) } - {{ end }} - {{- end }} } +{{ end }} +{{- end }} From a660482b24d671bdeda2eeffbebc808935dae737 Mon Sep 17 00:00:00 2001 From: Daniel Odrinski Date: Tue, 2 May 2023 21:16:16 +0100 Subject: [PATCH 08/14] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20[#676]=20Further=20o?= =?UTF-8?q?ptimise=20appearance.js=20to=20reduce=20code=20duplication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/appearance.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/assets/js/appearance.js b/assets/js/appearance.js index 21c62d10..1e487458 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -26,20 +26,19 @@ window.addEventListener("DOMContentLoaded", (event) => { const switcher = document.getElementById("appearance-switcher"); const switcherMobile = document.getElementById("appearance-switcher-mobile"); - var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" - updateMeta() - this.updateLogo?.(targetAppearance) + updateMeta(); + this.updateLogo?.(getTargetAppearance()); if (switcher) { switcher.addEventListener("click", () => { document.documentElement.classList.toggle("dark"); - var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" + var targetAppearance = getTargetAppearance(); localStorage.setItem( "appearance", targetAppearance ); - updateMeta() - this.updateLogo?.(targetAppearance) + updateMeta(); + this.updateLogo?.(targetAppearance); }); switcher.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -49,13 +48,13 @@ window.addEventListener("DOMContentLoaded", (event) => { if (switcherMobile) { switcherMobile.addEventListener("click", () => { document.documentElement.classList.toggle("dark"); - var targetAppearance = document.documentElement.classList.contains("dark") ? "dark" : "light" + var targetAppearance = getTargetAppearance(); localStorage.setItem( "appearance", targetAppearance ); - updateMeta() - this.updateLogo?.(targetAppearance) + updateMeta(); + this.updateLogo?.(targetAppearance); }); switcherMobile.addEventListener("contextmenu", (event) => { event.preventDefault(); @@ -88,3 +87,7 @@ var updateLogo = (targetAppearance) => { } {{ end }} {{- end }} + +var getTargetAppearance = () => { + return document.documentElement.classList.contains("dark") ? "dark" : "light" +} From 96529363cdcd0e1c8e1c58c01b7d655ec86a90cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 May 2023 06:01:44 +0000 Subject: [PATCH 09/14] =?UTF-8?q?=F0=9F=93=8C=20Bump=20@heroicons/react=20?= =?UTF-8?q?from=202.0.17=20to=202.0.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [@heroicons/react](https://github.com/tailwindlabs/heroicons) from 2.0.17 to 2.0.18. - [Release notes](https://github.com/tailwindlabs/heroicons/releases) - [Changelog](https://github.com/tailwindlabs/heroicons/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/heroicons/compare/v2.0.17...v2.0.18) --- updated-dependencies: - dependency-name: "@heroicons/react" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a4800e9..4e7c8ce8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "hugo-blowfish-theme", - "version": "2.33.0", + "version": "2.33.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.33.0", + "version": "2.33.1", "hasInstallScript": true, "license": "MIT", "dependencies": { "@headlessui/react": "^1.7.14", - "@heroicons/react": "^2.0.17", + "@heroicons/react": "^2.0.18", "@tailwindcss/forms": "^0.5.3", "commander": "^10.0.1" }, @@ -59,9 +59,9 @@ } }, "node_modules/@heroicons/react": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.17.tgz", - "integrity": "sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.18.tgz", + "integrity": "sha512-7TyMjRrZZMBPa+/5Y8lN0iyvUU/01PeMGX2+RE7cQWpEUIcb4QotzUObFkJDejj/HUH4qjP/eQ0gzzKs2f+6Yw==", "peerDependencies": { "react": ">= 16" } @@ -1650,9 +1650,9 @@ } }, "@heroicons/react": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.17.tgz", - "integrity": "sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.18.tgz", + "integrity": "sha512-7TyMjRrZZMBPa+/5Y8lN0iyvUU/01PeMGX2+RE7cQWpEUIcb4QotzUObFkJDejj/HUH4qjP/eQ0gzzKs2f+6Yw==", "requires": {} }, "@jridgewell/gen-mapping": { diff --git a/package.json b/package.json index c06a4bc2..6a40bed1 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ ], "dependencies": { "@headlessui/react": "^1.7.14", - "@heroicons/react": "^2.0.17", + "@heroicons/react": "^2.0.18", "@tailwindcss/forms": "^0.5.3", "commander": "^10.0.1" } From 99c5fa5a00306ee1a5a90cd3292f0663a2ea1925 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 May 2023 06:01:22 +0000 Subject: [PATCH 10/14] =?UTF-8?q?=F0=9F=93=8C=20Bump=20jquery=20from=203.6?= =?UTF-8?q?.4=20to=203.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [jquery](https://github.com/jquery/jquery) from 3.6.4 to 3.7.0. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](https://github.com/jquery/jquery/compare/3.6.4...3.7.0) --- updated-dependencies: - dependency-name: jquery dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a4800e9..5abc8398 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-blowfish-theme", - "version": "2.33.0", + "version": "2.33.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.33.0", + "version": "2.33.1", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -19,7 +19,7 @@ "@tailwindcss/typography": "^0.5.9", "chart.js": "^4.3.0", "fuse.js": "^6.6.2", - "jquery": "^3.6.4", + "jquery": "^3.7.0", "katex": "^0.16.7", "packery": "^2.1.2", "prettier": "^2.8.8", @@ -594,9 +594,9 @@ } }, "node_modules/jquery": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz", - "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", + "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==", "dev": true }, "node_modules/js-tokens": { @@ -2069,9 +2069,9 @@ "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==" }, "jquery": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz", - "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", + "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==", "dev": true }, "js-tokens": { diff --git a/package.json b/package.json index c06a4bc2..a3052bba 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@tailwindcss/typography": "^0.5.9", "chart.js": "^4.3.0", "fuse.js": "^6.6.2", - "jquery": "^3.6.4", + "jquery": "^3.7.0", "katex": "^0.16.7", "packery": "^2.1.2", "prettier": "^2.8.8", From 7c2ca7969e04861550e02eb4b1b1b5db9e388c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 12 May 2023 14:10:41 +0100 Subject: [PATCH 11/14] :sparkles: frontmatter uses both summary and description for site's meta description --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 14114599..9b37e53f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -14,7 +14,7 @@ {{- end }} {{/* Metadata */}} - {{ with .Params.Summary | default .Site.Params.description -}} + {{ with (.Params.Summary | default .Params.Description) | default .Site.Params.description -}} {{- end }} {{ with .Params.Tags | default .Site.Params.keywords -}} From 485b08193ca5b7367ffd11ed9e8eff274b3a083f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 12 May 2023 14:17:38 +0100 Subject: [PATCH 12/14] added config secondaryLogo comment to example site --- exampleSite/config/_default/languages.en.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config/_default/languages.en.toml b/exampleSite/config/_default/languages.en.toml index 5b588adf..6131c4e7 100644 --- a/exampleSite/config/_default/languages.en.toml +++ b/exampleSite/config/_default/languages.en.toml @@ -7,6 +7,7 @@ rtl = false title = "Blowfish" logo = "img/blowfish_logo_transparent.png" +#secondaryLogo = "PATH" description = "A powerful, lightweight theme for Hugo built with Tailwind CSS." # copyright = "Copy, _right?_ :thinking_face:" From 914352f71c089fa2caa039864434a92bb88d7572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 12 May 2023 14:24:21 +0100 Subject: [PATCH 13/14] updated nested menus docs --- exampleSite/config/_default/menus.en.toml | 2 -- exampleSite/content/docs/getting-started/index.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/exampleSite/config/_default/menus.en.toml b/exampleSite/config/_default/menus.en.toml index c8df8eb0..2fe1b1a5 100644 --- a/exampleSite/config/_default/menus.en.toml +++ b/exampleSite/config/_default/menus.en.toml @@ -19,8 +19,6 @@ # name = "Examples" # weight = 20 - - [[main]] name = "Samples" pageRef = "samples" diff --git a/exampleSite/content/docs/getting-started/index.md b/exampleSite/content/docs/getting-started/index.md index c7835c98..9c6abf68 100644 --- a/exampleSite/content/docs/getting-started/index.md +++ b/exampleSite/content/docs/getting-started/index.md @@ -197,7 +197,7 @@ Both menus are completely optional and can be commented out if not required. Use ### Nested menus -The theme also supports nested menus. In order to use them you just need to define a parent entry in `menu.toml` and its sub-menus using the `parent` parameter to reference the parent. All properties can be used for sub-menus. Note that `pageRef` and `url` will be ignored for the parent entry. Nested menus is only available in the main menu not for the footer. +The theme also supports nested menus. In order to use them you just need to define a parent entry in `menu.toml` and its sub-menus using the `parent` parameter to reference the parent. All properties can be used for sub-menus. `pageRef` and `url` can also be used in the parent entry. Nested menus are only available in the main menu not for the footer. ```toml # config/_default/menus.toml From 08d28ec1c101d17f3359156f8c5da926b37304d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 12 May 2023 14:26:50 +0100 Subject: [PATCH 14/14] updated version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19d0567c..348e147e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.33.1", + "version": "2.33.2", "description": "Blowfish theme for Hugo", "scripts": { "fullinstall": "npm run preinstall && npm install && npm run postinstall",