blob: 69a42022e656d83c8750a08bcfb9d70e031ba0fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{{ $imageFile := print "public" (.Get `source`) }}
{{ $image := imageConfig $imageFile }}
{{ $ratio := 0 }}
{{ if lt (mul (div (float $image.Height) $image.Width) 100) 100 }}
{{ $ratio = mul (div (float $image.Height) $image.Width) 100 }}
{{ end }}
<figure>
<a href="{{ .Get `source` }}">
<img data-image-zoom src="{{ .Get `source` }}" alt="{{ .Get `title` }}" title="{{ .Get `title` }}" width="{{ $image.Width }}" height="{{ $image.Height }}"/>
</a>
<figcaption class="has-text-centered has-text-grey-dark">{{ .Inner }}</figcaption>
</figure>
|