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

@@ -229,6 +229,7 @@ article aside {
}
figure {
font-size: 0.9em;
display: block;
margin: 3em auto;
padding: 1rem;
@@ -256,12 +257,12 @@ article aside {
}
figcaption {
font-size: 0.9em;
color: #aaa;
margin-top: 0.5em;
line-height: 1.4;
font-style: italic;
padding: 0 1em;
font-size: 1rem;
em {
color: #eee;

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 }}