diff --git a/src/components/BrutalAlert.tsx b/src/components/BrutalAlert.tsx new file mode 100644 index 0000000..f018d33 --- /dev/null +++ b/src/components/BrutalAlert.tsx @@ -0,0 +1,50 @@ +import { AlertCircle, CheckCircle, X, Info } from 'lucide-react'; +import { useEffect } from 'react'; + +export type AlertType = 'success' | 'error' | 'warning' | 'info'; + +interface BrutalAlertProps { + message: string; + type?: AlertType; + onClose: () => void; + autoCloseMs?: number; +} + +export default function BrutalAlert({ message, type = 'info', onClose, autoCloseMs = 3000 }: BrutalAlertProps) { + const styles = { + success: 'bg-[#4ade80] text-black', + error: 'bg-[#ef4444] text-black', + warning: 'bg-[#ffd700] text-black', + info: 'bg-[#7cb9ff] text-black', + }; + + const icons = { + success: , + error: , + warning: , + info: , + }; + + useEffect(() => { + if (autoCloseMs > 0) { + const timer = setTimeout(() => { + onClose(); + }, autoCloseMs); + return () => clearTimeout(timer); + } + }, [autoCloseMs, onClose]); + + return ( +
+
+
+ {icons[type]} +
+

{message}

+ +
+
+ ); +} diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index e8856b5..3c9b66e 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -5,22 +5,21 @@ import { Search } from "lucide-react"; const SLIDES = [ { id: 1, - videoId: "Fpn1imb9qZg", // Konser + videoId: "Fpn1imb9qZg", }, { id: 2, - videoId: "qqvBnmUBP8g", // Lari + videoId: "qqvBnmUBP8g", }, { id: 3, - videoId: "DK3hsi6NBjw", // Seminar + videoId: "DK3hsi6NBjw", }, ]; export default function Hero() { const [currentSlide, setCurrentSlide] = useState(0); - // Auto-play useEffect(() => { const timer = setInterval(() => { setCurrentSlide((prev) => (prev + 1) % SLIDES.length); @@ -32,9 +31,7 @@ export default function Hero() {
- {/* Left Content */}
- {/* Small Label */}
@@ -86,7 +83,6 @@ export default function Hero() {
- {/* Bottom detail for polaroid vibe */}

@@ -97,7 +93,6 @@ export default function Hero() { ON AIR

- {/* Decorative squares from reference */}
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 5eaf0aa..3ca2b7b 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,40 +1,47 @@ import { Ticket } from "lucide-react"; -import { Link } from "react-router-dom"; +import { Link, useLocation } from "react-router-dom"; export default function Navbar() { + const location = useLocation(); + const isExplore = location.pathname.startsWith('/event'); + const isHome = location.pathname === '/'; + + const activeClass = "bg-[#7cb9ff] text-black font-black uppercase text-sm px-6 py-2 border-4 border-black brutal-shadow-sm hover:-translate-y-1 hover:shadow-[6px_6px_0_0_#000] transition-all"; + const inactiveClass = "text-black font-black uppercase text-sm hover:text-[#7cb9ff] transition-colors"; + return (