Files
Mark Gregory 48a95478ef
tests / ci (push) Canceled after 0s
Initial Commit
2026-10-15 17:13:38 +01:00

1 line
1.7 KiB
PHP

@extends('lodge.admin-layout')@section('title','Photographs')@section('section','Photo gallery')@section('content')<div class="page-heading"><div><div class="eyebrow">LODGE MANAGEMENT</div><h1>Photo gallery</h1><p>Manage the images shown on the public website.</p></div><a class="btn secondary" href="{{ route('home') }}#gallery" target="_blank">View public gallery ↗</a></div><div class="panel"><div class="panel-head"><div><h2>Upload photographs</h2><p>Up to 10 JPEG, PNG or WebP images, 15 MB each. Uploaded images are optimised automatically.</p></div></div><form class="upload-form" action="{{ route('lodge.photos.store') }}" method="POST" enctype="multipart/form-data">@csrf<label class="upload-box" for="photos"><span class="upload-icon">↑</span><strong>Select photographs</strong><small>Choose files to upload</small><input id="photos" name="photos[]" type="file" accept="image/jpeg,image/png,image/webp" multiple required></label><button class="btn primary">Upload and optimise</button></form></div><div class="panel"><div class="panel-head"><div><h2>Uploaded photographs</h2><p>{{ $photos->count() }} images</p></div></div><div class="photo-grid">@forelse($photos as $photo)<div class="photo-card"><img src="{{ asset('storage/'.$photo->thumbnail_path) }}" alt="{{ $photo->alt_text }}" loading="lazy"><div class="photo-meta"><span>{{ $photo->alt_text ?: 'Lodge photograph' }}</span><form action="{{ route('lodge.photos.destroy',$photo) }}" method="POST" onsubmit="return confirm('Delete this photograph?')">@csrf @method('DELETE')<button class="danger">Delete</button></form></div></div>@empty<div class="empty">No uploaded photographs yet. The built-in lodge photographs remain on the website.</div>@endforelse</div></div>@endsection