Deploy
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
'use client'
|
||||
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card'
|
||||
import Button from '@/components/ui/Button'
|
||||
|
||||
export default function SeasonalSpecialsSection() {
|
||||
const { items, loading } = useEmDashContent('campaigns')
|
||||
|
||||
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="seasonalspecials"
|
||||
data-vula-cms="campaigns"
|
||||
className="py-20 bg-[#f7f9f4]"
|
||||
>
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
<h2 className="font-heading text-4xl md:text-5xl text-[#1b210d] mb-4 leading-tight">
|
||||
Baked before sunrise, gone by noon.
|
||||
</h2>
|
||||
<p className="font-serif italic text-lg text-[#8b5a3c] max-w-2xl mb-12">
|
||||
Limited-time packages crafted for unhurried escapes.
|
||||
</p>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
{items.map((item) => {
|
||||
const d = item.data as {
|
||||
title?: string
|
||||
headline?: string
|
||||
body?: string
|
||||
cta_text?: string
|
||||
image?: string
|
||||
}
|
||||
return (
|
||||
<Card
|
||||
key={item.id}
|
||||
className="overflow-hidden rounded-2xl shadow-soft border-0 bg-[#f5f5dc] transition-all duration-200 ease-out hover:-translate-y-1 hover:shadow-lg"
|
||||
>
|
||||
<div className="relative h-48 w-full overflow-hidden">
|
||||
<Image
|
||||
src={d.image || '/placeholder.jpg'}
|
||||
alt={d.title || 'Special offer'}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, 33vw"
|
||||
className="object-cover hover:scale-105 transition-transform duration-500 ease-out"
|
||||
/>
|
||||
</div>
|
||||
<CardHeader>
|
||||
{d.headline && (
|
||||
<p className="text-[#8b5a3c] text-sm font-medium uppercase tracking-wide mb-1">
|
||||
{d.headline}
|
||||
</p>
|
||||
)}
|
||||
<CardTitle className="text-2xl text-[#1b210d] font-heading">
|
||||
{d.title || 'Untitled'}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="font-serif italic text-[#1b210d]/80 leading-relaxed">
|
||||
{d.body || ''}
|
||||
</p>
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
<Button variant="ghost" className="text-[#6b8e23] hover:text-[#4a6317] transition-colors duration-200">
|
||||
{d.cta_text || 'Enquire'} →
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user