From 664eea75f9255771a9509a7f49bfb2cbd05383ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sat, 10 Feb 2024 18:57:39 +0000 Subject: [PATCH 1/9] new version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d4882b3e..ce2853cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.55.0", + "version": "2.56.0", "description": "Blowfish theme for Hugo", "scripts": { "postinstall": "vendor-copy", From 4ec4062494ec88f55a2717109895c7d102fdd76a Mon Sep 17 00:00:00 2001 From: Sergio Cambelo Date: Sat, 10 Feb 2024 22:08:48 +0100 Subject: [PATCH 2/9] fix GitLab shortcode link url --- layouts/shortcodes/gitlab.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/gitlab.html b/layouts/shortcodes/gitlab.html index fa95ec61..a9507994 100644 --- a/layouts/shortcodes/gitlab.html +++ b/layouts/shortcodes/gitlab.html @@ -4,7 +4,7 @@ {{- $gitLabData := getJSON ($gitlabURL) -}} {{- with $gitLabData -}} - +
From ab6738cd4dffd0f12584cf53f5d00f537070f475 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Sun, 11 Feb 2024 13:37:19 +0100 Subject: [PATCH 3/9] Improve consistency in header's layout and size. --- layouts/partials/header/basic.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 6446136a..3a513c69 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -35,7 +35,7 @@ {{ partial "translations.html" . }} {{ if .Site.Params.enableSearch | default false }} - @@ -45,12 +45,12 @@ {{/* Appearance switch */}} {{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
- @@ -58,7 +58,7 @@ {{ end }} -
+
@@ -73,11 +73,11 @@ {{/* Appearance switch */}} {{ if .Site.Params.footer.showAppearanceSwitcher | default false }} - From 393791265cbe4de5095ed97bf41feb4f72d48ac9 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Sun, 11 Feb 2024 14:05:19 +0100 Subject: [PATCH 4/9] Menu items hover in the same way as search and dark mode switcher buttons. --- layouts/partials/header/header-mobile-option-nested.html | 8 ++++---- layouts/partials/header/header-mobile-option-simple.html | 4 ++-- layouts/partials/header/header-option-nested.html | 6 +++--- layouts/partials/header/header-option-simple.html | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/layouts/partials/header/header-mobile-option-nested.html b/layouts/partials/header/header-mobile-option-nested.html index 9f21bb5d..a1bfc618 100644 --- a/layouts/partials/header/header-mobile-option-nested.html +++ b/layouts/partials/header/header-mobile-option-nested.html @@ -1,11 +1,11 @@
  • - + {{ if .Pre }} {{ partial "icon.html" .Pre }} {{ end }} -

    +

    {{ .Name | markdownify | emojify }}

    @@ -16,13 +16,13 @@ {{ range .Children }}
  • + ) }} target="_blank" {{ end }} class="flex items-center hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }} {{ partial "icon.html" .Pre }} {{ end }} -

    +

    {{ .Name | markdownify | emojify }}

    diff --git a/layouts/partials/header/header-mobile-option-simple.html b/layouts/partials/header/header-mobile-option-simple.html index acc4cdf1..5ffb13dd 100644 --- a/layouts/partials/header/header-mobile-option-simple.html +++ b/layouts/partials/header/header-mobile-option-simple.html @@ -1,12 +1,12 @@
  • + ) }} target="_blank" {{ end }} class="flex items-center hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }}
    {{ partial "icon.html" .Pre }}
    {{ end }} -

    +

    {{ .Name | markdownify | emojify }}

    diff --git a/layouts/partials/header/header-option-nested.html b/layouts/partials/header/header-option-nested.html index 068f30e0..ecb95c0a 100644 --- a/layouts/partials/header/header-option-nested.html +++ b/layouts/partials/header/header-option-nested.html @@ -6,7 +6,7 @@ {{ end }} + target="_blank" {{ end }} {{ end }} class="text-base font-medium hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}"> {{ .Name | markdownify | emojify }} @@ -18,13 +18,13 @@
    {{ range .Children }} + target="_blank" {{ end }} class="flex items-center hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }} {{ partial "icon.html" .Pre }} {{ end }} -

    +

    {{ .Name | markdownify | emojify }}

    diff --git a/layouts/partials/header/header-option-simple.html b/layouts/partials/header/header-option-simple.html index d4174601..8d4808f8 100644 --- a/layouts/partials/header/header-option-simple.html +++ b/layouts/partials/header/header-option-simple.html @@ -1,11 +1,11 @@ + end }} class="flex items-center hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }} {{ partial "icon.html" .Pre }} {{ end }} -

    +

    {{ .Name | markdownify | emojify }}

    \ No newline at end of file From 7f929c2fd889d5f5e96f8638ba37e0a9b3cf4919 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Sun, 11 Feb 2024 14:09:05 +0100 Subject: [PATCH 5/9] Same thing with the translations menu. --- layouts/partials/translations.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/translations.html b/layouts/partials/translations.html index ceeaf04b..b6d83391 100644 --- a/layouts/partials/translations.html +++ b/layouts/partials/translations.html @@ -1,7 +1,7 @@ {{ if .IsTranslated }}
    @@ -10,7 +10,7 @@
    {{ range .AllTranslations }} -

    +

    {{ .Language.Params.displayName | emojify }}

    From 580e13b6d6dacb85d99c20f68653e1771a9c7e72 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Sun, 11 Feb 2024 14:15:59 +0100 Subject: [PATCH 6/9] Added back text base color. --- layouts/partials/header/header-mobile-option-nested.html | 4 ++-- layouts/partials/header/header-mobile-option-simple.html | 2 +- layouts/partials/header/header-option-nested.html | 4 ++-- layouts/partials/header/header-option-simple.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/partials/header/header-mobile-option-nested.html b/layouts/partials/header/header-mobile-option-nested.html index a1bfc618..04c3e6d1 100644 --- a/layouts/partials/header/header-mobile-option-nested.html +++ b/layouts/partials/header/header-mobile-option-nested.html @@ -1,5 +1,5 @@
  • - + {{ if .Pre }} {{ partial "icon.html" .Pre }} @@ -16,7 +16,7 @@ {{ range .Children }}
  • + ) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }} {{ partial "icon.html" .Pre }} diff --git a/layouts/partials/header/header-mobile-option-simple.html b/layouts/partials/header/header-mobile-option-simple.html index 5ffb13dd..e4d2d645 100644 --- a/layouts/partials/header/header-mobile-option-simple.html +++ b/layouts/partials/header/header-mobile-option-simple.html @@ -1,6 +1,6 @@
  • + ) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }}
    {{ partial "icon.html" .Pre }} diff --git a/layouts/partials/header/header-option-nested.html b/layouts/partials/header/header-option-nested.html index ecb95c0a..b86fed69 100644 --- a/layouts/partials/header/header-option-nested.html +++ b/layouts/partials/header/header-option-nested.html @@ -6,7 +6,7 @@ {{ end }} + target="_blank" {{ end }} {{ end }} class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}"> {{ .Name | markdownify | emojify }} @@ -18,7 +18,7 @@
    {{ range .Children }} + target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }} {{ partial "icon.html" .Pre }} diff --git a/layouts/partials/header/header-option-simple.html b/layouts/partials/header/header-option-simple.html index 8d4808f8..9ce01b84 100644 --- a/layouts/partials/header/header-option-simple.html +++ b/layouts/partials/header/header-option-simple.html @@ -1,5 +1,5 @@ + end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400"> {{ if .Pre }} {{ partial "icon.html" .Pre }} From f4fd472e6e6710ef3b9a283f33b0180965f30700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Tue, 13 Feb 2024 21:25:46 +0000 Subject: [PATCH 7/9] Fix background image mode in list view --- layouts/partials/hero/background.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html index ac4adb8a..f43cd843 100644 --- a/layouts/partials/hero/background.html +++ b/layouts/partials/hero/background.html @@ -4,11 +4,22 @@ {{- $featured := $images.GetMatch "*background*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{ if and .Params.featureimage (not $featured) }} {{- $url:= .Params.featureimage -}} {{ $featured = resources.GetRemote $url }} {{ end }} -{{- if not $featured }}{{ with .Site.Params.defaultBackgroundImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} + +{{- if not $featured }} + {{ with .Site.Params.defaultBackgroundImage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $featured = resources.GetRemote . }} + {{ else }} + {{ $featured = resources.Get . }} + {{ end }} + {{ end }} +{{ end -}} + {{ $isParentList := eq (.Scratch.Get "scope") "list" }} {{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or (and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList)) From ca9709f2e904f0bf3cd5c593cbf0366806f0e836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Tue, 13 Feb 2024 21:57:06 +0000 Subject: [PATCH 8/9] =?UTF-8?q?=F0=9F=90=9B=20Code=20copy=20doesn't=20work?= =?UTF-8?q?=20with=20gist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/code.js | 2 +- exampleSite/content/_index.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/js/code.js b/assets/js/code.js index 2cd3474d..88ae18d3 100644 --- a/assets/js/code.js +++ b/assets/js/code.js @@ -13,7 +13,7 @@ function createCopyButton(highlightDiv) { } async function copyCodeToClipboard(button, highlightDiv) { - const codeToCopy = highlightDiv.querySelector(":last-child > .chroma > code").innerText; + const codeToCopy = highlightDiv.querySelector(":last-child").innerText; try { result = await navigator.permissions.query({ name: "clipboard-write" }); if (result.state == "granted" || result.state == "prompt") { diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index f6858310..e70908a2 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,11 +5,20 @@ description: "This page was built using the Blowfish theme for Hugo." Welcome to Blowfish, one of the most flexible and robust Hugo themes. It is designed to be simple, fast and content-focused. Learn more about how to install [here]({{< ref "docs/installation" >}}) or get started with our CLI using: -```node +asd + + + +```bash npx blowfish-tools ``` + + + + + From 8e14d69e14bd3c4c05529a5fc963f13389eb46d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Tue, 13 Feb 2024 21:59:37 +0000 Subject: [PATCH 9/9] final polish --- exampleSite/content/_index.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index e70908a2..476eaeee 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,20 +5,12 @@ description: "This page was built using the Blowfish theme for Hugo." Welcome to Blowfish, one of the most flexible and robust Hugo themes. It is designed to be simple, fast and content-focused. Learn more about how to install [here]({{< ref "docs/installation" >}}) or get started with our CLI using: -asd - - - -```bash +```node npx blowfish-tools ``` - - - -