hugo-theme-terminal

My Fork of the Terminal Hugo Theme
git clone https://git.repetitions.de/hugo-theme-terminal

figure.html (551B)


 1 {{ if .Get "src" }}
 2   <figure class="{{ with .Get "position"}}{{ . }}{{ else -}} center {{- end }}" >
 3     <img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
 4     {{ if .Get "caption" }}
 5       <figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>
 6         {{ .Get "caption" | safeHTML }}
 7       </figcaption>
 8     {{ end }}
 9   </figure>
10 {{ end }}
11