@extends('frontend.master.master') @push('styles') @endpush @section('content')
{{ $nama_menu ?? 'Agenda' }}

{{ $data->title ?? 'Tidak Ada Konten' }}

@php // Use web-optimized version if exists, fallback to original $picturePath = $data->picture ?? 'noimage.png'; $webOptimizedPath = public_path('storage/' . $picturePath . '_web.jpg'); $imageSrc = file_exists($webOptimizedPath) ? asset('storage/' . $picturePath . '_web.jpg') : asset('storage/' . $picturePath); @endphp {{ $data->title ?? 'Tidak Ada Konten' }}
{!! !empty($data->description) ? $data->description : '

Tidak Ada Konten

' !!} {{-- Gallery Slider - Multi Foto Section --}} @php // Support both field names: multifoto and gallery_photos $galleryField = $data->multifoto ?? $data->gallery_photos ?? null; $gallery = []; if ($galleryField) { if (is_string($galleryField)) { $decoded = json_decode($galleryField, true); $gallery = is_array($decoded) ? $decoded : []; } elseif (is_array($galleryField)) { $gallery = $galleryField; } } $hasGallery = !empty($gallery) && count($gallery) > 0; @endphp @if($hasGallery) @endif {{-- Video Section --}} @php $videoUrl = $data->video_url ?? ''; $isEmbed = $videoUrl && (strpos($videoUrl, 'youtube.com') !== false || strpos($videoUrl, 'youtu.be') !== false || strpos($videoUrl, 'vimeo.com') !== false); @endphp @if($videoUrl) @endif
@if(isset($prevPost)) @else Post sebelumnya @endif @if(isset($nextPost)) @else Post selanjutnya @endif
@endsection @push('scripts') @endpush