Deploy
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
'use client'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import Link from 'next/link'
|
||||||
|
import { ArrowRight } from 'lucide-react'
|
||||||
|
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||||
|
|
||||||
|
export default function DropBannerHypeSection() {
|
||||||
|
const { items, loading } = useVulaContent('advert_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="drop-banner-hype" data-vula-section="dropbannerhype" data-vula-cms="advert_banners" className="bg-[#ea580c] text-[#18181b]">
|
||||||
|
<div className="mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:py-16">
|
||||||
|
{items.map((item) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; price?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="grid overflow-hidden border-2 border-[#18181b] bg-[#18181b] shadow-[8px_8px_0_0_#fbbf24] lg:grid-cols-[1fr_auto]">
|
||||||
|
<div className="p-6 text-white lg:p-10">
|
||||||
|
<p className="text-sm font-black uppercase tracking-[0.3em] text-[#fbbf24]">Exclusive drop</p>
|
||||||
|
{d.title ? <h2 className="mt-3 text-4xl font-black uppercase leading-none sm:text-5xl">{d.title}</h2> : null}
|
||||||
|
{d.description ? <p className="mt-4 max-w-xl text-white/80">{d.description}</p> : null}
|
||||||
|
<div className="mt-6 flex flex-wrap items-center gap-4">
|
||||||
|
{d.price ? <span className="border-2 border-[#fbbf24] bg-[#fbbf24] px-4 py-2 text-lg font-black text-[#18181b]">{d.price}</span> : null}
|
||||||
|
<Link href="/products" className="inline-flex items-center gap-2 border-2 border-[#fbbf24] px-6 py-3 text-sm font-black uppercase text-[#fbbf24] transition-all duration-200 ease-out hover:bg-[#fbbf24] hover:text-[#18181b]">Shop the drop <ArrowRight className="h-4 w-4" /></Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="relative min-h-[220px] w-full border-t-2 border-[#fbbf24] lg:min-h-[260px] lg:w-[380px] lg:border-l-2 lg:border-t-0">
|
||||||
|
{d.image ? <Image src={d.image} alt={d.title || 'Kasi Drip drop'} fill sizes="(max-width: 1024px) 100vw, 380px" className="object-cover" unoptimized /> : <div className="h-full w-full bg-[#fbbf24]" />}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user