mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 18:31:45 +01:00
feat(article): add positional parameter for video
shortcode (#331)
This commit is contained in:
parent
080c86ec79
commit
9c7e73646c
1 changed files with 3 additions and 2 deletions
|
@ -1,13 +1,14 @@
|
|||
{{- $src := .Get "src" | default (.Get 0) -}}
|
||||
<div class="video-wrapper">
|
||||
<video
|
||||
controls
|
||||
src="{{- $src -}}"
|
||||
{{ 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.
|
||||
<a href="{{- $src -}}">link to the video</a> instead.
|
||||
</p>
|
||||
</video>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue