This commit is contained in:
Vula Builder
2026-07-25 19:05:19 +00:00
parent 4becd8df6a
commit 9b5d2c7db7
@@ -0,0 +1,60 @@
'use client'
import { useEmDashContent } from '@/hooks/useEmDashContent'
import Image from 'next/image'
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card'
export default function GuestStoriesSection() {
const { items, loading } = useEmDashContent('posts')
if (loading) return <div className="flex justify-center py-24"><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="guest-stories" data-vula-section="gueststories" data-vula-cms="posts" className="py-24 bg-[#17120f]">
<div className="max-w-7xl mx-auto px-4">
<div className="flex items-center justify-center gap-4 mb-12">
<span className="block w-14 h-px bg-[#d4af37]/50" />
<span className="text-[#d4af37] tracking-[0.2em] text-xs font-sans uppercase">Guest Stories</span>
<span className="block w-14 h-px bg-[#d4af37]/50" />
</div>
<h2 className="text-4xl md:text-5xl font-light text-[#eeeae7] text-center mb-16" style={{ fontFamily: 'Cormorant Garamond, serif' }}>
<span className="italic text-[#d4af37]">Voices</span> of Our Guests
</h2>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
{items.slice(0, 6).map((item) => {
const d = item.data as { title?: string; excerpt?: string; author?: string; category?: string; image?: string }
return (
<Card key={item.id} className="bg-[#1c1612] border border-[#403630]/50 rounded-lg p-0">
<div className="relative h-44 overflow-hidden rounded-t-lg">
{d.image ? (
<Image
src={d.image}
alt={d.title ?? 'Guest story'}
fill
sizes="(max-width: 768px) 100vw, 33vw"
className="object-cover"
/>
) : (
<div className="h-full w-full bg-[#2a1f1a]" />
)}
</div>
<CardHeader>
<div className="flex items-center gap-2 mb-2">
{d.category && <span className="text-[#6b8e23] text-xs tracking-widest uppercase font-sans">{d.category}</span>}
</div>
<CardTitle className="text-[#eeeae7] text-lg font-sans tracking-wide leading-snug">{d.title}</CardTitle>
</CardHeader>
<CardContent>
<p className="text-[#c0b8ae] text-sm leading-relaxed line-clamp-4">{d.excerpt}</p>
{d.author && (
<p className="text-[#d4af37] text-xs mt-4 font-sans uppercase tracking-wider"> {d.author}</p>
)}
</CardContent>
</Card>
)
})}
</div>
</div>
</section>
)
}