Skip to content

Commit

Permalink
Add cardsperrow logic to cards
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarol committed Oct 30, 2024
1 parent ec0f365 commit f79e2ac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/importer/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand Down

0 comments on commit f79e2ac

Please sign in to comment.