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