From 92ad4e5db156913540a173d8abf26cd633e34b8c Mon Sep 17 00:00:00 2001 From: madrilene Date: Wed, 7 Feb 2024 13:07:03 +0100 Subject: [PATCH] add info for JS --- src/docs/less-js.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/docs/less-js.md diff --git a/src/docs/less-js.md b/src/docs/less-js.md new file mode 100644 index 0000000..1894e5d --- /dev/null +++ b/src/docs/less-js.md @@ -0,0 +1,14 @@ +--- +title: Less JavaScript +--- + +The only "real" JavaScript dependency is **theme-toggle.js**, which is inlined. + +There are two more scripts that are generated but you have to opt in: + +**masonry.js**, creating the masonry effect used on the cards. +A fallback until [maybe, one day](https://caniuse.com/mdn-css_properties_grid-template-rows_masonry) we get to use `grid-template-rows: masonry;`. +Search for `masonry: true` to see where it is activated, and set to `false`, an empty string, or delete the front matter field, if you don't want to use it. The script won't be included then. Nothing breaks, the cards just won't rise up to completely fill the gaps in their grid. + +The **easteregg.js** is an opt-in JS-file set in `src/_data/meta.js`. +Right to the end of the file, you can set `easteregg: false` to deactivate the loading of the script.