Seed: music template (13 files)
This commit is contained in:
@@ -0,0 +1,198 @@
|
||||
import { useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Headphones, MapPin, Calendar, Clock, Play, ArrowRight, Send, Disc3, Music } from "lucide-react";
|
||||
import { useSaasMutation } from "@/hooks/use-tygarun";
|
||||
import Header from "@/components/Header";
|
||||
import Footer from "@/components/Footer";
|
||||
|
||||
const discography = [
|
||||
{ title: "Chromatic Abyss", year: "2026", gradient: "from-purple-600 to-fuchsia-500" },
|
||||
{ title: "Midnight Circuits", year: "2024", gradient: "from-fuchsia-500 to-pink-500" },
|
||||
{ title: "Phantom Frequencies", year: "2022", gradient: "from-violet-600 to-purple-500" },
|
||||
{ title: "Genesis Protocol", year: "2020", gradient: "from-indigo-600 to-violet-500" },
|
||||
];
|
||||
|
||||
const tourDates = [
|
||||
{ date: "Apr 28, 2026", city: "Los Angeles, CA", venue: "The Wiltern", soldOut: false },
|
||||
{ date: "May 3, 2026", city: "New York, NY", venue: "Brooklyn Steel", soldOut: true },
|
||||
{ date: "May 10, 2026", city: "Chicago, IL", venue: "Metro Chicago", soldOut: false },
|
||||
{ date: "May 17, 2026", city: "Austin, TX", venue: "Emos Austin", soldOut: false },
|
||||
];
|
||||
|
||||
const featuredTracks = [
|
||||
{ num: "01", title: "Neon Requiem", duration: "4:12" },
|
||||
{ num: "02", title: "Violet Horizon", duration: "3:48" },
|
||||
{ num: "03", title: "Pulse Decay", duration: "5:01" },
|
||||
{ num: "04", title: "Afterglow", duration: "3:33" },
|
||||
];
|
||||
|
||||
export default function IndexPage() {
|
||||
const { mutate: buyTicket } = useSaasMutation("event-ticketing", "/checkout");
|
||||
const { mutate: subscribe } = useSaasMutation("email", "/send/newsletter-confirm");
|
||||
const [joining, setJoining] = useState(false);
|
||||
|
||||
const handleTickets = async (show: { venue: string; city: string }) => {
|
||||
try {
|
||||
const res = await buyTicket({ plan: show.venue, city: show.city });
|
||||
if (res?.url && res.url !== "#") { window.location.href = res.url; return; }
|
||||
toast.success(`Tickets reserved for \${show.venue}`);
|
||||
} catch {
|
||||
toast.error("Could not start checkout. Please try again.");
|
||||
}
|
||||
};
|
||||
|
||||
const handleJoin = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
const form = e.currentTarget as HTMLFormElement;
|
||||
const email = (new FormData(form).get("email") as string) || "";
|
||||
setJoining(true);
|
||||
try {
|
||||
await subscribe({ email });
|
||||
toast.success("Welcome to the fan club!");
|
||||
form.reset();
|
||||
} catch {
|
||||
toast.error("Could not subscribe. Please try again.");
|
||||
} finally {
|
||||
setJoining(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-950 text-white">
|
||||
<Header />
|
||||
|
||||
{/* Hero */}
|
||||
<section className="relative min-h-screen flex items-center justify-center overflow-hidden">
|
||||
<div className="absolute inset-0">
|
||||
<div className="absolute top-1/4 left-1/4 w-96 h-96 bg-purple-600/30 rounded-full blur-[128px] animate-pulse" />
|
||||
<div className="absolute bottom-1/4 right-1/4 w-96 h-96 bg-fuchsia-500/20 rounded-full blur-[128px] animate-pulse delay-1000" />
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-violet-600/10 rounded-full blur-[200px]" />
|
||||
</div>
|
||||
<div className="relative z-10 text-center px-6">
|
||||
<Badge className="mb-6 bg-purple-500/20 text-purple-300 border-purple-500/30 hover:bg-purple-500/30">Electronic / Synthwave</Badge>
|
||||
<h1 className="text-7xl md:text-8xl lg:text-9xl font-black tracking-tighter mb-6 bg-gradient-to-r from-white via-purple-200 to-fuchsia-200 bg-clip-text text-transparent">Nova Eclipse</h1>
|
||||
<p className="text-xl text-slate-400 max-w-xl mx-auto mb-10">Where neon dreams meet sonic landscapes. New album out now.</p>
|
||||
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
||||
<Button size="lg" className="bg-gradient-to-r from-purple-600 to-fuchsia-500 hover:from-purple-500 hover:to-fuchsia-400 active:scale-[0.98] text-white shadow-lg shadow-purple-500/25 text-lg px-8">
|
||||
<Headphones className="h-5 w-5 mr-2" />Listen Now
|
||||
</Button>
|
||||
<Button asChild size="lg" variant="outline" className="border-purple-500/30 text-purple-300 hover:bg-purple-500/10 active:scale-[0.98] text-lg px-8">
|
||||
<Link to="/tour"><Calendar className="h-5 w-5 mr-2" />Tour Dates</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Latest Release */}
|
||||
<section className="py-24 px-6">
|
||||
<div className="mx-auto max-w-5xl">
|
||||
<h2 className="text-4xl font-black tracking-tight text-center mb-4 animate-fade-up">Latest Release</h2>
|
||||
<p className="text-slate-400 text-center mb-12">The new album everyone is talking about.</p>
|
||||
<div className="grid md:grid-cols-2 gap-8 items-center">
|
||||
<div className="aspect-square rounded-2xl bg-gradient-to-br from-purple-600 via-fuchsia-500 to-pink-500 flex items-center justify-center shadow-2xl shadow-purple-500/20">
|
||||
<Disc3 className="h-32 w-32 text-white/80 animate-[spin_8s_linear_infinite]" />
|
||||
</div>
|
||||
<div>
|
||||
<Badge className="mb-3 bg-fuchsia-500/20 text-fuchsia-300 border-fuchsia-500/30">March 2026</Badge>
|
||||
<h3 className="text-3xl font-bold mb-2">Chromatic Abyss</h3>
|
||||
<p className="text-slate-400 mb-6">A 12-track journey through pulsing synths, haunting vocals, and cinematic soundscapes that blur the line between reality and reverie.</p>
|
||||
<div className="space-y-3 mb-8">
|
||||
{featuredTracks.map((t) => (
|
||||
<div key={t.num} className="flex items-center gap-4 p-3 rounded-lg bg-slate-900/50 border border-slate-800 hover:border-purple-500/30 transition-colors group cursor-pointer">
|
||||
<Play className="h-4 w-4 text-purple-400 opacity-0 group-hover:opacity-100 transition-opacity" />
|
||||
<span className="text-sm text-slate-500 font-mono">{t.num}</span>
|
||||
<span className="flex-1 text-sm font-medium">{t.title}</span>
|
||||
<span className="text-sm text-slate-500">{t.duration}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<Button className="bg-gradient-to-r from-purple-600 to-fuchsia-500 hover:from-purple-500 hover:to-fuchsia-400 active:scale-[0.98] text-white shadow-lg shadow-purple-500/25">
|
||||
<Play className="h-4 w-4 mr-2" />Stream Now
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Discography Preview */}
|
||||
<section className="py-24 px-6 bg-slate-900/30">
|
||||
<div className="mx-auto max-w-6xl">
|
||||
<div className="flex items-center justify-between mb-12">
|
||||
<h2 className="text-4xl font-black tracking-tight animate-fade-up">Discography</h2>
|
||||
<Button asChild variant="ghost" className="text-purple-400 hover:text-purple-300">
|
||||
<Link to="/music">View All <ArrowRight className="h-4 w-4 ml-2" /></Link>
|
||||
</Button>
|
||||
</div>
|
||||
<div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6 stagger">
|
||||
{discography.map((a, i) => (
|
||||
<Card key={i} className="backdrop-blur-sm bg-card/80 border-border/50 hover:border-purple-500/30 hover:-translate-y-1 hover:shadow-lg transition-all duration-300 overflow-hidden group">
|
||||
<div className={`aspect-square bg-gradient-to-br \${a.gradient} flex items-center justify-center`}>
|
||||
<Music className="h-16 w-16 text-white/60 group-hover:scale-110 transition-transform" />
|
||||
</div>
|
||||
<CardContent className="p-4">
|
||||
<h3 className="font-bold text-white mb-1">{a.title}</h3>
|
||||
<p className="text-sm text-slate-400 mb-3">{a.year}</p>
|
||||
<Button size="sm" variant="outline" className="w-full border-purple-500/30 text-purple-300 hover:bg-purple-500/10 active:scale-[0.98]">
|
||||
<Headphones className="h-3 w-3 mr-2" />Listen
|
||||
</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Tour Dates */}
|
||||
<section className="py-24 px-6">
|
||||
<div className="mx-auto max-w-4xl">
|
||||
<div className="flex items-center justify-between mb-12">
|
||||
<h2 className="text-4xl font-black tracking-tight animate-fade-up">On Tour</h2>
|
||||
<Button asChild variant="ghost" className="text-purple-400 hover:text-purple-300">
|
||||
<Link to="/tour">All Dates <ArrowRight className="h-4 w-4 ml-2" /></Link>
|
||||
</Button>
|
||||
</div>
|
||||
<div className="space-y-4 stagger">
|
||||
{tourDates.map((show, i) => (
|
||||
<Card key={i} className="backdrop-blur-sm bg-card/80 border-border/50 hover:border-purple-500/30 transition-all duration-300">
|
||||
<CardContent className="p-5 flex flex-col md:flex-row md:items-center gap-4">
|
||||
<div className="flex items-center gap-3 md:w-40 shrink-0">
|
||||
<Calendar className="h-4 w-4 text-purple-400" />
|
||||
<span className="text-sm font-medium text-purple-300">{show.date}</span>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="font-semibold text-white">{show.city}</div>
|
||||
<div className="text-sm text-slate-400 flex items-center gap-1"><MapPin className="h-3 w-3" />{show.venue}</div>
|
||||
</div>
|
||||
{show.soldOut ? (
|
||||
<Badge className="bg-red-500/20 text-red-300 border-red-500/30">Sold Out</Badge>
|
||||
) : (
|
||||
<Button size="sm" onClick={() => handleTickets(show)} className="bg-purple-600 hover:bg-purple-500 active:scale-[0.98] text-white">Get Tickets</Button>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Newsletter */}
|
||||
<section className="py-24 px-6 bg-gradient-to-b from-slate-950 via-purple-950/20 to-slate-950">
|
||||
<div className="mx-auto max-w-xl text-center">
|
||||
<h2 className="text-4xl font-black tracking-tight mb-4 animate-fade-up">Join the Fan Club</h2>
|
||||
<p className="text-slate-400 mb-8">Get first access to new releases, exclusive merch drops, and pre-sale tour tickets.</p>
|
||||
<form onSubmit={handleJoin} className="flex gap-2">
|
||||
<Input type="email" name="email" required placeholder="you@email.com" className="bg-slate-900 border-slate-700 text-white placeholder:text-slate-500 flex-1" />
|
||||
<Button type="submit" disabled={joining} className="bg-gradient-to-r from-purple-600 to-fuchsia-500 hover:from-purple-500 hover:to-fuchsia-400 active:scale-[0.98] text-white shadow-lg shadow-purple-500/25"><Send className="h-4 w-4 mr-2" />Join</Button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user