@extends('layouts.app') @section('title', $album->title) @section('page-title', 'Photo Gallery') @section('content')
{{-- Back + Album Header --}}
@php $catColors = ['sports'=>'bg-green-500','cultural'=>'bg-purple-500','academic'=>'bg-blue-500','celebration'=>'bg-pink-500','trip'=>'bg-cyan-500','graduation'=>'bg-yellow-500','general'=>'bg-stone-500','other'=>'bg-stone-400']; @endphp {{ App\Models\GalleryAlbum::categories()[$album->category] ?? $album->category }} @if(!$album->is_published) Draft @endif

{{ $album->title }}

@if($album->event_date) {{ $album->event_date->format('d M Y') }} · @endif {{ $album->photos->count() }} photos · by {{ $album->creator->name ?? 'Admin' }}

@if($album->description)

{{ $album->description }}

@endif
@if(auth()->user()->role === 'admin')
@csrf
@csrf @method('DELETE')
@endif
{{-- Photo Grid --}} @if($album->photos->isNotEmpty())
@foreach($album->photos as $i => $photo)
{{ $photo->caption ?? $album->title }} {{-- Hover overlay --}}
{{-- Caption --}} @if($photo->caption)

{{ $photo->caption }}

@endif {{-- Admin delete --}} @if(auth()->user()->role === 'admin')
@csrf @method('DELETE')
@endif
@endforeach
@else

No photos in this album yet

@endif
{{-- Lightbox --}} {{-- Add Photos Modal --}} @if(auth()->user()->role === 'admin') {{-- Edit Album Modal --}} @endif @endsection