Skip to content

Commit

Permalink
Updated miniteaser
Browse files Browse the repository at this point in the history
  • Loading branch information
rgravitvl committed Nov 21, 2024
1 parent 9985a91 commit d40f4bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/importer/transformers/miniTeaser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Check failure on line 1 in tools/importer/transformers/miniTeaser.js

View workflow job for this annotation

GitHub Actions / build

Too many blank lines at the beginning of file. Max of 0 allowed
/* global WebImporter */
const teaser = (links, cards, document) => {
links.querySelectorAll('div.grid > grid > template').forEach((tmp) => {
Expand Down Expand Up @@ -72,6 +73,7 @@ const createMiniTeaser = (main, document) => {
if (websiteLinks.length > 0) {
websiteLinks.forEach((links) => {
const border = links.getAttribute('role');
const labelText = links.getAttribute('aria-label');
const blockName = border ? `Mini Teasers (${border})` : 'Mini Teasers';
const cards = [];
teaser(links, cards, document);
Expand All @@ -80,7 +82,8 @@ const createMiniTeaser = (main, document) => {
];
if (cards.length > 0) {
const block = WebImporter.DOMUtils.createTable(cells, document);
links.append(block);
if (labelText === 'section') links.append(block, document.createElement('hr'));
else links.append(block);
}
});
}
Expand Down

0 comments on commit d40f4bb

Please sign in to comment.