From 877a2609e911c0faeec583435730471372bad48c Mon Sep 17 00:00:00 2001 From: L0kayata Date: Fri, 27 Mar 2026 12:27:21 +0100 Subject: [PATCH] fix: Fix carousel caption flow and scope controls to image bounds Move carousel captions out of absolute positioning so they participate in normal height calculation and no longer overlap content below the carousel. Constrain indicators and navigation buttons to the image region using container-based sizing, so controls do not extend into the caption area. --- layouts/shortcodes/carousel.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html index 55e69358..55cf6878 100644 --- a/layouts/shortcodes/carousel.html +++ b/layouts/shortcodes/carousel.html @@ -39,11 +39,13 @@
{{ $num := 0 }} {{ range $images }} @@ -89,18 +91,19 @@ class="block absolute top-0 object-cover w-full h-full not-prose nozoom" alt="carousel image {{ add $index 1 }}">
- {{ if $caption }} + {{ if or $caption $captionsParam }}
{{ $caption | markdownify }}
+ class="mt-1 {{ if not $caption }}invisible{{ end }}" + {{ if not $caption }}aria-hidden="true"{{ end }} + >{{ if $caption }}{{ $caption | markdownify }}{{ else }} {{ end }} {{ end }}
{{ end }}