From 0262331f2569c9c376eb51f2452f5e859613a38f Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Wed, 14 May 2025 14:04:38 +0200 Subject: [PATCH] Improved figures --- themes/default/assets/css/typography.css | 3 ++- .../layouts/_default/_markup/render-image.html | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/default/assets/css/typography.css b/themes/default/assets/css/typography.css index 277dee25..28641a7c 100644 --- a/themes/default/assets/css/typography.css +++ b/themes/default/assets/css/typography.css @@ -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; diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html index 540fbbec..242adcfe 100644 --- a/themes/default/layouts/_default/_markup/render-image.html +++ b/themes/default/layouts/_default/_markup/render-image.html @@ -14,7 +14,11 @@ {{- $resized := $image.Resize (cond (eq $isBlock true) "1024x" "500x") -}} {{- $large := $image.Resize "1920x" -}} {{- if $isBlock }} -
+
+ {{- with $data.description }} +

{{ . | markdownify }}

+ {{- end }} +
{{ $alt }} @@ -33,11 +37,6 @@ {{ . | markdownify }}

{{- end }} -
- {{- with $data.description }} -

{{ . | markdownify }}

- {{- end }} -
{{- end }}
{{- else }}