@props([ 'slides' => [], ]) @php $slideList = collect($slides) ->filter(fn ($row) => filled($row['src'] ?? null)) ->values() ->all(); $gallerySizes = (string) (config('media.contexts.gallery.sizes') ?: '(max-width: 640px) 100vw, (max-width: 1023px) 50vw, 25vw'); $viewLabel = __('site.hero_gallery_view'); @endphp
@if (count($slideList) === 0)

{{ __('site.hero_gallery_empty') }}

@else
@foreach ($slideList as $index => $slide) @php $url = $slide['url'] ?? null; $target = $slide['target'] ?? '_self'; $title = trim((string) ($slide['title'] ?? '')); $subtitle = trim((string) ($slide['subtitle'] ?? $slide['alt'] ?? '')); if ($subtitle !== '' && $subtitle === $title) { $subtitle = ''; } $alt = (string) ($slide['alt'] ?? $title); $delayMs = min($index * 50, 600); $hasTip = $title !== '' || $subtitle !== '' || filled($url); @endphp
! filled($url), 'rayan-masonry__item--has-tip' => $hasTip, ]) data-reveal="card" data-reveal-item style="--reveal-delay: {{ $delayMs }}ms; --reveal-duration: 600ms; --reveal-distance: 48px;" > {{ $alt }} @if ($hasTip)
@if ($title !== '')

{{ $title }}

@endif @if ($subtitle !== '')

{{ $subtitle }}

@endif @if (filled($url)) {{ $viewLabel }} @endif
@endif
@endforeach
@endif