@extends('layout.front.master')
@section('title', config('site.name') . ' | ' . config('site.tagline', __('Welcome')))
@section('description', config('site.seo.description') ?? config('site.description', ''))
@section('keywords', config('site.seo.keywords') ?? '')
{{-- Open Graph Meta Tags --}}
@section('og_title', config('site.name'))
@section('og_description', config('site.og.description') ?? config('site.description', ''))
@section('og_image', brand_og_image())
@section('og_type', 'website')
@section('og_url', url()->current())
{{-- Twitter Card Meta Tags --}}
@section('twitter_title', config('site.name'))
@section('twitter_description', config('site.twitter.description') ?? config('site.description', ''))
@section('twitter_image', brand_twitter_image())
@section('content')
{{-- Slider Revolution Fullscreen - Dinámico desde WelcomeCarousel --}}
@if(isset($carouselImages) && $carouselImages->count() > 0)
@foreach($carouselImages as $index => $carouselImage)
@php
// Determinar si es una URL completa o una ruta relativa
$imageUrl = filter_var($carouselImage->image_path, FILTER_VALIDATE_URL)
? $carouselImage->image_path
: asset($carouselImage->image_path);
// Usar name como título (o title si existe)
$slideTitle = $carouselImage->name ?? ($carouselImage->title ?? __('Slide') . ' ' . ($index + 1));
@endphp
{{ $slideTitle }}
@endforeach
@else
{{-- Fallback: imágenes estáticas del demo original --}}
{{ __('The Landscape') }}
{{ __('The Explorers') }}
{{ __('The Happy Family') }}
{{ __('The Cool Style') }}
{{ __('The Bride') }}
@endif
{{-- Gallery Section --}}
@if(is_module_active('gallery') && isset($galleryImages) && $galleryImages->count() > 0)
{{ config('site.welcome.gallery_heading', __('Gallery')) }}
@foreach($galleryImages->take(8) as $image)
@endforeach
@endif
{{-- Blog Section --}}
@if(is_module_active('blog') && isset($recentPosts) && $recentPosts->count() > 0)
{{ config('site.welcome.blog_heading', __('Latest Posts')) }}
@foreach($recentPosts->take(3) as $post)
@if($post->header)
@endif
{{ $post->created_at->format('d M Y') }}
{{ \Illuminate\Support\Str::limit($post->description ?? strip_tags($post->content), 100) }}
@endforeach
@endif
{{-- Projects Section --}}
@if(is_module_active('projects') && isset($featuredProjects) && $featuredProjects->count() > 0)
{{ config('site.welcome.projects_heading', __('Projects')) }}
@foreach($featuredProjects->take(6) as $project)
@if($project->image)
@endif
@if($project->description)
{{ \Illuminate\Support\Str::limit($project->description, 80) }}
@endif
@endforeach
@endif
@endsection
@section('css')
@endsection
@section('scripts')
{{-- Sin JS extra: dejamos que demo-photography.js inicialice el slider --}}
@endsection