feat: add embed video support
This commit is contained in:
parent
8de1abda6b
commit
ed6dc539ef
3 changed files with 25 additions and 0 deletions
4
_includes/embed/twitch.html
Normal file
4
_includes/embed/twitch.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<iframe class="embed-video twitch lazyload"
|
||||||
|
src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}"
|
||||||
|
frameborder="0" allowfullscreen="true"
|
||||||
|
scrolling="no"></iframe>
|
6
_includes/embed/youtube.html
Normal file
6
_includes/embed/youtube.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<iframe class="embed-video youtube lazyload"
|
||||||
|
src="https://www.youtube.com/embed/{{ include.id }}"
|
||||||
|
title="YouTube video player"
|
||||||
|
frameborder="0"
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
allowfullscreen></iframe>
|
|
@ -576,6 +576,21 @@ i { /* fontawesome icons */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.embed-video {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
&.youtube {
|
||||||
|
aspect-ratio: 16 / 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.twitch {
|
||||||
|
aspect-ratio: 310 / 189;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* --- buttons --- */
|
/* --- buttons --- */
|
||||||
.btn-lang {
|
.btn-lang {
|
||||||
border: 1px solid !important;
|
border: 1px solid !important;
|
||||||
|
|
Loading…
Reference in a new issue