Skip to content

Commit fc02d5f

Browse files
committed
remove hero autoblock
1 parent 1edf34b commit fc02d5f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

scripts/scripts.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,6 @@ function buildEmbedBlocks(main) {
6161
});
6262
}
6363

64-
function buildHeroBlock(main) {
65-
const h1 = main.querySelector('h1');
66-
const picture = main.querySelector('picture');
67-
68-
if (h1 && picture && (h1.compareDocumentPosition(picture) & Node.DOCUMENT_POSITION_PRECEDING)) {
69-
// Check if h1 or picture is already inside a hero block
70-
if (h1.closest('.hero') || picture.closest('.hero')) {
71-
return; // Don't create a duplicate hero block
72-
}
73-
const section = document.createElement('div');
74-
section.append(buildBlock('hero', { elems: [picture, h1] }));
75-
main.prepend(section);
76-
}
77-
}
78-
7964
async function loadFonts() {
8065
await loadCSS(`${window.hlx.codeBasePath}/styles/fonts.css`);
8166
try {
@@ -114,8 +99,6 @@ function buildAutoBlocks(main) {
11499
});
115100
});
116101
}
117-
118-
buildHeroBlock(main);
119102
buildEmbedBlocks(main);
120103
} catch (error) {
121104

0 commit comments

Comments
 (0)