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] =?UTF-8?q?=F0=9F=90=9B=20:=20Shortcodes=20gallery=20(non-?=
=?UTF-8?q?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) "-" }}
-
+
{{ .Inner }}
-
-
-
\ 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"