add shortcode video

This commit is contained in:
zhixuan 2021-07-27 14:01:00 +09:00
parent 99418f1056
commit f02cf61655
No known key found for this signature in database
GPG Key ID: 05D14AD50C51A06F
2 changed files with 21 additions and 0 deletions

View File

@ -387,6 +387,14 @@
top: 0;
border: 0;
}
& > video {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
border: 0;
}
}
/// Negative margins

View File

@ -0,0 +1,13 @@
<div class="video-wrapper">
<video
controls
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
{{ with .Get "src" }}src="{{- . -}}"{{ end }}
{{ with .Get "autoplay" }}autoplay{{ end }}
>
<p>
Your browser doesn't support HTML5 video. Here is a
<a href="{{ with .Get "src" }}{{- . -}}{{ end }}">link to the video</a> instead.
</p>
</video>
</div>