blob: 70f0f2f34563fe6db214f3ebe03c0dcbeb3ea2de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{{ $localPath := print "public/" ($.Destination | safeURL) }}
{{ $remoteImage := resources.GetRemote ($.Destination | safeURL) }}
{{- /* This comment removes trailing newlines. */ -}}
<figure>
<a href="{{ $.Destination | safeURL }}" onclick="return false;">
<img data-image-zoom
src="{{ $.Destination | safeURL }}"
alt="{{ $.Text }}"
title="{{ $.Text | htmlUnescape | safeHTML }}"
width="
{{- with $remoteImage -}}
{{- with .Err -}}
{{ $localImage := imageConfig $localPath }}
{{- with $localImage -}}
{{ .Width }}
{{- end -}}
{{- else -}}
{{- .Width -}}
{{- end -}}
{{- end -}}
"
height="
{{- with $remoteImage -}}
{{- with .Err -}}
{{ $localImage := imageConfig $localPath }}
{{- with $localImage -}}
{{ .Height }}
{{- end -}}
{{- else -}}
{{ .Height }}
{{- end -}}
{{- end -}}
"
/>
</a>
<figcaption class="has-text-grey-dark">
{{ $.Title | markdownify }}
</figcaption>
</figure>
{{- /* This comment removes trailing newlines. */ -}}
|