{{-- Homepage "peek" carousel: short colour-block slides with the photo fading in from the right and the neighbouring slides peeking in at the edges. Shown only when an admin uploads banners with placement "home_carousel"; each slide takes its colour from the palette below in turn. Behaviour lives in resources/js/storefront.js ([data-peek]). --}} @php $palette = [['#1b1f24', '#ffffff'], ['#fde3c6', '#5a250b'], ['#1e4e79', '#ffffff'], ['#e9ecef', '#1b1f24']]; $slides = \App\Modules\Marketing\Models\Banner::for('home_carousel')->values()->map(fn ($b, $i) => [ 'image' => $b->desktopUrl(), 'mobile' => $b->mobileUrl(), 'eyebrow' => $b->eyebrow, 'title' => $b->title, 'subtitle' => $b->subtitle, 'button' => $b->button_text, 'link' => $b->link, 'bg' => $palette[$i % count($palette)][0], 'ink' => $palette[$i % count($palette)][1], ])->all(); $count = count($slides); @endphp @if ($count)
1) data-peek data-interval="5500" @endif aria-roledescription="carousel" aria-label="Featured offers">
@foreach ($slides as $i => $slide)
in_array(strtolower($slide['ink']), ['#fff', '#ffffff'])]) style="--pk-bg: {{ $slide['bg'] }}; --pk-ink: {{ $slide['ink'] }}">
@if ($slide['eyebrow']){{ $slide['eyebrow'] }}@endif

{!! nl2br(e($slide['title'])) !!}

@if ($slide['subtitle'])

{{ $slide['subtitle'] }}

@endif @if ($slide['button'] && $slide['link']) {{ $slide['button'] }} @endif
@endforeach
@if ($count > 1)
@foreach ($slides as $i => $slide) @endforeach
@endif
@endif