1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 11:18:30 -04:00

custom youtube embed shortcode

This commit is contained in:
Jake Jarvis 2019-04-02 12:16:39 -04:00
parent b6fca1f08d
commit 5e4df8cece
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<div class="embed video-player">
<iframe class="youtube-player" src="https://www.youtube.com/embed/{{ index .Params 0 }}" allowfullscreen></iframe>
</div>

View File

@ -723,6 +723,22 @@ body#notes div#content hr {
border: 1px solid #ccc; border: 1px solid #ccc;
} }
body#notes div#content div.embed.video-player {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
}
body#notes div#content div.embed.video-player iframe.youtube-player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
/* Archive List */ /* Archive List */