Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
fix(docs): responsive youtube video demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lauthieb committed Aug 18, 2023
1 parent 2b25fc7 commit 748729a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/_includes/demo.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<section id="contact" class="contact bg-primary">
<div class="container">
<h2 class="section-heading">Demo</h2>
<iframe width="560" height="315" src="https://www.youtube.com/embed/lfWRwwmX9Q8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<div class="responsive-yt">
<iframe width="560" height="315" src="https://www.youtube.com/embed/lfWRwwmX9Q8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
</div>
</section>
14 changes: 14 additions & 0 deletions docs/_sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -663,4 +663,18 @@ body {
}
}

.responsive-yt {
overflow:hidden;
padding-bottom:56.25%;
position:relative;
height:0;
}

.responsive-yt iframe {
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}

0 comments on commit 748729a

Please sign in to comment.