23 lines
652 B
HTML
23 lines
652 B
HTML
{{/*
|
|
Render hook for HTML video tags in Markdown
|
|
让 Markdown 中的 <video> 标签自动包裹 figure 容器
|
|
*/}}
|
|
<figure class="post-video-wrapper">
|
|
<div class="video-container">
|
|
<video
|
|
controls
|
|
preload="metadata"
|
|
playsinline
|
|
webkit-playsinline
|
|
{{ with .Attributes.poster }}poster="{{ . }}"{{ end }}
|
|
{{ with .Attributes.class }}class="{{ . }}"{{ end }}
|
|
>
|
|
<source src="{{ .Destination | safeURL }}" type="{{ .MediaType.Type }}">
|
|
你的浏览器不支持视频播放。
|
|
</video>
|
|
</div>
|
|
{{ with .Text }}
|
|
<figcaption class="video-caption">{{ . }}</figcaption>
|
|
{{ end }}
|
|
</figure>
|