@extends('layouts.app') @section('title', 'Galeri - Masjid An Nahl') @section('content') {{-- Hero Section --}} Galeri Masjid An Nahl Dokumentasi kegiatan dan momen berharga di Masjid An Nahl {{-- Gallery Grid --}} @if($galleries->count() > 0) @foreach($galleries as $gallery) @php $media = $gallery->image ?? $gallery->video; $ext = strtolower(pathinfo($media, PATHINFO_EXTENSION)); $isImage = in_array($ext, ['jpg','jpeg','png','gif','webp']); $isVideo = in_array($ext, ['mp4','mov','avi','mkv','webm']); // Fix untuk path yang tidak lengkap $videoPath = $gallery->video; if ($videoPath && !str_contains($videoPath, '/')) { $videoPath = 'galleries/videos/' . $videoPath; } $imagePath = $gallery->image; if ($imagePath && !str_contains($imagePath, '/')) { $imagePath = 'galleries/images/' . $imagePath; } @endphp @if ($isImage && $gallery->image) {{-- Zoom overlay untuk gambar --}} @elseif ($isVideo && $gallery->video) {{-- Play button overlay --}} @else @endif {{ $gallery->title }} {{ $gallery->created_at->format('d M Y') }} @if($isVideo) Video @elseif($isImage) Foto @endif {{-- Modal untuk preview full --}} {{ $gallery->title }} @if ($isImage && $gallery->image) @elseif ($isVideo && $gallery->video) Browser Anda tidak mendukung video ini. @endif @endforeach {{-- Pagination --}} {{ $galleries->links() }} @else Galeri Belum Tersedia Galeri akan segera diisi dengan dokumentasi kegiatan masjid @endif {{-- Custom Styles --}} @endsection
Dokumentasi kegiatan dan momen berharga di Masjid An Nahl
Galeri akan segera diisi dengan dokumentasi kegiatan masjid