{{-- Available variables: $content (array): The content for this section, expected to have a 'slides' array. $title (string|null): Optional title for the section (less common for hero). $section (LpPageSection instance): The full section object. --}} @php $slides = data_get($content, 'slides', []); $hasSlides = !empty($slides) && is_array($slides) && count($slides) > 0; @endphp @if($hasSlides)
@foreach($slides as $index => $slide) @php $slideTitle = data_get($slide, 'title', 'Welcome'); $slideSubtitle = data_get($slide, 'subtitle', ''); $slideCtaText = data_get($slide, 'cta_text', 'Learn More'); $slideCtaLink = data_get($slide, 'cta_link', '#'); // Secondary CTA (optional, fields would need to be added in admin form) $slideCtaSecondaryText = data_get($slide, 'cta_secondary_text'); $slideCtaSecondaryLink = data_get($slide, 'cta_secondary_link'); $imagePath = data_get($slide, 'image_url'); // Use Storage::url for uploaded images, asset for theme's default fallback $slideFullImageUrl = $imagePath ? Storage::url($imagePath) : asset('modules/landingpage/images/default-hero-bg.jpg'); @endphp
{{-- Dark overlay for better text readability on images --}}

{{ $slideTitle }}

@if($slideSubtitle)

{{ $slideSubtitle }}

@endif
@if($slideCtaText && $slideCtaLink) {{ $slideCtaText }} @endif @if($slideCtaSecondaryText && $slideCtaSecondaryLink) {{ $slideCtaSecondaryText }} @endif
@endforeach
@pushOnce('styles') @endPushOnce @pushOnce('scripts') @endPushOnce @else {{-- Fallback if no slides are configured for the hero section --}}

Hero Section Awaits Content

Please add slides in the page editor to activate this hero section.

@endif