x
This commit is contained in:
1 parent
7f627f7c32
commit
09058485e0
5 files changed
+197
-199
No files matched your search
@@ -38,35 +38,37 @@ export default function HomePage() {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<div className="min-h-screen bg-pop-bg">
|
||||
<Navbar categories={categories} />
|
||||
|
||||
{/* Hero Section */}
|
||||
<section className="relative w-full min-h-[90vh] md:min-h-0 md:aspect-video flex items-center justify-center overflow-hidden bg-night-950">
|
||||
<div className="absolute inset-0 z-0">
|
||||
<section className="relative w-full min-h-[90vh] md:min-h-0 md:aspect-video flex items-center justify-center overflow-hidden bg-pop-yellow border-b-8 border-pop-black">
|
||||
<div className="absolute inset-0 z-0 opacity-20">
|
||||
<img
|
||||
src={hero?.imageUrl || "/images/hero.png"}
|
||||
className="w-full h-full object-cover scale-[1.02] brightness-50"
|
||||
className="w-full h-full object-cover scale-[1.02] filter contrast-150 saturate-200"
|
||||
alt="Hero Background"
|
||||
onError={(e) => {
|
||||
(e.target as HTMLImageElement).style.display = 'none'
|
||||
}}
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-night-900 via-transparent to-night-900/50" />
|
||||
</div>
|
||||
|
||||
<div className="relative z-10 text-center space-y-6 px-4 animate-fade-in">
|
||||
<p className="text-cyan-glow uppercase tracking-[0.4em] text-sm font-semibold opacity-80">
|
||||
{hero?.tagline || "A New Paradigm of Calm"}
|
||||
<div className="absolute top-10 left-10 w-32 h-32 bg-pop-pink rounded-full border-4 border-pop-black shadow-brutal animate-bounce z-0"></div>
|
||||
<div className="absolute bottom-20 right-10 w-24 h-24 bg-pop-cyan border-4 border-pop-black shadow-brutal animate-spin-slow z-0"></div>
|
||||
|
||||
<div className="relative z-10 text-center space-y-6 px-4 animate-pop-in brutal-box p-12 bg-white max-w-4xl mx-auto rotate-[-2deg]">
|
||||
<p className="bg-pop-pink text-pop-black inline-block px-4 py-2 font-black uppercase tracking-[0.2em] text-sm border-2 border-pop-black shadow-brutal">
|
||||
{hero?.tagline || "Vibrant Memphis Pop-Art"}
|
||||
</p>
|
||||
<h1 className="text-6xl md:text-8xl font-bold max-w-4xl text-glow leading-[1.1]">
|
||||
<h1 className="text-6xl md:text-8xl font-black text-pop-black leading-[1.1] uppercase tracking-tighter">
|
||||
{hero ? (
|
||||
hero.title.split('[').map((part, i) => {
|
||||
if (part.includes(']')) {
|
||||
const [accent, rest] = part.split(']')
|
||||
return (
|
||||
<span key={i}>
|
||||
<span className="text-transparent bg-clip-text bg-gradient-to-r from-white via-silver-metallic to-white/50 italic font-serif">
|
||||
<span className="text-pop-cyan bg-pop-black px-2 shadow-[4px_4px_0_0_#FF69B4] inline-block -rotate-3 mx-2">
|
||||
{accent}
|
||||
</span>
|
||||
{rest}
|
||||
@@ -78,83 +80,74 @@ export default function HomePage() {
|
||||
) : (
|
||||
<>
|
||||
Inhale{' '}
|
||||
<span className="text-transparent bg-clip-text bg-gradient-to-r from-white via-silver-metallic to-white/50 italic font-serif">
|
||||
<span className="text-pop-cyan bg-pop-black px-2 shadow-[4px_4px_0_0_#FF69B4] inline-block -rotate-3 mx-2">
|
||||
Serenity
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</h1>
|
||||
<p className="text-slate-400 max-w-xl mx-auto text-lg md:text-xl font-light">
|
||||
<p className="text-pop-black max-w-xl mx-auto text-lg md:text-xl font-bold bg-pop-yellow p-4 border-4 border-pop-black shadow-brutal rotate-[1deg]">
|
||||
{hero?.description || "Crafting premium sensory experiences that transform your space into a sanctuary of peace."}
|
||||
</p>
|
||||
<div className="pt-8 flex flex-col sm:flex-row gap-4 justify-center">
|
||||
<div className="pt-8 flex flex-col sm:flex-row gap-6 justify-center">
|
||||
<Link
|
||||
to={hero?.buttonLink || "/shop"}
|
||||
className="px-10 py-4 bg-white text-night-900 font-bold rounded-sm tracking-widest uppercase hover:bg-cyan-glow hover:shadow-[0_0_30px_rgba(102,252,241,0.5)] transition-all duration-500"
|
||||
className="brutal-button"
|
||||
>
|
||||
{hero?.buttonText || "Explore Collection"}
|
||||
</Link>
|
||||
<a
|
||||
href="#categories"
|
||||
className="px-10 py-4 glass text-white font-bold rounded-sm tracking-widest uppercase hover:bg-white/10 transition-all duration-300"
|
||||
className="brutal-button-alt"
|
||||
>
|
||||
Learn More
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="absolute bottom-10 left-1/2 -translate-x-1/2 animate-bounce opacity-40">
|
||||
<div className="w-px h-16 bg-gradient-to-b from-white/0 via-white to-white/0" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Categories Showcase */}
|
||||
<section id="categories" className="bg-night-900 py-24 px-6">
|
||||
<div className="max-w-7xl mx-auto space-y-12">
|
||||
<div className="text-center space-y-2">
|
||||
<p className="text-cyan-glow uppercase tracking-[0.3em] text-xs font-semibold opacity-70">
|
||||
Our Range
|
||||
</p>
|
||||
<h2 className="text-4xl font-bold tracking-tight uppercase">The Categories</h2>
|
||||
<div className="w-12 h-px bg-cyan-glow mx-auto mt-3" />
|
||||
<section id="categories" className="py-24 px-6 border-b-8 border-pop-black bg-pop-cyan relative overflow-hidden">
|
||||
<div className="absolute top-0 right-0 w-64 h-64 bg-pop-pink rounded-full border-8 border-pop-black shadow-brutal -translate-y-1/2 translate-x-1/2"></div>
|
||||
<div className="max-w-7xl mx-auto space-y-12 relative z-10">
|
||||
<div className="text-center space-y-4">
|
||||
<h2 className="text-5xl md:text-7xl font-black tracking-tight uppercase inline-block bg-white px-6 py-2 border-4 border-pop-black shadow-brutal -rotate-2">
|
||||
The Categories
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
{loading ? (
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-4">
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-6">
|
||||
{Array.from({ length: 5 }).map((_, i) => (
|
||||
<div key={i} className="h-56 rounded-xl bg-white/5 animate-pulse" />
|
||||
<div key={i} className="h-64 brutal-box bg-white/5 animate-pulse" />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-4">
|
||||
{categories.map((cat) => (
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-6">
|
||||
{categories.map((cat, idx) => (
|
||||
<Link
|
||||
key={cat.id}
|
||||
to={`/category/${cat.id}`}
|
||||
className="relative h-56 rounded-xl overflow-hidden group border-2 border-white/5 hover:border-cyan-glow/50 hover:shadow-[0_0_20px_rgba(102,252,241,0.15)] transition-all duration-500"
|
||||
className={`relative h-64 brutal-box group bg-pop-pink overflow-hidden ${idx % 2 === 0 ? 'rotate-1' : '-rotate-1'} hover:rotate-0`}
|
||||
>
|
||||
<div className="absolute inset-0 bg-pop-black/20 group-hover:bg-transparent transition-colors z-10" />
|
||||
<img
|
||||
src={getCategoryImage(cat.name)}
|
||||
className="absolute inset-0 w-full h-full object-cover grayscale opacity-40 group-hover:grayscale-0 group-hover:scale-110 group-hover:opacity-70 transition-all duration-700"
|
||||
className="absolute inset-0 w-full h-full object-cover mix-blend-multiply opacity-80 group-hover:scale-110 transition-transform duration-500"
|
||||
alt={cat.name}
|
||||
onError={(e) => { (e.target as HTMLImageElement).style.display = 'none' }}
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-night-900/90 via-night-900/20 to-transparent" />
|
||||
<div className="absolute bottom-0 left-0 right-0 p-4">
|
||||
<span className="text-white font-bold tracking-wider uppercase text-xs block">
|
||||
<div className="absolute inset-0 border-8 border-pop-black z-20 pointer-events-none" />
|
||||
<div className="absolute bottom-4 left-4 right-4 z-30">
|
||||
<span className="bg-white text-pop-black font-black uppercase text-lg px-3 py-1 border-2 border-pop-black shadow-[2px_2px_0_0_#111] inline-block group-hover:-translate-y-1 transition-transform">
|
||||
{cat.name}
|
||||
</span>
|
||||
{cat._count && (
|
||||
<span className="text-cyan-glow/60 text-[10px] tracking-wider">
|
||||
<span className="block mt-2 bg-pop-yellow text-pop-black text-xs font-bold px-2 py-1 border-2 border-pop-black w-max shadow-[2px_2px_0_0_#111]">
|
||||
{cat._count.products} products
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="absolute top-3 right-3 opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
||||
<svg className="w-5 h-5 text-cyan-glow" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 8l4 4m0 0l-4 4m4-4H3" />
|
||||
</svg>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
@@ -163,33 +156,32 @@ export default function HomePage() {
|
||||
</section>
|
||||
|
||||
{/* Featured Products */}
|
||||
<section className="bg-night-900 py-24 px-6 border-t border-white/5">
|
||||
<div className="max-w-7xl mx-auto space-y-12">
|
||||
<div className="flex justify-between items-end">
|
||||
<div className="space-y-2">
|
||||
<p className="text-cyan-glow uppercase tracking-[0.3em] text-xs font-semibold opacity-70">
|
||||
Top Picks
|
||||
</p>
|
||||
<h2 className="text-4xl font-bold">Featured Products</h2>
|
||||
</div>
|
||||
<section className="bg-pop-pink py-24 px-6 relative">
|
||||
<div className="max-w-7xl mx-auto space-y-12 relative z-10">
|
||||
<div className="flex flex-col md:flex-row justify-between items-center gap-6">
|
||||
<h2 className="text-5xl md:text-7xl font-black uppercase bg-white px-6 py-2 border-4 border-pop-black shadow-brutal rotate-1">
|
||||
Featured Picks
|
||||
</h2>
|
||||
<Link
|
||||
to="/shop"
|
||||
className="text-cyan-glow text-sm font-bold uppercase tracking-widest hover:underline decoration-cyan-glow/30"
|
||||
className="brutal-button bg-white hover:bg-pop-yellow"
|
||||
>
|
||||
View All →
|
||||
View All
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{loading ? (
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-10">
|
||||
{Array.from({ length: 3 }).map((_, i) => (
|
||||
<div key={i} className="rounded-2xl bg-white/5 animate-pulse h-96" />
|
||||
<div key={i} className="brutal-box bg-white/5 animate-pulse h-96" />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
{featuredProducts.map((p) => (
|
||||
<ProductCard key={p.id} product={p} />
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-10">
|
||||
{featuredProducts.map((p, idx) => (
|
||||
<div key={p.id} className={`${idx % 2 === 0 ? '-rotate-2' : 'rotate-2'} hover:rotate-0 transition-transform`}>
|
||||
<ProductCard product={p} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user