feat(article): add video shortcode (#280)
This commit is contained in:
parent
8d0c65c374
commit
99c4c89f0a
@ -385,7 +385,7 @@
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
|
||||
& > iframe {
|
||||
& > iframe, & > video {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
13
layouts/shortcodes/video.html
Normal file
13
layouts/shortcodes/video.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user