From f79e2acf4c1de8b1e47e62dbd4111784f40f95fc Mon Sep 17 00:00:00 2001 From: Alex Carol Date: Wed, 30 Oct 2024 14:47:11 +0100 Subject: [PATCH] Add cardsperrow logic to cards --- tools/importer/import.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/importer/import.js b/tools/importer/import.js index f40d3b07..26a9e83c 100644 --- a/tools/importer/import.js +++ b/tools/importer/import.js @@ -350,7 +350,14 @@ function cards(main, document) { blockName = 'Video cards'; } - createBlock(container, document, blockName, cells); + const variants = []; + container.classList.forEach((className) => { + if (className.startsWith('cardsPerRow-')) { + variants.push(className.toLowerCase()); + } + }); + + createBlock(container, document, blockName, cells, variants); }); }