Deploy
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
'use client'
|
||||
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
|
||||
export default function SeasonalSanctuaryOffersSection() {
|
||||
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-[#C0392B] border-t-transparent animate-spin" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section
|
||||
id="sanctuary-offers"
|
||||
data-vula-section="seasonalsanctuaryoffers"
|
||||
data-vula-cms="promotions"
|
||||
className="py-20 bg-[#FDF6EC]"
|
||||
>
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
<div className="text-center mb-12">
|
||||
<span className="text-[#E67E22] text-sm font-semibold tracking-widest uppercase">
|
||||
Seasonal Highlights
|
||||
</span>
|
||||
<h2 className="text-4xl font-bold text-[#2C1810] mt-2">
|
||||
Sanctuary Offers
|
||||
</h2>
|
||||
<p className="text-[#2C1810]/70 max-w-2xl mx-auto mt-4">
|
||||
Exclusive packages for the perfect escape
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<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
|
||||
}
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="rounded-xl overflow-hidden bg-white shadow-lg hover:shadow-xl transition-shadow duration-200"
|
||||
>
|
||||
{d.image && (
|
||||
<div className="relative h-48 w-full">
|
||||
<Image
|
||||
src={d.image}
|
||||
alt={d.title ?? 'Offer image'}
|
||||
fill
|
||||
className="object-cover"
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className="p-5">
|
||||
<h3 className="text-xl font-semibold text-[#2C1810]">
|
||||
{d.title}
|
||||
</h3>
|
||||
<p className="text-[#2C1810]/70 mt-2 text-sm leading-relaxed">
|
||||
{d.description}
|
||||
</p>
|
||||
<div className="mt-4 flex items-center justify-between">
|
||||
<span className="text-[#E67E22] font-bold text-lg">
|
||||
{d.price}
|
||||
</span>
|
||||
<Link
|
||||
href="/booking"
|
||||
className="inline-flex items-center px-4 py-2 bg-[#F1C40F] text-black rounded-full text-sm font-semibold hover:bg-[#e6b800] transition-colors"
|
||||
>
|
||||
Book Now
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user