From b1e8e00267c58753aeb3cc201f9bfa5feea17161 Mon Sep 17 00:00:00 2001 From: Alex Haslam Date: Sat, 9 Dec 2023 21:40:30 +0000 Subject: [PATCH 01/30] Add keywords list component --- layouts/partials/keyword.html | 9 +++++++++ layouts/shortcodes/keyword.html | 1 + layouts/shortcodes/keywordList.html | 1 + 3 files changed, 11 insertions(+) create mode 100644 layouts/partials/keyword.html create mode 100644 layouts/shortcodes/keyword.html create mode 100644 layouts/shortcodes/keywordList.html diff --git a/layouts/partials/keyword.html b/layouts/partials/keyword.html new file mode 100644 index 00000000..9a5bbd6d --- /dev/null +++ b/layouts/partials/keyword.html @@ -0,0 +1,9 @@ + + + + {{ . }} + + + diff --git a/layouts/shortcodes/keyword.html b/layouts/shortcodes/keyword.html new file mode 100644 index 00000000..0453a36c --- /dev/null +++ b/layouts/shortcodes/keyword.html @@ -0,0 +1 @@ +{{ partial "keyword.html" .Inner }} diff --git a/layouts/shortcodes/keywordList.html b/layouts/shortcodes/keywordList.html new file mode 100644 index 00000000..ae87a068 --- /dev/null +++ b/layouts/shortcodes/keywordList.html @@ -0,0 +1 @@ +
{{- .Inner -}}
From 844cf98ccf4aa8b053bec72f7434bbe94a9cb296 Mon Sep 17 00:00:00 2001 From: arunoruto <21687187+arunoruto@users.noreply.github.com> Date: Sat, 16 Dec 2023 10:50:34 +0100 Subject: [PATCH 02/30] Fix annoying `.File.Path on zero object.` warning --- layouts/_default/list.html | 6 ++++-- layouts/_default/single.html | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4bf3d5c3..62843f88 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -19,10 +19,12 @@
{{ partial "article-meta/list.html" (dict "context" . "scope" "single") }}
+ {{ with .File }} + {{ end }} {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1dfe8d39..248f15aa 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -86,10 +86,12 @@ {{ partial "related.html" . }} + {{ with .File }} + {{ end }} {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} From c7903968630179941a35c48cf7524412223a094e Mon Sep 17 00:00:00 2001 From: v20100v <7567933+v20100v@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:37:47 +0100 Subject: [PATCH 03/30] =?UTF-8?q?=F0=9F=90=9B=20:=20Shortcodes=20gallery?= =?UTF-8?q?=20(non-unique=20id,=20multiple=20loading=20 + {{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }} + + + {{ $jsShortcodeGallery := resources.Get "js/shortcodes/gallery.js" }} + {{ $jsShortcodeGallery = $jsShortcodeGallery | resources.Minify | resources.Fingerprint "sha512" }} + {{ end }} {{/* tw-elements */}} diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index f03d709d..0aa82415 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -1,15 +1,6 @@ -{{ $id := delimit (slice "gallery" .Ordinal now.UnixNano) "-" }} +{{ $random := delimit (shuffle (seq 1 9)) "" }} +{{ $id := delimit (slice "gallery" $random now.UnixNano) "-" }} -
+ - - \ No newline at end of file +
\ No newline at end of file diff --git a/package.json b/package.json index ad9b7208..171b65d4 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,12 @@ "version": "2.47.2", "description": "Blowfish theme for Hugo", "scripts": { - "fullinstall": "npm run preinstall && npm install && npm run postinstall", - "preinstall": "rimraf assets/vendor", "postinstall": "vendor-copy", "assets": "rimraf assets/vendor && vendor-copy", "dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", "build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", + "dev-windows": "set NODE_ENV=development&&node ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", + "build-windows": "set NODE_ENV=production&&node ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", "build-hugo": "hugo --minify -s exampleSite --themesDir ../.. -d ../docs --baseURL https://nunocoracao.github.io/blowfish/", "example": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313", "lighthouse": "lhci autorun" From 854f773c652957aa080fa2af6fc949dae4fb5923 Mon Sep 17 00:00:00 2001 From: Ryan Gibson Date: Mon, 18 Dec 2023 13:02:00 -0500 Subject: [PATCH 04/30] Remove extraneous backdrop-blurs across partials --- layouts/partials/article-link/card-related.html | 2 +- layouts/partials/article-link/card.html | 2 +- layouts/partials/article-link/simple.html | 2 +- layouts/partials/scroll-to-top.html | 2 +- layouts/partials/term-link/card.html | 4 ++-- layouts/partials/translations.html | 2 +- layouts/shortcodes/github.html | 2 +- layouts/shortcodes/gitlab.html | 2 +- layouts/shortcodes/timelineItem.html | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/layouts/partials/article-link/card-related.html b/layouts/partials/article-link/card-related.html index a51f290a..6ea57ad8 100644 --- a/layouts/partials/article-link/card-related.html +++ b/layouts/partials/article-link/card-related.html @@ -4,7 +4,7 @@ {{ else }} {{ end }} -
+
{{- with $.Params.images -}} {{- range first 6 . }} diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index 8390f148..f5eb8f54 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -4,7 +4,7 @@ {{ else }} {{ end }} -
+
{{- with $.Params.images -}} {{- range first 6 . }} diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index 75b5bfde..7ab5395c 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -2,7 +2,7 @@ {{ $articleClasses := "flex flex-wrap article" }} {{ if .Site.Params.list.showCards }} -{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur overflow-hidden") " " }} +{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md overflow-hidden") " " }} {{ else }} {{ $articleClasses = delimit (slice $articleClasses "") " " }} {{ end }} diff --git a/layouts/partials/scroll-to-top.html b/layouts/partials/scroll-to-top.html index 717ce5e7..f84cbb5d 100644 --- a/layouts/partials/scroll-to-top.html +++ b/layouts/partials/scroll-to-top.html @@ -1,6 +1,6 @@
diff --git a/layouts/partials/term-link/card.html b/layouts/partials/term-link/card.html index 6bc7e9f1..7f2e8adf 100644 --- a/layouts/partials/term-link/card.html +++ b/layouts/partials/term-link/card.html @@ -1,6 +1,6 @@