@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * Simple-slider style-headphone — `tf-slideshow style-2 v2` center-mode hero * with optional `infiniteSlide-policy-v2` USP strip rendered as sibling below. * * Mirrors html/home-headphone.html lines 1281-1455: *
* * Per-slide attrs (via slider metadata): * button_label — CTA label (.tf-btn btn-white) * * Per-shortcode attrs: * show_arrows — 'yes' (default) | 'no' (drives tf-sw-nav-2 visibility) * show_dots — 'yes' (default) | 'no' (mobile-only pagination dots) * usp_quantity — number of USP policy items (0 = no strip; default 0) * usp_text_1..N — policy text strings * usp_image_1..N — policy image paths */ $autoplay = ($shortcode->is_autoplay ?? 'yes') === 'yes'; $autoplaySpeed = (int) ($shortcode->autoplay_speed ?? 3000); $showArrows = ($shortcode->show_arrows ?? 'yes') === 'yes'; $showDots = ($shortcode->show_dots ?? 'yes') === 'yes'; $uspQuantity = max(0, (int) ($shortcode->usp_quantity ?? 0)); $uspItems = []; for ($i = 1; $i <= $uspQuantity; $i++) { $text = trim((string) ($shortcode->{"usp_text_{$i}"} ?? '')); $image = trim((string) ($shortcode->{"usp_image_{$i}"} ?? '')); if ($text === '' && $image === '') { continue; } $uspItems[] = ['text' => $text, 'image' => $image]; } @endphp