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

Commit fef2ddf

Browse files
committed
Reponsive YouTube player
1 parent 89039b3 commit fef2ddf

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

_includes/youtube-playlist.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<iframe width="770" height="433" src="https://www.youtube-nocookie.com/embed/videoseries?list={{ include.id }}&rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
1+
<div class="video">
2+
<iframe src="https://www.youtube-nocookie.com/embed/videoseries?list={{ include.id }}&rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
3+
</div>

_includes/youtube.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<iframe width="770" height="433" src="https://www.youtube-nocookie.com/embed/{{ include.id }}?rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
1+
<div class="video">
2+
<iframe src="https://www.youtube-nocookie.com/embed/{{ include.id }}?rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
3+
</div>

styles/site.css

+11
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ nav {
195195
margin-bottom: 40px;
196196
}
197197

198+
.video {
199+
position: relative;
200+
padding-bottom: 56.25%; /* 16:9 */
201+
}
202+
203+
.video iframe {
204+
position: absolute;
205+
width: 100%;
206+
height: 100%;
207+
}
208+
198209
@media screen and (max-width: 1020px) {
199210
.arangodb-navmenu li div.searchbar {display: none;}
200211
.arangodb-navmenu li div.placeholder {display: none;}

0 commit comments

Comments
 (0)