Skip to content

Commit 3144dbf

Browse files
committed
fix: lint
1 parent 9639d96 commit 3144dbf

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

blocks/video/video.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
position: relative;
2525
}
2626

27-
.video[data-embed-is-loaded="true"] .video-placeholder,
28-
.video[data-embed-is-loaded="false"] .video-placeholder + * {
29-
visibility: hidden;
30-
height: 0;
31-
width: 0;
32-
}
33-
3427
.video .video-placeholder > * {
3528
display: flex;
3629
align-items: center;
@@ -39,6 +32,13 @@
3932
inset: 0;
4033
}
4134

35+
.video[data-embed-is-loaded="true"] .video-placeholder,
36+
.video[data-embed-is-loaded="false"] .video-placeholder + * {
37+
visibility: hidden;
38+
height: 0;
39+
width: 0;
40+
}
41+
4242
.video .video-placeholder picture img {
4343
width: 100%;
4444
height: 100%;

blocks/video/video.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,17 @@ export default async function decorate(block) {
105105
block.dataset.embedIsLoaded = false;
106106

107107
const autoplay = block.classList.contains('autoplay');
108-
if (!!placeholder) {
108+
if (placeholder) {
109109
block.classList.add('placeholder');
110110
const wrapper = document.createElement('div');
111111
wrapper.className = 'video-placeholder';
112112
wrapper.append(placeholder);
113113

114114
if (!autoplay) {
115-
wrapper.insertAdjacentHTML('beforeend',
116-
'<div class="video-placeholder-play"><button type="button" title="Play"></button></div>');
115+
wrapper.insertAdjacentHTML(
116+
'beforeend',
117+
'<div class="video-placeholder-play"><button type="button" title="Play"></button></div>',
118+
);
117119
wrapper.addEventListener('click', () => {
118120
loadVideoEmbed(block, link, true, false);
119121
});

0 commit comments

Comments
 (0)