From bc02375be7268edc78f4a00badc4b2292cc1a96f Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 13 Jun 2025 16:06:41 +0800 Subject: fix: image caption being wider than image Use `position: absolute` for `
`, not affecting the container's width. Also rewrite `
` `
` style. --- layouts/_default/_markup/render-image.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'layouts/_default/_markup/render-image.html') diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 697c33c2..c1f2aa89 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,16 +1,16 @@ {{- $src := .Destination -}} {{- $alt := .Text | default "" -}} {{- $caption := .Title | default "" -}} -
- - {{ $alt }} - - {{- if $caption }} -
-

{{ $caption | markdownify }}

-
- {{- end }} -
+ +
+ {{ $alt }} + {{- if $caption }} +
+

{{ $caption | markdownify }}

+
+ {{- end }} +
+
-- cgit v1.2.3