@php $autoplay = ($shortcode->is_autoplay ?? 'yes') === 'yes'; $autoplaySpeed = (int) ($shortcode->autoplay_speed ?? 5000); $showArrows = ($shortcode->show_arrows ?? 'yes') === 'yes'; $showDots = ($shortcode->show_dots ?? 'yes') === 'yes'; @endphp
htmlAttributes() !!} class="tf-section simple-slider-section style-split">
@foreach ($sliders as $sliderItem) @php $title = $sliderItem->title; $description = $sliderItem->description; $subtitle = method_exists($sliderItem, 'getMetaData') ? ($sliderItem->getMetaData('subtitle', true) ?: null) : null; $buttonLabel = method_exists($sliderItem, 'getMetaData') ? ($sliderItem->getMetaData('button_label', true) ?: null) : null; @endphp
{{-- Raw so first slide can opt out of lazy + claim fetchpriority=high (LCP candidate). Other slides stay lazy. --}} @php $isFirstSlide = $loop->first; $imgSrc = RvMedia::getImageUrl($sliderItem->image); $imgSrcset = collect([ RvMedia::getImageUrl($sliderItem->image, 'hero-sm') . ' 400w', RvMedia::getImageUrl($sliderItem->image, 'hero-md') . ' 768w', $imgSrc . ' 1920w', ])->implode(', '); @endphp {{ $title ?: '' }}
@if (! empty($subtitle))

{!! BaseHelper::clean($subtitle) !!}

@elseif (! empty($description))

{!! BaseHelper::clean($description) !!}

@endif @if (! empty($title))

{!! BaseHelper::clean($title) !!}

@endif @if (! empty($buttonLabel)) {!! BaseHelper::clean($buttonLabel) !!} @elseif ($sliderItem->link) {{ __('Shop Now') }} @endif
@endforeach
@if ($showArrows)
@endif @if ($showDots)
@endif