Deploy
This commit is contained in:
@@ -0,0 +1,74 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from "@/hooks/useEmDashContent"
|
||||||
|
import Image from "next/image"
|
||||||
|
|
||||||
|
export default function GallerySection() {
|
||||||
|
const { items, loading } = useEmDashContent("gallery")
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<div className="flex justify-center py-16">
|
||||||
|
<div className="w-8 h-8 rounded-full border-2 border-current border-t-transparent animate-spin" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section
|
||||||
|
id="gallery"
|
||||||
|
data-vula-section="gallery"
|
||||||
|
data-vula-cms="gallery"
|
||||||
|
className="py-20 bg-[#f9f5f4]"
|
||||||
|
>
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div className="text-center mb-12">
|
||||||
|
<p className="text-sm uppercase tracking-widest text-[#2563eb] mb-2">
|
||||||
|
Visual Stories
|
||||||
|
</p>
|
||||||
|
<h2 className="text-4xl font-bold text-[#21140d] mb-4">
|
||||||
|
Glimpses of Zulwini
|
||||||
|
</h2>
|
||||||
|
<p className="text-[#21140d]/70 italic max-w-2xl mx-auto">
|
||||||
|
From sunrise game drives to star-lit bomas — every frame tells a story.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
|
{items.map((item) => {
|
||||||
|
const d = item.data as {
|
||||||
|
title?: string
|
||||||
|
description?: string
|
||||||
|
image?: string
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={item.id}
|
||||||
|
className="group relative overflow-hidden rounded-2xl shadow-xl aspect-video cursor-pointer"
|
||||||
|
>
|
||||||
|
{d.image && (
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title || "Gallery image"}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||||
|
className="object-cover transition-transform duration-500 ease-out group-hover:scale-105"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
||||||
|
<div className="absolute bottom-4 left-4 text-white">
|
||||||
|
<h3 className="text-lg font-bold">{d.title}</h3>
|
||||||
|
{d.description && (
|
||||||
|
<p className="text-sm italic opacity-90">{d.description}</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user