hugo-theme-termlite/layouts/_default/_markup/render-image.html
Eryn Wells 3597b59fa5 render-image.html: Add the figure--image class
Add the `figure--image` class to <figure> elements with <img> contents.
2024-07-03 07:41:23 -07:00

15 lines
430 B
HTML

{{- if .IsBlock }}
<figure class="figure--image" id="figure-{{ .Ordinal }}">
<img src="{{ .Destination | safeURL }}"
{{- with .Text }} alt="{{ . }}"{{ end -}}
>
{{- with .Title }}
<figcaption>{{ . }}</figcaption>
{{- end }}
</figure>
{{ else -}}
<img src="{{ .Destination | safeURL }}"
{{- with .Text }} alt="{{ . }}"{{ end -}}
{{- with .Title }} title="{{ . }}"{{ end -}}
>
{{- end }}