This commit is contained in:
Vula Builder
2026-06-23 08:47:46 +00:00
parent 12876ae3ca
commit 3cb98aa1a8
@@ -0,0 +1,68 @@
'use client'
import { useEmDashContent } from '@/hooks/useEmDashContent'
import Image from 'next/image'
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/Card'
export default function VictoryMomentsGallerySection() {
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-[#000080] border-t-transparent animate-spin" />
</div>
)
}
if (items.length === 0) return null
return (
<section
id="victory-gallery"
data-vula-section="victorymomentsgallery"
data-vula-cms="gallery"
className="py-20 bg-white"
>
<div className="max-w-7xl mx-auto px-4">
<div className="text-center mb-12">
<h2 className="text-3xl font-bold text-[#000080]">Victory Moments</h2>
<p className="text-[#36454F] mt-2 max-w-2xl mx-auto">
Every case we win is a life restored. Here are some of the moments that matter.
</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 (
<Card
key={item.id}
className="rounded-xl border border-neutral-100 bg-white shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] hover:-translate-y-0.5 transition-all duration-200 ease-out overflow-hidden"
>
{d.image && (
<div className="aspect-video overflow-hidden">
<Image
src={d.image}
alt={d.title || 'Gallery image'}
width={800}
height={600}
className="object-cover w-full h-full hover:scale-105 transition-transform duration-500 ease-out"
/>
</div>
)}
<CardHeader>
{d.title && <CardTitle className="text-lg text-[#000080]">{d.title}</CardTitle>}
{d.description && (
<CardDescription className="text-[#36454F]">{d.description}</CardDescription>
)}
</CardHeader>
<CardContent />
</Card>
)
})}
</div>
</div>
</section>
)
}