Deploy
This commit is contained in:
@@ -0,0 +1,49 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
|
export default function UbuntuGlowTestimonialsSection() {
|
||||||
|
const { items, loading } = useVulaContent('posts')
|
||||||
|
|
||||||
|
if (loading) return <div className="flex justify-center py-16"><div className="w-8 h-8 rounded-full border-2 border-[#6b8e23] border-t-transparent animate-spin" /></div>
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="testimonials" data-vula-section="ubuntuglowtestimonials" data-vula-cms="posts" className="py-20 bg-[#f4f5f2]">
|
||||||
|
<div className="max-w-6xl mx-auto px-4">
|
||||||
|
<div className="text-center mb-12">
|
||||||
|
<span className="inline-block text-[#8b5a3c] text-sm font-semibold uppercase tracking-widest mb-2">Ubuntu</span>
|
||||||
|
<h2 className="text-3xl md:text-4xl font-bold text-[#2c331f]">
|
||||||
|
<span className="text-[#6b8e23]">I am because we are</span> — real stories from our community
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div className="grid md:grid-cols-3 gap-8">
|
||||||
|
{items.slice(0, 3).map((item) => {
|
||||||
|
const d = item.data as { title?: string; excerpt?: string; author?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="bg-white rounded-[28px] p-8 shadow-lg hover:shadow-xl transition-all duration-200">
|
||||||
|
{d.image && (
|
||||||
|
<div className="relative w-20 h-20 mx-auto mb-4 rounded-full overflow-hidden border-4 border-[#6b8e23]/20">
|
||||||
|
<Image src={d.image} alt={d.author || 'Customer'} fill className="object-cover" sizes="80px" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="text-center">
|
||||||
|
<div className="text-[#ea580c] text-lg mb-3">★★★★★</div>
|
||||||
|
{d.excerpt && <p className="text-[#2c331f]/80 italic mb-4">“{d.excerpt}”</p>}
|
||||||
|
{d.author && <p className="font-semibold text-[#2c331f]">{d.author}</p>}
|
||||||
|
{d.title && <p className="text-sm text-[#8b5a3c]">{d.title}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
{items.length > 3 && (
|
||||||
|
<div className="text-center mt-8">
|
||||||
|
<button className="text-[#6b8e23] font-semibold hover:underline transition-all duration-200">Read more reviews →</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user