File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff 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-
7964async 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
You can’t perform that action at this time.
0 commit comments