@extends('layouts.app') @section('title', $event->titulo) @push('head') @endpush @section('content') @php // Helper para resolver URLs públicas desde BD: // Acepta 'storage/event_images/...', 'event_images/...', o '/storage/event_images/...' $pubUrl = function (?string $p) { if (empty($p)) return null; $p = ltrim($p, '/'); if (strpos($p, 'storage/') !== 0) $p = 'storage/' . $p; return asset($p); }; // Fondo $bgStyle = $event->bg_color ? "--bg-fallback: {$event->bg_color};" : ''; $wrapperStyle = $bgStyle; if (!empty($event->bg_image_path)) { $bgUrl = $pubUrl($event->bg_image_path); if ($bgUrl) $wrapperStyle .= "background: url('{$bgUrl}') center/cover no-repeat fixed;"; } elseif (!empty($event->bg_color)) { $wrapperStyle .= "background: var(--bg-fallback);"; } @endphp

{{ $event->titulo }}

/p/{{ $event->slug }}
@if (session('ok'))
{{ session('ok') }}
@endif @if($event->images->isEmpty())

Aún no hay imágenes subidas para este evento.

@else {{-- Carrusel multi-imagen con autoplay (Bootstrap 5) --}} {{-- Tira de miniaturas clicables --}}
@foreach($event->images->values() as $i => $thumb) @php $thumbSrc = $pubUrl($thumb->path); @endphp
Miniatura {{ $i+1 }}
@endforeach
@endif {{-- ===================== Subir imágenes (SIN LOGIN) ===================== --}} @if ($event->guest_upload_enabled)

Sube tus fotos del evento 📸

@csrf
@error('images')
{{ $message }}
@enderror @error('images.*')
{{ $message }}
@enderror Formatos permitidos: jpg, jpeg, png, webp. Máx 8MB por archivo.
@else
El organizador aún no ha habilitado la subida de imágenes para invitados.
@endif {{-- ===================== FIN Subir imágenes ===================== --}}
{{-- 🔎 Overlay de zoom (sin modal) --}} @endsection @push('scripts') @endpush