2018-10-02 13:56:31 -04:00
|
|
|
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
|
|
|
{{- if .Get "link" -}}
|
|
|
|
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
2021-04-09 22:03:01 -04:00
|
|
|
{{- end -}}
|
2018-10-02 13:56:31 -04:00
|
|
|
<img src="{{ .Get "src" }}"
|
|
|
|
{{- if or (.Get "alt") (.Get "caption") }}
|
2018-10-02 15:23:10 -04:00
|
|
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
|
2018-10-02 13:56:31 -04:00
|
|
|
{{- end -}}
|
|
|
|
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
2021-04-09 22:03:01 -04:00
|
|
|
/><!-- Closing img tag -->
|
2018-10-02 13:56:31 -04:00
|
|
|
{{- if .Get "link" }}</a>{{ end -}}
|
|
|
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
|
|
|
<figcaption>
|
|
|
|
{{ with (.Get "title") -}}
|
|
|
|
<h4>{{ . }}</h4>
|
|
|
|
{{- end -}}
|
|
|
|
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
2018-10-02 15:23:10 -04:00
|
|
|
{{- .Get "caption" | markdownify -}}
|
2018-11-27 12:15:10 -05:00
|
|
|
{{- with .Get "attrlink" }}
|
2018-10-02 13:56:31 -04:00
|
|
|
<a href="{{ . }}">
|
|
|
|
{{- end -}}
|
2018-10-02 15:23:10 -04:00
|
|
|
{{- .Get "attr" | markdownify -}}
|
2018-10-02 13:56:31 -04:00
|
|
|
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
|
|
|
{{- end }}
|
|
|
|
</figcaption>
|
|
|
|
{{- end }}
|
2018-05-04 11:53:56 -04:00
|
|
|
</figure>
|