diff --git a/blocks/hero/hero.css b/blocks/hero/hero.css index 83f3ece..52d63ba 100644 --- a/blocks/hero/hero.css +++ b/blocks/hero/hero.css @@ -26,17 +26,14 @@ object-fit: cover; } -.hero .hero-video-embed { - width: 100%; - height: 100%; +/* video layers over the poster image and fades in once it is playing */ +.hero .hero-video { + opacity: 0; + transition: opacity 0.6s ease; } -.hero .hero-video-embed iframe { - width: 100%; - height: 100%; - object-fit: cover; - position: absolute; - inset: 0; +.hero .hero-video.is-playing { + opacity: 1; } /* Overlay gradient */ diff --git a/blocks/hero/hero.js b/blocks/hero/hero.js index 86db8d5..b2b7999 100644 --- a/blocks/hero/hero.js +++ b/blocks/hero/hero.js @@ -1,107 +1,142 @@ /** - * Hero Block — supports both image and video backgrounds (full width). + * Hero Block * - * Authoring structure: - * Row 1: image OR video (as link, plain URL text, or