github.com/neohugo/neohugo@v0.123.8/tpl/tplimpl/embedded/templates/shortcodes/figure.html (about) 1 <figure{{ with .Get "class" }} class="{{ . }}"{{ end }}> 2 {{- if .Get "link" -}} 3 <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> 4 {{- end -}} 5 <img src="{{ .Get "src" }}" 6 {{- if or (.Get "alt") (.Get "caption") }} 7 alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" 8 {{- end -}} 9 {{- with .Get "width" }} width="{{ . }}"{{ end -}} 10 {{- with .Get "height" }} height="{{ . }}"{{ end -}} 11 {{- with .Get "loading" }} loading="{{ . }}"{{ end -}} 12 /><!-- Closing img tag --> 13 {{- if .Get "link" }}</a>{{ end -}} 14 {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} 15 <figcaption> 16 {{ with (.Get "title") -}} 17 <h4>{{ . }}</h4> 18 {{- end -}} 19 {{- if or (.Get "caption") (.Get "attr") -}}<p> 20 {{- .Get "caption" | markdownify -}} 21 {{- with .Get "attrlink" }} 22 <a href="{{ . }}"> 23 {{- end -}} 24 {{- .Get "attr" | markdownify -}} 25 {{- if .Get "attrlink" }}</a>{{ end }}</p> 26 {{- end }} 27 </figcaption> 28 {{- end }} 29 </figure>