Skip to content

Commit

Permalink
Merge pull request #4 from kunwarsaluja/baw_videotext
Browse files Browse the repository at this point in the history
minor css change to account for metablock style and js change for ele…
  • Loading branch information
3vil3mpir3 authored Oct 27, 2022
2 parents 464bc00 + 6074ee4 commit 00dd072
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
18 changes: 9 additions & 9 deletions blocks/videotext/videotext.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export default function decorate(block) {
[...block.children].forEach((row) => {
const videoEl = [...row.children][0];
videoEl.classList.add('videocontent');
export default function decorate($block) {
[...$block.children].forEach((row) => {
const $videoEl = [...row.children][0];
$videoEl.classList.add('videocontent');
const videoURL = videoEl.innerHTML;
videoEl.innerHTML = /* html */
$videoEl.innerHTML = /* html */
`<video playsinline controls name="media"><source src="${videoURL}" type="video/mp4"></video>`;
const textEl = [...row.children][1];
textEl.classList.add('text');
textEl.querySelectorAll('a').forEach((a) => {
a.target="_blank";
const $textEl = [...row.children][1];
$textEl.classList.add('text');
$textEl.querySelectorAll('a').forEach(($a) => {
$a.target="_blank";
});
});
}
8 changes: 7 additions & 1 deletion styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -642,4 +642,10 @@ body.docs-template main .section.dark .default-content-wrapper {
border-color: var(--spectrum-blue);
}


main .separator
{
margin: auto;
width: 60%;
border-top: 2px solid #ccc;
padding: 20px 0px;
}

0 comments on commit 00dd072

Please sign in to comment.