Skip to content

Commit

Permalink
159: vimeo player padding issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Swapnamayee Sahoo authored and Swapnamayee Sahoo committed Nov 23, 2023
1 parent 342afa8 commit 57205d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions blocks/vimeo/vimeo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vimeo {
padding-top: 50px;
padding-bottom: 50px;
}
7 changes: 4 additions & 3 deletions blocks/vimeo/vimeo.js
Original file line number Diff line number Diff line change
@@ -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 = '980px';
ifrm.style.height = '552px';
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);
}

0 comments on commit 57205d7

Please sign in to comment.