diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index f41cec03..c787003e 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,3 +1,557 @@ +// import { Link } from "react-router-dom"; +// import { +// Code2, Github, Mail, Heart, Linkedin, MessageCircle, +// Send, Zap, Shield, Cloud, Database, +// Calendar, CpuIcon, RadioTower, MessageSquare, +// Users2, Server, CheckCircle, X, Sparkles, Rocket, +// ChevronUp, Home, +// Users as UsersIcon, Plus, User, GitMerge, +// Sun, Moon +// } from "lucide-react"; +// import { useState, useEffect } from "react"; + +// export default function Footer() { +// const year = new Date().getFullYear(); +// const [email, setEmail] = useState(""); +// const [isSubmitting, setIsSubmitting] = useState(false); +// const [subscriptionSuccess, setSubscriptionSuccess] = useState(false); +// const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); +// const [showScrollTop, setShowScrollTop] = useState(false); +// const [theme, setTheme] = useState<'light' | 'dark'>('dark'); + +// useEffect(() => { +// // Check for saved theme preference or system preference +// const savedTheme = localStorage.getItem('theme') as 'light' | 'dark' | null; +// const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; + +// let initialTheme = 'dark'; +// if (savedTheme) { +// initialTheme = savedTheme; +// } else if (!systemPrefersDark) { +// initialTheme = 'light'; +// } + +// setTheme(initialTheme as 'light' | 'dark'); +// // Set initial class on HTML element +// document.documentElement.classList.remove('light', 'dark'); +// document.documentElement.classList.add(initialTheme); + +// const handleMouseMove = (e: MouseEvent) => { +// setMousePosition({ x: e.clientX, y: e.clientY }); +// }; + +// const handleScroll = () => { +// setShowScrollTop(window.scrollY > 400); +// }; + +// window.addEventListener('mousemove', handleMouseMove); +// window.addEventListener('scroll', handleScroll); + +// return () => { +// window.removeEventListener('mousemove', handleMouseMove); +// window.removeEventListener('scroll', handleScroll); +// }; +// }, []); + +// const handleSubscribe = async (e: React.FormEvent) => { +// e.preventDefault(); +// if (!email) return; + +// setIsSubmitting(true); +// await new Promise(resolve => setTimeout(resolve, 1000)); +// setIsSubmitting(false); +// setSubscriptionSuccess(true); +// setEmail(""); +// setTimeout(() => setSubscriptionSuccess(false), 3000); +// }; + +// const scrollToTop = () => { +// window.scrollTo({ top: 0, behavior: 'smooth' }); +// }; + +// const toggleTheme = () => { +// const newTheme = theme === 'dark' ? 'light' : 'dark'; +// setTheme(newTheme); +// localStorage.setItem('theme', newTheme); + +// // Remove both classes and add the new one +// document.documentElement.classList.remove('light', 'dark'); +// document.documentElement.classList.add(newTheme); + +// // Force re-render of all components by triggering a state change +// // This ensures the theme updates immediately +// const event = new CustomEvent('themeChanged', { detail: newTheme }); +// window.dispatchEvent(event); +// }; + +// // Listen for theme changes from other components +// useEffect(() => { +// const handleThemeChange = (e: CustomEvent) => { +// const newTheme = e.detail; +// setTheme(newTheme); +// }; + +// window.addEventListener('themeChanged', handleThemeChange as EventListener); + +// return () => { +// window.removeEventListener('themeChanged', handleThemeChange as EventListener); +// }; +// }, []); + +// const parallaxX = (mousePosition.x / window.innerWidth - 0.5) * 20; +// const parallaxY = (mousePosition.y / window.innerHeight - 0.5) * 20; + +// // Theme based classes +// const isDark = theme === 'dark'; + +// const footerClasses = isDark +// ? "relative bg-gradient-to-b from-gray-900 via-gray-900 to-black border-t border-cyan-900/30 text-gray-300 overflow-hidden pt-12" +// : "relative bg-gradient-to-b from-white via-gray-50 to-gray-100 border-t border-blue-200 text-gray-700 overflow-hidden pt-12"; + +// const scrollTopButtonClasses = isDark +// ? "fixed right-6 bottom-6 z-50 p-3 bg-gradient-to-br from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 text-white rounded-full shadow-lg hover:shadow-cyan-500/25 transition-all duration-300 hover:scale-110 active:scale-95 group" +// : "fixed right-6 bottom-6 z-50 p-3 bg-gradient-to-br from-blue-500 to-indigo-600 hover:from-blue-600 hover:to-indigo-700 text-white rounded-full shadow-lg hover:shadow-blue-500/25 transition-all duration-300 hover:scale-110 active:scale-95 group"; + +// const statsBarClasses = isDark +// ? "relative z-10 py-4 border-b border-cyan-900/50 bg-gray-900/30 backdrop-blur-sm" +// : "relative z-10 py-4 border-b border-blue-100 bg-white/50 backdrop-blur-sm"; + +// const cardClasses = isDark +// ? "bg-gray-800/30 border-gray-700 hover:border-cyan-500/50 hover:bg-gray-800/50 hover:shadow-cyan-500/10" +// : "bg-gray-100/50 border-gray-300 hover:border-blue-400/50 hover:bg-gray-200/50 hover:shadow-blue-500/10"; + +// const textGradient = isDark +// ? "bg-gradient-to-r from-cyan-300 via-blue-300 to-purple-300" +// : "bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600"; + +// const iconColor = isDark ? "text-cyan-400" : "text-blue-600"; +// const iconColor300 = isDark ? "text-cyan-300" : "text-blue-500"; +// const textColor = isDark ? "text-gray-400" : "text-gray-600"; +// const textColorLight = isDark ? "text-gray-300" : "text-gray-700"; +// const borderColor = isDark ? "border-gray-800" : "border-gray-200"; +// const inputBg = isDark ? "bg-gray-800/50 border-gray-700" : "bg-white/80 border-gray-300"; + +// return ( +// <> +// + +// {/* Separate style tag for animations */} +// +// > +// ); +// } import { Link } from "react-router-dom"; import { Code2, Github, Mail, Heart, Linkedin, MessageCircle, @@ -105,17 +659,13 @@ export default function Footer() { const isDark = theme === 'dark'; const footerClasses = isDark - ? "relative bg-gradient-to-b from-gray-900 via-gray-900 to-black border-t border-cyan-900/30 text-gray-300 overflow-hidden pt-12" - : "relative bg-gradient-to-b from-white via-gray-50 to-gray-100 border-t border-blue-200 text-gray-700 overflow-hidden pt-12"; + ? "relative bg-gradient-to-b from-gray-900 via-gray-900 to-black border-t border-cyan-900/30 text-gray-300 overflow-hidden" + : "relative bg-gradient-to-b from-white via-gray-50 to-gray-100 border-t border-blue-200 text-gray-700 overflow-hidden"; const scrollTopButtonClasses = isDark ? "fixed right-6 bottom-6 z-50 p-3 bg-gradient-to-br from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 text-white rounded-full shadow-lg hover:shadow-cyan-500/25 transition-all duration-300 hover:scale-110 active:scale-95 group" : "fixed right-6 bottom-6 z-50 p-3 bg-gradient-to-br from-blue-500 to-indigo-600 hover:from-blue-600 hover:to-indigo-700 text-white rounded-full shadow-lg hover:shadow-blue-500/25 transition-all duration-300 hover:scale-110 active:scale-95 group"; - const statsBarClasses = isDark - ? "relative z-10 py-4 border-b border-cyan-900/50 bg-gray-900/30 backdrop-blur-sm" - : "relative z-10 py-4 border-b border-blue-100 bg-white/50 backdrop-blur-sm"; - const cardClasses = isDark ? "bg-gray-800/30 border-gray-700 hover:border-cyan-500/50 hover:bg-gray-800/50 hover:shadow-cyan-500/10" : "bg-gray-100/50 border-gray-300 hover:border-blue-400/50 hover:bg-gray-200/50 hover:shadow-blue-500/10"; @@ -163,97 +713,23 @@ export default function Footer() { )} - {/* Animated Background Effects */} -
Next Generation Dev Community
@@ -261,7 +737,7 @@ export default function Footer() {- Connect, collaborate, and build with developers worldwide. Join the fastest-growing developer ecosystem. + Connect, collaborate, and build with developers worldwide.
{/* Social Icons */} @@ -277,7 +753,7 @@ export default function Footer() { href={social.url} target="_blank" rel="noopener noreferrer" - className={`p-2.5 rounded-lg border ${social.color} transition-all duration-300 transform hover:scale-110 hover:-translate-y-1 ${ + className={`p-2 rounded-lg border ${social.color} transition-all duration-300 transform hover:scale-110 hover:-translate-y-1 ${ isDark ? 'bg-gray-800/50 border-gray-700 text-gray-400' : 'bg-gray-100 border-gray-300 text-gray-600' @@ -285,34 +761,31 @@ export default function Footer() { style={{ animationDelay: `${i * 0.1}s` }} aria-label={social.label} > -- Get exclusive access to new features, beta programs, and community insights. + Get the latest updates and features.
{/* Newsletter */} @@ -382,8 +817,8 @@ export default function Footer() { type="email" value={email} onChange={(e) => setEmail(e.target.value)} - placeholder="developer@example.com" - className={`relative w-full pl-10 pr-4 py-3 ${inputBg} rounded-xl ${isDark ? 'text-white' : 'text-gray-900'} placeholder-gray-500 focus:outline-none focus:ring-2 focus:border-transparent transition-all duration-300 focus:shadow-lg z-10 ${ + placeholder="your@email.com" + className={`relative w-full pl-10 pr-4 py-2 ${inputBg} rounded-xl ${isDark ? 'text-white' : 'text-gray-900'} placeholder-gray-500 focus:outline-none focus:ring-2 focus:border-transparent transition-all duration-300 focus:shadow-lg z-10 ${ isDark ? 'focus:ring-cyan-500/50 focus:shadow-cyan-500/20' : 'focus:ring-blue-500/50 focus:shadow-blue-500/20' @@ -395,7 +830,7 @@ export default function Footer() { - -- No spam, unsubscribe anytime -
- - {/* Live Activity */} -