2020-04-28 12:26:34 +02:00
|
|
|
{{ $img := $.Page.Resources.GetMatch (.Get "src")}}
|
|
|
|
<figure {{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
|
|
|
{{ with .Get "link" }}
|
2020-05-07 09:48:29 +02:00
|
|
|
<a href="{{ . | absURL }}">
|
2020-04-28 12:26:34 +02:00
|
|
|
{{ end }}
|
2020-05-07 09:48:29 +02:00
|
|
|
<img src="{{ $img.RelPermalink }}"
|
|
|
|
{{ with .Get "alt"}} alt="{{ . }}"{{ end }}
|
|
|
|
{{ with .Get "title"}} title="{{ . }}"{{ end }}
|
|
|
|
{{ with .Get "height"}} height="{{ . }}"{{ end }}
|
|
|
|
{{ with .Get "width"}} width="{{ . }}"{{ end }} />
|
2020-04-28 12:26:34 +02:00
|
|
|
{{ with .Get "link" }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
2020-05-07 09:48:29 +02:00
|
|
|
{{ if .Get "caption" }}
|
2020-04-28 12:26:34 +02:00
|
|
|
<figcaption>
|
2020-05-07 09:48:29 +02:00
|
|
|
<p>{{ .Get "caption" }}
|
|
|
|
{{ if .Get "attr" }}
|
|
|
|
<span class="attribution">
|
|
|
|
{{ with .Get "attrlink" }}
|
|
|
|
<a href="{{ . }}">
|
|
|
|
{{ end }}
|
|
|
|
{{ .Get "attr" }}
|
|
|
|
{{ with .Get "attrlink" }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
</p>
|
2020-04-28 12:26:34 +02:00
|
|
|
</figcaption>
|
|
|
|
{{ end }}
|
|
|
|
</figure>
|