diff --git a/blocks/vimeo/vimeo.css b/blocks/vimeo/vimeo.css new file mode 100644 index 00000000..5d8f6e16 --- /dev/null +++ b/blocks/vimeo/vimeo.css @@ -0,0 +1,4 @@ +.vimeo { + padding-top: 50px; + padding-bottom: 50px; +} \ No newline at end of file diff --git a/blocks/vimeo/vimeo.js b/blocks/vimeo/vimeo.js index 3b6ccf9b..361c17b8 100644 --- a/blocks/vimeo/vimeo.js +++ b/blocks/vimeo/vimeo.js @@ -1,12 +1,13 @@ export default function decorate(block) { const anchorLink = block.querySelector('a'); + const ifrmContainer = document.createElement('div'); + ifrmContainer.classList.add('responsive-embed'); const ifrm = document.createElement('iframe'); ifrm.setAttribute('src', anchorLink); - ifrm.style.width = '800px'; - ifrm.style.height = '600px'; ifrm.style.frameBorder = '0'; ifrm.style.allow = 'autoplay; fullscreen; picture-in-picture'; ifrm.setAttribute('allowFullScreen', ''); + ifrmContainer.appendChild(ifrm); block.innerHTML = ''; - block.append(ifrm); + block.append(ifrmContainer); }