Deploy
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
'use client'
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import Button from '@/components/ui/Button'
|
||||
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card'
|
||||
|
||||
export default function SpecialOffersSection() {
|
||||
const { items, loading } = useEmDashContent('promotions')
|
||||
|
||||
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="special-offers" data-vula-section="specialoffers" data-vula-cms="promotions" 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">Seasonal Offers</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]">Exclusive</span> Packages
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{items.slice(0, 6).map((item) => {
|
||||
const d = item.data as { title?: string; description?: string; price?: string; image?: string }
|
||||
return (
|
||||
<Card key={item.id} className="bg-[#1c1612] border border-[#403630]/50 rounded-lg overflow-hidden group">
|
||||
<div className="relative h-52 overflow-hidden">
|
||||
{d.image ? (
|
||||
<Image
|
||||
src={d.image}
|
||||
alt={d.title ?? 'Promotion'}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||
className="object-cover transition-transform duration-500 group-hover:scale-105"
|
||||
/>
|
||||
) : (
|
||||
<div className="h-full w-full bg-[#2a1f1a]" />
|
||||
)}
|
||||
</div>
|
||||
<CardHeader>
|
||||
<CardTitle className="text-[#eeeae7] text-lg font-sans tracking-wide">{d.title}</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="text-[#c0b8ae] text-sm leading-relaxed line-clamp-3">{d.description}</p>
|
||||
{d.price && <p className="text-[#d4af37] font-semibold mt-4 text-base">KSh {d.price} / night</p>}
|
||||
</CardContent>
|
||||
<CardFooter className="pt-0">
|
||||
<Link href="/booking">
|
||||
<Button variant="default" size="sm" className="bg-[#8b5a3c] hover:bg-[#7a4c31] text-[#eeeae7] border-none">Book Now</Button>
|
||||
</Link>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user