Deploy
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/Card'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import Button from '@/components/ui/Button'
|
||||||
|
|
||||||
|
export default function VineyardEscapeSpecialsSection() {
|
||||||
|
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-[#6b8e23] border-t-transparent animate-spin" /></div>
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="seasonal-specials" data-vula-section="vineyardescapespecials" data-vula-cms="campaigns" className="py-20 bg-[#f4f5f2]">
|
||||||
|
<div className="container mx-auto px-4 max-w-6xl">
|
||||||
|
<div className="text-center mb-12 max-w-[44ch] mx-auto">
|
||||||
|
<p className="text-[#36454F] uppercase tracking-widest text-sm font-medium mb-2">Seasonal escapes</p>
|
||||||
|
<h2 className="font-serif text-4xl md:text-5xl text-[#2c331f] leading-tight">
|
||||||
|
Harvest <span className="text-[#6b8e23]">specials</span> & romantic packages
|
||||||
|
</h2>
|
||||||
|
<p className="mt-4 text-[#36454F] text-lg leading-relaxed">
|
||||||
|
Curated for couples exploring the winelands — from cellar tours to sunset picnics.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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="rounded-[22px] shadow-2xl bg-white border-0 overflow-hidden">
|
||||||
|
{d.image && (
|
||||||
|
<div className="relative h-52 w-full overflow-hidden">
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title || d.headline || ''}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 768px) 100vw, 33vw"
|
||||||
|
className="object-cover hover:scale-105 transition-transform duration-500 ease-out"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<CardHeader className="pb-2">
|
||||||
|
<CardTitle className="font-serif text-2xl text-[#2c331f]">{d.title || d.headline}</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="text-[#36454F] text-sm leading-relaxed">
|
||||||
|
{d.body && <p>{d.body}</p>}
|
||||||
|
<div className="mt-3 flex gap-1 text-sm">
|
||||||
|
<span className="w-1.5 h-1.5 rounded-full bg-[#6b8e23] inline-block mt-1.5" />
|
||||||
|
<span className="text-[#36454F]">Available for a limited season</span>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
{d.cta_text && (
|
||||||
|
<CardFooter className="pt-0">
|
||||||
|
<Button variant="default" size="md" className="bg-[#6b8e23] hover:bg-[#5a7a1f] text-white px-6 py-2 rounded-full">
|
||||||
|
{d.cta_text}
|
||||||
|
</Button>
|
||||||
|
</CardFooter>
|
||||||
|
)}
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user