{{-- Renders a single project slot: image, text, video (youtube/bunny/frameio/mp4). Expected $slot shape: type : 'image' | 'text' | 'video' image : ['url' => string, 'alt' => string] media : ['type' => string, 'url' => string, 'embedUrl' => string] | null --}} @php $stretch = $stretch ?? false; $squareEmbed = $squareEmbed ?? false; $slotType = $slot['type'] ?? ''; @endphp @if($slotType === 'image' && !empty($slot['image']['url']))
$stretch])> {{ $slot['image']['alt'] ?? '' }}
@elseif($slotType === 'text' && trim(strip_tags((string) ($slot['text'] ?? ''))) !== '')
$stretch, 'd-flex' => true, 'align-items-center' => true])>
{!! $slot['text'] !!}
@elseif($slotType === 'video' && !empty($slot['media'])) @php $media = $slot['media']; @endphp
$stretch])> @if(in_array($media['type'], ['youtube', 'bunny', 'frameio']) && !empty($media['embedUrl']))
@elseif($media['type'] === 'video' && !empty($media['url'])) @endif
@endif