Deploy
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
'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 data-vula-section="gallery" 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" className="py-20 lg:py-28 bg-[#ffffff]">
|
||||
<div className="mx-auto max-w-6xl px-4">
|
||||
<div className="mb-12 text-center">
|
||||
<span className="text-sm font-semibold tracking-widest uppercase text-neutral-400">Our Gallery</span>
|
||||
<h2 className="mt-3 text-3xl lg:text-4xl font-semibold tracking-tight text-[#111827]">Moments at Mtungwa & Partners</h2>
|
||||
<p className="mt-4 text-lg leading-relaxed text-neutral-600">A visual look into our practice and community engagements.</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{items.map((item) => {
|
||||
const d = item.data as { title?: string; description?: string; image?: string }
|
||||
return (
|
||||
<div key={item.id} className="group overflow-hidden rounded-xl border border-neutral-100 bg-white shadow-[var(--shadow-card)] transition-all duration-200 ease-out hover:shadow-[var(--shadow-lifted)] hover:-translate-y-0.5">
|
||||
<div className="relative aspect-video overflow-hidden">
|
||||
{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>
|
||||
<div className="p-6">
|
||||
{d.title && <h3 className="text-lg font-semibold text-[#111827]">{d.title}</h3>}
|
||||
{d.description && <p className="mt-2 text-sm text-neutral-600 leading-relaxed">{d.description}</p>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user