mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-06-18 12:03:30 +08:00
add shortcode video
This commit is contained in:
parent
99418f1056
commit
f02cf61655
@ -387,6 +387,14 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
& > video {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Negative margins
|
/// Negative margins
|
||||||
|
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