mirror of
https://github.com/PrivSec-dev/privsec.dev
synced 2025-02-20 18:31:35 -05:00
improve youtube shortcode
This commit is contained in:
parent
7adcdaf982
commit
e6f324ec6e
15
assets/css/extended/youtube.css
Normal file
15
assets/css/extended/youtube.css
Normal file
@ -0,0 +1,15 @@
|
||||
.youtube-embed-div {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.youtube-embed-frame {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
}
|
4
layouts/shortcodes/youtube.html
Normal file
4
layouts/shortcodes/youtube.html
Normal file
@ -0,0 +1,4 @@
|
||||
{{- $id := .Get "id" | default (.Get 0) -}}
|
||||
<div class="youtube-embed-div">
|
||||
<iframe src="https://www.youtube-nocookie.com/embed/{{ $id }}" class="youtube-embed-frame" allowfullscreen title="YouTube Video"></iframe>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user