From 7c3cc6206603994e499e9ca1ae03b6366b3929de Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Mon, 16 Jan 2023 00:34:49 +0000 Subject: [PATCH 01/13] (feat) Initial Draft --- layouts/shortcodes/swiper.html | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 layouts/shortcodes/swiper.html diff --git a/layouts/shortcodes/swiper.html b/layouts/shortcodes/swiper.html new file mode 100644 index 00000000..d2fee95c --- /dev/null +++ b/layouts/shortcodes/swiper.html @@ -0,0 +1,64 @@ +{{ $images := .Page.Resources.Match (.Get "pattern") }} +{{ $id := .Get "id" }} + + + + + +
+ +
+ + {{ range $images }} +
+
+ +
+
+ {{ end }} + +
+ +
+ + +
+
+
+ + + + \ No newline at end of file From b5bab8284d816533505450c31d2128681d5d5cbf Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Mon, 16 Jan 2023 00:48:42 +0000 Subject: [PATCH 02/13] Rename shortcode --- layouts/shortcodes/{swiper.html => slider.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename layouts/shortcodes/{swiper.html => slider.html} (100%) diff --git a/layouts/shortcodes/swiper.html b/layouts/shortcodes/slider.html similarity index 100% rename from layouts/shortcodes/swiper.html rename to layouts/shortcodes/slider.html From 9fb95600b743b776e213d9ad630872ebd7df867a Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Mon, 16 Jan 2023 00:48:53 +0000 Subject: [PATCH 03/13] Add doc entry about the shortcode --- exampleSite/content/docs/shortcodes/index.md | 29 +++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 511e77dc..2b2f2a7a 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -388,4 +388,31 @@ Blowfish implements a sub-set of TypeIt features using a `shortcode`. Write your {{}} ``` -{{< github repo="nunocoracao/blowfish" >}} \ No newline at end of file +{{< github repo="nunocoracao/blowfish" >}} + +## Swiper + +`swiper` is used to showcase multiple images in a limited space, in an interactive and visually appealing way. It provides a standar swiper/slider/carousel feature, allowing the user to slide through multiple images while only taking up the vertical space of a single one. + + +| Parameter | Description | +| --------- | ------------------------ | +| `id` | [String] A unique identifier so that multiple sliders can work in the same page | +| `pattern` | [String] Go glob to match image names | + + +{{< alert "circle-info" >}} +It doesn't really matter the value set for the slider `id` as long as each slider in a given page has a unique identifier. +{{< /alert >}} +
+{{< alert "circle-info" >}} +A good resource for testing your go glob string is [this url](https://www.digitalocean.com/community/tools/glob?comments=true&glob=img%2F%7Biac%2Ck8s_all%7D.png&matches=false&tests=img%2Fiac.png&tests=img%2Fk8s_all.png) +{{< /alert >}} + +**Example:** + +```md +{{}} +``` + +{{< slider id="1" pattern="{abstract.jpg,featured.png}" >}} From 782db8ffdbb5def04d1d06468a3100e7b0bc3b7e Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Mon, 16 Jan 2023 17:21:10 +0000 Subject: [PATCH 04/13] Remove ` - {{ end }} - {{/* Packery */}} {{ if .Page.HasShortcode "gallery" }} {{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }} +{{ end }} + +{{/* tw-elements */}} +{{ if .Page.HasShortcode "carousel" }} +{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }} + {{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html new file mode 100644 index 00000000..91b333b2 --- /dev/null +++ b/layouts/shortcodes/carousel.html @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/layouts/shortcodes/slider.html b/layouts/shortcodes/sliderOLD.html similarity index 100% rename from layouts/shortcodes/slider.html rename to layouts/shortcodes/sliderOLD.html diff --git a/package-lock.json b/package-lock.json index 7e62e33c..6fc070db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "prettier-plugin-tailwindcss": "^0.2.1", "rimraf": "^4.1.0", "tailwindcss": "^3.2.4", + "tw-elements": "^1.0.0-alpha13", "typeit": "^8.7.1", "vendor-copy": "^3.0.1" } @@ -99,6 +100,16 @@ "node": ">= 8" } }, + "node_modules/@popperjs/core": { + "version": "2.11.6", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", + "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@tailwindcss/forms": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz", @@ -210,6 +221,25 @@ "pnpm": "^7.0.0" } }, + "node_modules/chartjs-color": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", + "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", + "dev": true, + "dependencies": { + "chartjs-color-string": "^0.6.0", + "color-convert": "^1.9.3" + } + }, + "node_modules/chartjs-color-string": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", + "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", + "dev": true, + "dependencies": { + "color-name": "^1.0.0" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -252,6 +282,21 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-convert/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", @@ -276,6 +321,12 @@ "node": ">=4" } }, + "node_modules/custom-event-polyfill": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz", + "integrity": "sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==", + "dev": true + }, "node_modules/d3": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/d3/-/d3-7.7.0.tgz", @@ -696,6 +747,15 @@ "lodash-es": "^4.17.21" } }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -716,6 +776,15 @@ "integrity": "sha512-+1q0nXhdzg1IpIJdMKalUwvvskeKnYyEe3shPRwedNcWtnhEKT3ZxvFjzywHDeGcKViIxTCAoOYQWP1qD7VNyg==", "dev": true }, + "node_modules/detect-autofill": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/detect-autofill/-/detect-autofill-1.1.4.tgz", + "integrity": "sha512-utCBQwCR/beSnADQmBC7C4tTueBBkYCl6WSpfGUkYKO/+MzPxqYGj6G4MvHzcKmH1gCTK+VunX2vaagvkRXPvA==", + "dev": true, + "dependencies": { + "custom-event-polyfill": "^1.0.7" + } + }, "node_modules/detective": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", @@ -1071,6 +1140,15 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/moment-mini": { "version": "2.24.0", "resolved": "https://registry.npmjs.org/moment-mini/-/moment-mini-2.24.0.tgz", @@ -1145,6 +1223,12 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/perfect-scrollbar": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", + "integrity": "sha512-dzalfutyP3e/FOpdlhVryN4AJ5XDVauVWxybSkLZmakFE2sS3y3pc4JnSprw8tGmHvkaG5Edr5T7LBTZ+WWU2g==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -1169,6 +1253,17 @@ "node": ">=0.10.0" } }, + "node_modules/popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/postcss": { "version": "8.4.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", @@ -1570,6 +1665,99 @@ "node": ">=8.0" } }, + "node_modules/tw-elements": { + "version": "1.0.0-alpha13", + "resolved": "https://registry.npmjs.org/tw-elements/-/tw-elements-1.0.0-alpha13.tgz", + "integrity": "sha512-lz1D583ZGDF4s8e89dmXkhfD8m2abgAlaK8/J6cAEm3DLxz7RtqKdunzja6xcKxDZO3bXEd6oGNdQ5QHpyCqrg==", + "dev": true, + "dependencies": { + "@popperjs/core": "^2.6.0", + "chart.js": "^2.9.4", + "chartjs-plugin-datalabels": "^0.7.0", + "deepmerge": "^4.2.2", + "detect-autofill": "^1.1.3", + "perfect-scrollbar": "^1.5.0", + "popper.js": "^1.16.1", + "tailwindcss": "~3.0.7" + } + }, + "node_modules/tw-elements/node_modules/chart.js": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz", + "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==", + "dev": true, + "dependencies": { + "chartjs-color": "^2.1.0", + "moment": "^2.10.2" + } + }, + "node_modules/tw-elements/node_modules/chartjs-plugin-datalabels": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chartjs-plugin-datalabels/-/chartjs-plugin-datalabels-0.7.0.tgz", + "integrity": "sha512-PKVUX14nYhH0wcdCpgOoC39Gbzvn6cZ7O9n+bwc02yKD9FTnJ7/TSrBcfebmolFZp1Rcicr9xbT0a5HUbigS7g==", + "dev": true, + "peerDependencies": { + "chart.js": ">= 2.7.0 < 3" + } + }, + "node_modules/tw-elements/node_modules/postcss-nested": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", + "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.6" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/tw-elements/node_modules/tailwindcss": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.24.tgz", + "integrity": "sha512-H3uMmZNWzG6aqmg9q07ZIRNIawoiEcNFKDfL+YzOPuPsXuDXxJxB9icqzLgdzKNwjG3SAro2h9SYav8ewXNgig==", + "dev": true, + "dependencies": { + "arg": "^5.0.1", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "detective": "^5.2.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "lilconfig": "^2.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.12", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "5.0.6", + "postcss-selector-parser": "^6.0.10", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, "node_modules/typeit": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/typeit/-/typeit-8.7.1.tgz", @@ -1682,6 +1870,12 @@ "fastq": "^1.6.0" } }, + "@popperjs/core": { + "version": "2.11.6", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", + "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", + "dev": true + }, "@tailwindcss/forms": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz", @@ -1763,6 +1957,25 @@ "@kurkle/color": "^0.3.0" } }, + "chartjs-color": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", + "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", + "dev": true, + "requires": { + "chartjs-color-string": "^0.6.0", + "color-convert": "^1.9.3" + } + }, + "chartjs-color-string": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", + "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", + "dev": true, + "requires": { + "color-name": "^1.0.0" + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -1793,6 +2006,23 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + }, + "dependencies": { + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + } + } + }, "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", @@ -1808,6 +2038,12 @@ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" }, + "custom-event-polyfill": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz", + "integrity": "sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==", + "dev": true + }, "d3": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/d3/-/d3-7.7.0.tgz", @@ -2120,6 +2356,12 @@ "lodash-es": "^4.17.21" } }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -2140,6 +2382,15 @@ "integrity": "sha512-+1q0nXhdzg1IpIJdMKalUwvvskeKnYyEe3shPRwedNcWtnhEKT3ZxvFjzywHDeGcKViIxTCAoOYQWP1qD7VNyg==", "dev": true }, + "detect-autofill": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/detect-autofill/-/detect-autofill-1.1.4.tgz", + "integrity": "sha512-utCBQwCR/beSnADQmBC7C4tTueBBkYCl6WSpfGUkYKO/+MzPxqYGj6G4MvHzcKmH1gCTK+VunX2vaagvkRXPvA==", + "dev": true, + "requires": { + "custom-event-polyfill": "^1.0.7" + } + }, "detective": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", @@ -2422,6 +2673,12 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "dev": true + }, "moment-mini": { "version": "2.24.0", "resolved": "https://registry.npmjs.org/moment-mini/-/moment-mini-2.24.0.tgz", @@ -2481,6 +2738,12 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "perfect-scrollbar": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", + "integrity": "sha512-dzalfutyP3e/FOpdlhVryN4AJ5XDVauVWxybSkLZmakFE2sS3y3pc4JnSprw8tGmHvkaG5Edr5T7LBTZ+WWU2g==", + "dev": true + }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -2496,6 +2759,12 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "dev": true + }, "postcss": { "version": "8.4.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", @@ -2732,6 +3001,79 @@ "is-number": "^7.0.0" } }, + "tw-elements": { + "version": "1.0.0-alpha13", + "resolved": "https://registry.npmjs.org/tw-elements/-/tw-elements-1.0.0-alpha13.tgz", + "integrity": "sha512-lz1D583ZGDF4s8e89dmXkhfD8m2abgAlaK8/J6cAEm3DLxz7RtqKdunzja6xcKxDZO3bXEd6oGNdQ5QHpyCqrg==", + "dev": true, + "requires": { + "@popperjs/core": "^2.6.0", + "chart.js": "^2.9.4", + "chartjs-plugin-datalabels": "^0.7.0", + "deepmerge": "^4.2.2", + "detect-autofill": "^1.1.3", + "perfect-scrollbar": "^1.5.0", + "popper.js": "^1.16.1", + "tailwindcss": "~3.0.7" + }, + "dependencies": { + "chart.js": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz", + "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==", + "dev": true, + "requires": { + "chartjs-color": "^2.1.0", + "moment": "^2.10.2" + } + }, + "chartjs-plugin-datalabels": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chartjs-plugin-datalabels/-/chartjs-plugin-datalabels-0.7.0.tgz", + "integrity": "sha512-PKVUX14nYhH0wcdCpgOoC39Gbzvn6cZ7O9n+bwc02yKD9FTnJ7/TSrBcfebmolFZp1Rcicr9xbT0a5HUbigS7g==", + "dev": true, + "requires": {} + }, + "postcss-nested": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", + "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.6" + } + }, + "tailwindcss": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.24.tgz", + "integrity": "sha512-H3uMmZNWzG6aqmg9q07ZIRNIawoiEcNFKDfL+YzOPuPsXuDXxJxB9icqzLgdzKNwjG3SAro2h9SYav8ewXNgig==", + "dev": true, + "requires": { + "arg": "^5.0.1", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "detective": "^5.2.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "lilconfig": "^2.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.12", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "5.0.6", + "postcss-selector-parser": "^6.0.10", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.0" + } + } + } + }, "typeit": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/typeit/-/typeit-8.7.1.tgz", diff --git a/package.json b/package.json index df742e53..9731f3fa 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "prettier-plugin-tailwindcss": "^0.2.1", "rimraf": "^4.1.0", "tailwindcss": "^3.2.4", + "tw-elements": "^1.0.0-alpha13", "typeit": "^8.7.1", "vendor-copy": "^3.0.1" }, @@ -90,6 +91,10 @@ { "from": "node_modules/packery/dist/packery.pkgd.min.js", "to": "assets/lib/packery/packery.pkgd.min.js" + }, + { + "from": "node_modules/tw-elements/dist/js/index.min.js", + "to": "assets/lib/tw-elements/index.min.js" } ], "dependencies": { diff --git a/tailwind.config.js b/tailwind.config.js index 1b552085..c7cb4833 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,6 +4,7 @@ module.exports = { "./content/**/*.{html,md}", "./themes/blowfish/layouts/**/*.html", "./themes/blowfish/content/**/*.{html,md}", + "./node_modules/tw-elements/dist/js/**/*.js" ], darkMode: "class", theme: { @@ -172,6 +173,7 @@ module.exports = { }, plugins: [ require("@tailwindcss/typography"), - require('@tailwindcss/forms') + require('@tailwindcss/forms'), + require('tw-elements/dist/plugin') ], }; From a3fec52c02f6a5ff85042bece5547c7b11d99e91 Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Wed, 18 Jan 2023 09:06:38 +0000 Subject: [PATCH 06/13] Remove old, unused file --- layouts/shortcodes/sliderOLD.html | 46 ------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 layouts/shortcodes/sliderOLD.html diff --git a/layouts/shortcodes/sliderOLD.html b/layouts/shortcodes/sliderOLD.html deleted file mode 100644 index a5631619..00000000 --- a/layouts/shortcodes/sliderOLD.html +++ /dev/null @@ -1,46 +0,0 @@ -{{ $images := .Page.Resources.Match (.Get "pattern") }} -{{ $id := .Get "id" }} - - - - - -
- -
- - {{ range $images }} -
-
- -
-
- {{ end }} - -
- -
- - -
-
-
- - \ No newline at end of file From 4a34e5076a4b3f0c6a60947a744d5811343df58f Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Wed, 18 Jan 2023 09:08:40 +0000 Subject: [PATCH 07/13] Remove params table --- exampleSite/content/docs/shortcodes/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 6f5fb790..b3d8bb71 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -94,12 +94,6 @@ Call to action `carousel` is used to showcase multiple images in an interactive and visually appealing way. This allows a user to slide through multiple images while only taking up the vertical space of a single one. All images are displayed using the full width of the parent component and using a ratio of `16:9`. - -| Parameter | Description | -| --------- | --------------------------------------------------------- | -| `images` | This shortcode receives how many image paths as you want. | - - **Example:** ```md From ffa0ece61873c5ff2b8c855c1d811c10366980ee Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Wed, 18 Jan 2023 09:08:49 +0000 Subject: [PATCH 08/13] Add dynamically generated ID --- layouts/shortcodes/carousel.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html index 91b333b2..9ce77a46 100644 --- a/layouts/shortcodes/carousel.html +++ b/layouts/shortcodes/carousel.html @@ -1,10 +1,13 @@ -