@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * Full-bleed testimonials banner (`section-testimonials` + `testimonial-v01 style-7`). * Mirrors html/home-headphone.html lines 3277-3435: * `
*
` swiper of * `testimonial-v01 style-7 style-def` slides — centered stars, `tes_author` * (h5 name + br-line + Verified Buyer), `tes_text h4` quote, `tes_product` * mini-card (80x80 product image + name + price-new/price-old). * * This style emits its OWN `container-full` + `section-testimonials` wrapper, * so the parent index must NOT double-wrap it (see $bareStyles in index.blade.php). * * Knobs: * banner_image — full-bleed banner (1770x600, non-square → RvMedia false). * autoplay — yes/no (default yes). * testimonial_product_ids — CSV product IDs paired per-testimonial (resolved * by the parent index, surfaces as $item['product_*']). * * @var \Botble\Shortcode\Compilers\Shortcode $shortcode * @var array $items */ $autoplay = ($shortcode->autoplay ?? 'yes') === 'yes'; $bannerImage = trim((string) ($shortcode->banner_image ?? '')); @endphp
@if ($bannerImage !== '') @endif
@foreach ($items as $index => $item) @php $rating = max(0, min(5, (int) ($item['rating'] ?? 5))); $name = $item['name'] ?? ''; $role = $item['role'] ?? ''; $content = $item['content'] ?? ''; $productImage = $item['product_image'] ?? null; $productName = $item['product_name'] ?? ''; $productPrice = $item['product_price'] ?? ''; $productOldPrice = $item['product_old_price'] ?? ''; $productUrl = $item['product_url'] ?? '#'; @endphp
0) data-wow-delay="0.1s" @endif>
@if ($rating > 0)
@for ($i = 1; $i <= $rating; $i++) @endfor
@endif @if (! empty($name))
{!! BaseHelper::clean($name) !!}
{{ ! empty($role) ? $role : __('Verified Buyer') }}
@endif @if (! empty($content))

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

@endif @if (! empty($productImage) || ! empty($productName))
@if (! empty($productImage))
{!! RvMedia::image($productImage, $productName, 'thumb', false, ['width' => 80, 'height' => 80, 'class' => 'aspect-ratio-1 object-fit-cover', 'loading' => 'lazy']) !!}
@endif
@if (! empty($productName)) {!! BaseHelper::clean($productName) !!} @endif @if (! empty($productPrice))
{!! BaseHelper::clean($productPrice) !!} @if (! empty($productOldPrice)) {!! BaseHelper::clean($productOldPrice) !!} @endif
@endif
@endif
@endforeach