2018-07-13 05:22:43 +02:00
|
|
|
<div class="columns is-img-preview">
|
|
|
|
{{ range $param := .Params }}
|
|
|
|
<!-- image -->
|
|
|
|
{{ $items := split $param "|" }}
|
|
|
|
{{ $src := (index $items 0) }}
|
|
|
|
{{ $title := (index $items 1) }}
|
2018-07-15 07:59:40 +02:00
|
|
|
{{ $split_src := split $src "." }}
|
|
|
|
{{ $extension := index $split_src (sub (len $split_src) 1) }}
|
2018-12-02 23:59:30 +01:00
|
|
|
<div class="column has-text-centered">
|
2018-07-15 07:59:40 +02:00
|
|
|
{{ if eq $extension "mp4" }}
|
|
|
|
<video preload="auto" autoplay="autoplay" muted="muted" loop="loop" webkit-playsinline="">
|
|
|
|
<source src="{{ $src }}" type="video/mp4">
|
|
|
|
Your browser doesn't support mp4 video. :(
|
|
|
|
</video>
|
|
|
|
{{ else }}
|
|
|
|
<a href="{{ $src }}" title="{{ $title }}">
|
2021-01-13 01:10:02 +01:00
|
|
|
{{- if eq $extension "png" -}}
|
2020-07-28 09:32:51 +02:00
|
|
|
<img src="{{ $src }}.jpg" alt="{{ $title }}">
|
2021-01-13 01:10:02 +01:00
|
|
|
{{- else -}}
|
|
|
|
<img src="{{ $src }}" alt="{{ $title }}">
|
|
|
|
{{- end -}}
|
2018-07-15 07:59:40 +02:00
|
|
|
</a>
|
|
|
|
{{ end }}
|
2018-07-13 05:22:43 +02:00
|
|
|
{{ if $title }}
|
|
|
|
<p class="has-text-centered is-italic has-text-grey-light">{{ $title }}</p>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2018-07-15 07:59:40 +02:00
|
|
|
</div>
|