Deploy
This commit is contained in:
@@ -0,0 +1,56 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { Quote } from 'lucide-react'
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
|
||||||
|
export default function GuestStoriesSection() {
|
||||||
|
const { items, loading } = useEmDashContent('posts')
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
// Take first 3 posts for testimonial display
|
||||||
|
const testimonials = items.slice(0, 3)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="guest-stories" data-vula-section="gueststories" data-vula-cms="posts" className="py-20 bg-[#f9f7f4]">
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<h2 className="text-[2rem] font-display font-bold text-[#18181b] text-center mb-4">What Our Guests Say</h2>
|
||||||
|
<p className="text-center text-[#211c0d] mb-12 max-w-2xl mx-auto font-serif italic">
|
||||||
|
Real stories from travelers who found something special in the heart of Limpopo.
|
||||||
|
</p>
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||||
|
{testimonials.map((item) => {
|
||||||
|
const d = item.data as { title?: string; excerpt?: string; body?: string; author?: string; category?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="bg-white rounded-2xl p-6 shadow-[0_4px_20px_rgba(0,0,0,0.06)] border border-[#e2dfd4] relative">
|
||||||
|
<Quote className="absolute top-4 left-4 text-[#d4af37] opacity-20 w-10 h-10" />
|
||||||
|
<div className="relative z-10">
|
||||||
|
<p className="text-[#211c0d] font-serif italic mb-4 leading-relaxed">
|
||||||
|
"{d.excerpt || d.body?.substring(0, 150) || 'A truly unforgettable experience.'}"
|
||||||
|
</p>
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<div className="w-10 h-10 rounded-full bg-[#d4af37]/20 flex items-center justify-center text-[#d4af37] font-bold text-sm">
|
||||||
|
{(d.author || d.title || 'G')[0]}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p className="text-sm font-semibold text-[#18181b]">{d.author || d.title || 'Guest'}</p>
|
||||||
|
{d.category && (
|
||||||
|
<p className="text-xs text-[#16a34a]">{d.category}</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user