1

Improved figures

This commit is contained in:
2025-05-14 14:04:38 +02:00
parent 22e8acd1d4
commit 0262331f25
2 changed files with 7 additions and 7 deletions

View File

@@ -14,7 +14,11 @@
{{- $resized := $image.Resize (cond (eq $isBlock true) "1024x" "500x") -}}
{{- $large := $image.Resize "1920x" -}}
{{- if $isBlock }}
<figure class="custom-image center">
<figure class="custom-image center"><figcaption>
{{- with $data.description }}
<p>{{ . | markdownify }}</p>
{{- end }}
</figcaption>
<a href="{{ $large.RelPermalink }}" title="Cliquez pour agrandir l'image">
<img src="{{ $resized.RelPermalink }}" alt="{{ $alt }}" title="{{ $title }}" />
</a>
@@ -33,11 +37,6 @@
<em>{{ . | markdownify }}</em>
</p>
{{- end }}
<figcaption>
{{- with $data.description }}
<p>{{ . | markdownify }}</p>
{{- end }}
</figcaption>
{{- end }}
</figure>
{{- else }}