mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 21:25:59 -06:00
18 lines
506 B
HTML
18 lines
506 B
HTML
|
<figure>
|
||
|
{{ $media := . | resources.Fingerprint "sha512" }}
|
||
|
{{ if eq .MediaType.MainType "image" }}
|
||
|
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
|
||
|
{{ else if eq .MediaType.MainType "video" }}
|
||
|
<video controls>
|
||
|
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
||
|
{{ i18n "browser_no_video_support" }}
|
||
|
</video>
|
||
|
{{ end }}
|
||
|
|
||
|
{{ with $media.Title }}
|
||
|
<figcaption>
|
||
|
{{ . | markdownify }}
|
||
|
</figcaption>
|
||
|
{{ end }}
|
||
|
</figure>
|