feat: add local video support
Support single video moment, like WeChat friend cycle. Just use the `video` key
This commit is contained in:
parent
69f23442e8
commit
c8145dba79
3 changed files with 16 additions and 4 deletions
|
@ -58,7 +58,7 @@
|
|||
<div class="context heti">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
|
||||
{{/* add-on info 1: pictures */}}
|
||||
{{/* new pictures API `pictures` (combine single & multiple pictures)*/}}
|
||||
{{ $pictures_set := slice}}
|
||||
|
@ -71,6 +71,13 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $video_caption := .Plain}}
|
||||
{{ with .Params.video }}
|
||||
<a data-src="{{ . }}" data-fancybox="video-gallery" data-caption={{ $video_caption }}>
|
||||
<video class="video-js" src="{{ . }}"></video>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if (eq (len $pictures_set) 1) }}
|
||||
{{ range $pictures_set }}
|
||||
<img src="{{ . }}" class="single-pic" alt="Responsive image" data-fancybox="gallery" data-caption={{ $picture_caption }}></img>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue