@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * 4-card composite banner block (home-garden Indoor Plant Picks pattern). * Mirrors html/home-garden.html lines 2082-2167 (`section-banner-cls-v02`): * left : 1 tall card (banner-image-text style-top-left tl-2) white-on-image * right : 2-col grid of 2 small cards (style-20) white-on-image * + 1 wide bottom card (style-19) white-on-image * * Shortcode attrs (admin-driven): * left_image, left_heading, left_subheading, left_button_text, left_button_url * top1_image, top1_heading, top1_subheading, top1_button_text, top1_button_url * top2_image, top2_heading, top2_subheading, top2_button_text, top2_button_url * bottom_image, bottom_heading, bottom_subheading, bottom_button_text, bottom_button_url */ $card = function (string $prefix) use ($shortcode) { return [ 'image' => (string) ($shortcode->{"{$prefix}_image"} ?? ''), 'heading' => (string) ($shortcode->{"{$prefix}_heading"} ?? ''), 'subheading' => (string) ($shortcode->{"{$prefix}_subheading"} ?? ''), 'button_text' => (string) ($shortcode->{"{$prefix}_button_text"} ?? __('Shop Now')), 'button_url' => (string) ($shortcode->{"{$prefix}_button_url"} ?? '#'), ]; }; $left = $card('left'); $top1 = $card('top1'); $top2 = $card('top2'); $bottom = $card('bottom'); @endphp {{-- .section-banner-cls-v02 4-card composite layout lives in assets/sass/component/_inline-migrated.scss. --}}
@foreach ([$top1, $top2] as $card) @endforeach