hugo-theme-wondermod/layouts/shortcodes/figure.html

11 lines
510 B
HTML
Raw Normal View History

<figure{{ if or (.Get "class") (eq (.Get "align") "center") }} class="
{{- if eq (.Get "align") "center" }}align-center {{ end }}
{{- with .Get "class" }}{{ . }}{{- end }}"
{{- end -}}>
{{- if .Get "link" -}}
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
{{- end }}
{{ partial "image.html" (merge .Params (dict "page" .Page "lazy" true)) }}
{{- if .Get "link" }}</a>{{ end -}}
</figure>