Improve image markup

This commit is contained in:
Vri 🌈 2023-01-16 15:28:03 +01:00
parent 7c1f5f900f
commit 52f3cfc3c2
Signed by: vrifox
GPG key ID: D40098E5B60B2197
2 changed files with 12 additions and 6 deletions

View file

@ -1,4 +1,4 @@
<p class="md-img {{ with .Text }}with-text{{ end }}">
<figure class="md-img {{ with .Text }}with-text{{ end }}">
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} loading="lazy" />
</p>
{{ with .Text }}<p class="md-img-text">{{ . }}</p>{{ end }}
{{ with .Text }}<figcaption class="md-img-text">{{ . }}</figcaption>{{ end }}
</figure>