@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * lookbook-hotspot style-swiper-banners — a `data-preview="2"` swiper of * full-width shoppable `banner-lookbook wrap-lookbook_hover` banners. * Mirrors html/home-pod.html §5 "Lookbook" (lines 2052-2155): two 960×600 * banner slides, each with preset-position pins (`lookbook-item position4/5/6`). * * Hotspots are split between the two banners by their `column` value * (1 → first banner, 2 → second banner). Within a banner the pins use the * theme's preset `position{4 + localIndex}` classes (the demo uses fixed * preset positions, NOT free x/y placement). Banner art is wide (960×600) — * passed as the original image (no RvMedia size string would double-crop it). * * The index wraps this in a bare `
` (zero vertical * padding) — see lookbook-hotspot/index.blade.php $sectionWrapper. */ $hotspots = $hotspots ?? []; $image1 = $shortcode->image ?? null; $image2 = $shortcode->image_2 ?? null; // Split hotspots into the two banners by `column` (default column 1). $banner1Pins = []; $banner2Pins = []; foreach ($hotspots as $h) { if ((int) ($h['column'] ?? 1) === 2) { $banner2Pins[] = $h; } else { $banner1Pins[] = $h; } } $banners = []; if (! empty($image1)) { $banners[] = ['image' => $image1, 'pins' => $banner1Pins]; } if (! empty($image2)) { $banners[] = ['image' => $image2, 'pins' => $banner2Pins]; } @endphp
@foreach ($banners as $banner)
@endforeach