%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php
/**
* Halaman publik: Galeri Kegiatan (semua kegiatan).
*/
require_once __DIR__ . '/config/config.php';
require_once __DIR__ . '/includes/queries.php';
$galeriList = get_galeri_list();
$fotoMap = get_galeri_foto_map(array_column($galeriList, 'id'));
$pageTitle = 'Galeri Foto — ' . APP_NAME_SHORT;
$activeNav = 'galeri';
require __DIR__ . '/partials/head.php';
require __DIR__ . '/partials/navbar.php';
?>
<section class="relative overflow-hidden bg-gradient-to-br from-mateng-green to-mateng-blue text-white py-14">
<?php require __DIR__ . '/partials/sekda-header.php'; ?>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<nav class="text-sm text-green-100 mb-3">
<a href="<?= e(url('index.php')) ?>" class="hover:underline">Beranda</a><span class="mx-2">/</span>
<span>Galeri Kegiatan</span><span class="mx-2">/</span><span>Galeri Foto</span>
</nav>
<h1 class="text-3xl md:text-4xl font-extrabold mb-2">Galeri Foto</h1>
<p class="text-green-50 max-w-2xl">Dokumentasi foto kegiatan PPID & Pemerintah Kabupaten Mamuju Tengah.</p>
</div>
</section>
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 w-full">
<?php if (empty($galeriList)): ?>
<div class="text-center py-20 bg-white rounded-2xl border border-slate-100">
<i class="fas fa-images text-5xl text-slate-300 mb-4"></i>
<p class="text-slate-500 font-medium">Belum ada galeri kegiatan.</p>
</div>
<?php else: ?>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
<?php foreach ($galeriList as $g):
$fotoUrls = [];
foreach ($fotoMap[(int) $g['id']] ?? [] as $ff) {
if (is_file(UPLOAD_PATH . '/galeri/' . $ff)) { $fotoUrls[] = UPLOAD_URL . '/galeri/' . $ff; }
}
$cover = $fotoUrls[0] ?? null; ?>
<?php if ($fotoUrls): ?>
<button type="button" class="galeri-open group relative block w-full text-left rounded-2xl overflow-hidden border border-slate-100 shadow-sm bg-slate-900 aspect-[4/3]" data-fotos="<?= e(json_encode($fotoUrls, JSON_UNESCAPED_SLASHES)) ?>" data-judul="<?= e($g['judul']) ?>">
<img src="<?= e($cover) ?>" alt="<?= e($g['judul']) ?>" class="absolute inset-0 w-full h-full object-cover opacity-90 group-hover:opacity-100 group-hover:scale-105 transition-all duration-500">
<div class="absolute inset-0 bg-gradient-to-t from-black/80 via-black/15 to-transparent"></div>
<span class="absolute top-3 right-3 bg-black/50 text-white text-[11px] px-2 py-0.5 rounded-full"><i class="fas fa-images mr-1"></i><?= (int) $g['jml_foto'] ?></span>
<span class="absolute inset-0 flex items-center justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity"><i class="fas fa-magnifying-glass-plus text-2xl drop-shadow"></i></span>
<div class="absolute bottom-0 inset-x-0 p-4">
<h3 class="text-white font-bold leading-snug line-clamp-2"><?= e($g['judul']) ?></h3>
<p class="text-white/70 text-xs mt-1"><i class="far fa-calendar mr-1"></i><?= e(tanggal_id($g['tanggal'] ?: $g['created_at'])) ?></p>
</div>
</button>
<?php else: ?>
<div class="relative rounded-2xl overflow-hidden border border-slate-100 shadow-sm bg-slate-100 aspect-[4/3] flex items-center justify-center text-slate-400">
<div class="text-center px-3"><i class="fas fa-images text-3xl mb-2 block"></i><span class="text-xs font-medium text-slate-500 line-clamp-2"><?= e($g['judul']) ?></span></div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php require __DIR__ . '/partials/galeri-lightbox.php'; ?>
<?php endif; ?>
<div class="mt-8">
<a href="<?= e(url('galeri-video.php')) ?>" class="inline-flex items-center gap-2 text-mateng-green font-semibold hover:underline"><i class="fab fa-youtube"></i> Lihat Galeri Video</a>
</div>
</main>
<?php require __DIR__ . '/partials/footer.php'; ?>