From 77f7678f08ac9667bd5a962b75419906d7cdcb43 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 24 Jan 2026 04:00:29 +0000 Subject: [PATCH] fix(blox): restore side-by-side layout in cta-image-paragraph block Previous commits broke the 2-column grid layout by prematurely closing the grid container after the image, leaving the text content outside the grid. Now both image and text are properly wrapped within the same md:grid md:grid-cols-2 container. Fixes regression where image and paragraph appeared stacked vertically instead of side-by-side on medium+ screens. --- .../blox/blox/cta-image-paragraph/block.html | 59 +++++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/modules/blox/blox/cta-image-paragraph/block.html b/modules/blox/blox/cta-image-paragraph/block.html index 1f19eec1..7e10c216 100644 --- a/modules/blox/blox/cta-image-paragraph/block.html +++ b/modules/blox/blox/cta-image-paragraph/block.html @@ -65,39 +65,38 @@ {{ end }} {{ $image_to_render := $image_resource }} - {{ if $image_to_render }} -
- {{ if ne $image_to_render.MediaType.SubType "gif" }} - {{ $responsive := partial "functions/process_responsive_image.html" (dict - "image" $image_to_render - "mode" "fit" - "sizes" (slice 400 600 800 1200) - ) }} +
+ {{ if or $image_to_render $image_url }} + {{ if $image_to_render }} + {{ if ne $image_to_render.MediaType.SubType "gif" }} + {{ $responsive := partial "functions/process_responsive_image.html" (dict + "image" $image_to_render + "mode" "fit" + "sizes" (slice 400 600 800 1200) + ) }} + {{$title | plainify}} + {{ else }} + {{$title | plainify}} + {{ end }} + {{ else if $image_url }} + {{ $is_external := or (strings.HasPrefix $image_url "http://") (strings.HasPrefix $image_url "https://") }} {{$title | plainify}} - {{ else }} - {{$title | plainify}} {{ end }} -
- {{ else if $image_url }} -
- {{ $is_external := or (strings.HasPrefix $image_url "http://") (strings.HasPrefix $image_url "https://") }} - {{$title | plainify}} -
- {{ else }} - {{ warnf "%s uses the `cta-image-paragraph` blox which specifies a non-existent `image` at `assets/%s`. Skipping this item." $page.File.Path $image_path }} - {{ end }} + {{ else if $image_name }} + {{ warnf "%s uses the `cta-image-paragraph` blox which specifies a non-existent `image` at `assets/%s`. Rendering text only." $page.File.Path $image_path }} + {{ end }}

{{$title}}

{{$text}}