Deploy
This commit is contained in:
@@ -0,0 +1,60 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import Badge from '@/components/ui/Badge'
|
||||||
|
|
||||||
|
export default function KwaNtofontofoSpecialsSection() {
|
||||||
|
const { items, loading } = useEmDashContent('promotions')
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section
|
||||||
|
id="specials"
|
||||||
|
data-vula-section="kwantofontofospecials"
|
||||||
|
data-vula-cms="promotions"
|
||||||
|
className="py-16 bg-neutral-50"
|
||||||
|
>
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<h2 className="text-3xl font-bold text-[#d4af37] text-center mb-4">KwaNtofontofo Specials</h2>
|
||||||
|
<p className="text-center text-neutral-600 mb-12 max-w-2xl mx-auto">
|
||||||
|
Exclusive offers crafted to make your stay even more regal. Treat yourself to a memorable escape.
|
||||||
|
</p>
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||||
|
{items.map((item) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; price?: string; image?: string }
|
||||||
|
const imageUrl = d.image || 'https://images.pexels.com/photos/15640157/pexels-photo-15640157.jpeg?auto=compress&cs=tinysrgb&h=350'
|
||||||
|
return (
|
||||||
|
<Card key={item.id} className="overflow-hidden border border-neutral-100 shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] hover:-translate-y-0.5 transition-all duration-200 ease-out">
|
||||||
|
<div className="aspect-video relative overflow-hidden">
|
||||||
|
<Image src={imageUrl} alt={d.title || 'Special offer'} fill sizes="(max-width: 768px) 100vw, 50vw" className="object-cover hover:scale-105 transition-transform duration-500 ease-out" />
|
||||||
|
</div>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle className="text-lg text-[#111827]">{d.title || 'Special'}</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<p className="text-neutral-600 text-sm mb-3">{d.description || ''}</p>
|
||||||
|
{d.price && (
|
||||||
|
<Badge variant="default" className="bg-[#d4af37] text-white px-3 py-1 text-sm">
|
||||||
|
{d.price}
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user