2018-10-02 17:56:31 +00: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-10 02:03:01 +00:00
|
|
|
{{- end -}}
|
2018-10-02 17:56:31 +00:00
|
|
|
<img src="{{ .Get "src" }}"
|
|
|
|
{{- if or (.Get "alt") (.Get "caption") }}
|
2018-10-02 19:23:10 +00:00
|
|
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
|
2018-10-02 17:56:31 +00:00
|
|
|
{{- end -}}
|
|
|
|
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
2021-04-10 02:03:01 +00:00
|
|
|
/><!-- Closing img tag -->
|
2018-10-02 17:56:31 +00: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 19:23:10 +00:00
|
|
|
{{- .Get "caption" | markdownify -}}
|
2018-11-27 17:15:10 +00:00
|
|
|
{{- with .Get "attrlink" }}
|
2018-10-02 17:56:31 +00:00
|
|
|
<a href="{{ . }}">
|
|
|
|
{{- end -}}
|
2018-10-02 19:23:10 +00:00
|
|
|
{{- .Get "attr" | markdownify -}}
|
2018-10-02 17:56:31 +00:00
|
|
|
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
|
|
|
{{- end }}
|
|
|
|
</figcaption>
|
|
|
|
{{- end }}
|
2018-05-04 15:53:56 +00:00
|
|
|
</figure>
|