@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * simple-slider style-split — `slider-wrap_3` 2-col hero. * * Mirrors html/home-decor.html §1 (lines 1308-1411): `
` * title → `
` * nl2br → demo's `` in the title * button_label/link → `` * * Knobs (shortcode attrs): * wrapper_class — extra classes on `.tf-slideshow` (default empty). * inner_class — wrapper class around the swiper (default `container-full-3`). * autoplay_speed — data-delay ms (default 3000 to match demo). */ $autoplay = ($shortcode->is_autoplay ?? 'yes') === 'yes'; $autoplaySpeed = (int) ($shortcode->autoplay_speed ?? 3000); $showDots = ($shortcode->show_dots ?? 'yes') === 'yes'; $wrapperClass = trim((string) ($shortcode->wrapper_class ?? '')); $innerClass = trim((string) ($shortcode->inner_class ?? 'container-full-3')); @endphp htmlAttributes() !!} class="tf-slideshow {{ $wrapperClass }}"> @foreach ($sliders as $sliderItem) @php $title = $sliderItem->title; $subtitle = method_exists($sliderItem, 'getMetaData') ? ($sliderItem->getMetaData('subtitle', true) ?: null) : null; $buttonLabel = method_exists($sliderItem, 'getMetaData') ? ($sliderItem->getMetaData('button_label', true) ?: null) : null; $btnStyleRaw = method_exists($sliderItem, 'getMetaData') ? ($sliderItem->getMetaData('button_style', true) ?: 'pill-white') : 'pill-white'; // Default button = demo's `tf-btn btn-white style-2`. $btnClass = match ($btnStyleRaw) { 'outline-white' => 'tf-btn btn-line style-white', 'outline-dark' => 'tf-btn btn-line', 'pill-dark' => 'tf-btn animate-btn', default => 'tf-btn btn-white style-2', }; $imageUrl = RvMedia::getImageUrl($sliderItem->image); @endphp @if (! empty($subtitle)) {!! BaseHelper::clean($subtitle) !!} @endif @if (! empty($title)) {!! nl2br(BaseHelper::clean($title)) !!} @endif @if (! empty($buttonLabel)) {!! BaseHelper::clean($buttonLabel) !!} @endif @endforeach @if ($showDots) @endif
{!! BaseHelper::clean($subtitle) !!}
{!! nl2br(BaseHelper::clean($title)) !!}