Deploy
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
'use client'
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
import Button from '@/components/ui/Button'
|
||||
import { Card, CardContent, CardFooter } from '@/components/ui/Card'
|
||||
|
||||
export default function CurrentOffersSection() {
|
||||
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="current-offers" data-vula-section="currentoffers" data-vula-cms="promotions" className="py-24 bg-[#0f1712]">
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
<div className="flex items-center justify-center gap-6 mb-16">
|
||||
<span className="block w-14 h-px bg-[#d4af37]"></span>
|
||||
<span className="text-[#d4af37] uppercase tracking-[0.2em] text-sm font-medium">Seasonal Invitations</span>
|
||||
<span className="block w-14 h-px bg-[#d4af37]"></span>
|
||||
</div>
|
||||
<h2 className="text-4xl md:text-5xl font-light text-center mb-12 text-[#e7eeea]">
|
||||
Exclusive <span className="italic text-[#d4af37]">Offers</span> Await
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
{items.map((item) => {
|
||||
const d = item.data as { title?: string; description?: string; price?: number; image?: string }
|
||||
return (
|
||||
<Card key={item.id} className="bg-[#15271c] border border-[#304036] overflow-hidden">
|
||||
<div className="relative h-56 overflow-hidden">
|
||||
<Image src={d.image || ''} alt={d.title || ''} fill sizes="(max-width: 768px) 100vw, 33vw" className="object-cover hover:scale-105 transition-transform duration-500 ease-out" />
|
||||
</div>
|
||||
<CardContent className="p-6">
|
||||
<h3 className="text-xl font-semibold text-[#e7eeea] mb-2">{d.title}</h3>
|
||||
<p className="text-[#a0b4a7] text-sm leading-relaxed">{d.description}</p>
|
||||
</CardContent>
|
||||
<CardFooter className="px-6 pb-6 pt-0 flex items-center justify-between">
|
||||
{d.price && (
|
||||
<span className="text-[#d4af37] text-lg font-bold">R{typeof d.price === 'number' ? Number(d.price || 0).toFixed(2) : d.price}</span>
|
||||
)}
|
||||
<Button variant="secondary" size="sm" className="bg-[#16a34a] text-white hover:bg-[#12913f] border-0">
|
||||
Book Now
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user