Deploy
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import Button from '@/components/ui/Button'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
export default function HeroBannersSection() {
|
||||||
|
const { items, loading } = useEmDashContent('hero_banners')
|
||||||
|
|
||||||
|
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="herobanners" data-vula-section="herobanners" data-vula-cms="hero_banners" className="bg-[#0a0a0a] py-20 lg:py-28 relative overflow-hidden">
|
||||||
|
<div className="max-w-7xl mx-auto px-4">
|
||||||
|
<div className="space-y-16">
|
||||||
|
{items.map((item) => {
|
||||||
|
const d = item.data as { title?: string; subtitle?: string; cta_text?: string; cta_url?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="relative">
|
||||||
|
{d.image && (
|
||||||
|
<div className="absolute inset-0 -z-10">
|
||||||
|
<img src={d.image} alt={d.title || 'Banner'} className="w-full h-full object-cover opacity-20" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="max-w-2xl">
|
||||||
|
{d.title && (
|
||||||
|
<h2 className="text-6xl lg:text-8xl font-black tracking-tighter leading-none text-white mb-6">
|
||||||
|
{d.title}
|
||||||
|
</h2>
|
||||||
|
)}
|
||||||
|
{d.subtitle && (
|
||||||
|
<p className="text-xl lg:text-2xl text-neutral-300 mb-8 font-medium">{d.subtitle}</p>
|
||||||
|
)}
|
||||||
|
{d.cta_text && d.cta_url && (
|
||||||
|
<Link href={d.cta_url}>
|
||||||
|
<Button variant="default" size="lg" className="bg-[#d4af37] text-black hover:bg-[#c5a030] border-0">
|
||||||
|
{d.cta_text} →
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user