"use client" import { motion } from "framer-motion" // Animation variants for reusability const containerVariants = { hidden: { opacity: 0, y: 50 }, visible: { opacity: 1, y: 0, transition: { duration: 0.8, staggerChildren: 0.1, }, }, } const itemVariants = { hidden: { opacity: 0, x: -20 }, visible: { opacity: 1, x: 0, transition: { duration: 0.6 }, }, } const linkVariants = { hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0, transition: { duration: 0.4 }, }, } const socialVariants = { hidden: { opacity: 0, scale: 0 }, visible: { opacity: 1, scale: 1, transition: { type: "spring" as const, stiffness: 200, damping: 10, }, }, } const backgroundVariants = { hidden: { opacity: 0, scale: 0.8 }, visible: { opacity: 1, scale: 1, transition: { duration: 2, }, }, } // Footer data for better maintainability const footerData = { sections: [ { title: "About", links: ["Home", "Projects", "Our Mission", "Contact Us"] }, { title: "Education", links: ["News", "Learn", "Certification", "Publications"] }, { title: "Services", links: ["Web Design", "Development", "Consulting", "Support"] }, { title: "Resources", links: ["Blog", "Documentation", "Community", "Help Center"] }, ], social: [ { href: "#", label: "Twitter", icon: "T" }, { href: "#", label: "GitHub", icon: "G" }, { href: "#", label: "LinkedIn", icon: "L" }, ], title: "Sticky Footer", subtitle: "Scroll-triggered design", copyright: "©2024 All rights reserved", } // Reusable components const NavSection = ({ title, links, index }: { title: string; links: string[]; index: number }) => ( {title} {links.map((link, linkIndex) => ( {link} ))} ) const SocialLink = ({ href, label, icon, index }: { href: string; label: string; icon: string; index: number }) => ( {icon} ) export default function StickyFooter() { return (
{/* Animated Background Elements */}
{/* Navigation Section */}
{footerData.sections.map((section, index) => ( ))}
{/* Footer Bottom Section */}
{footerData.title} {footerData.subtitle}
{footerData.copyright} {footerData.social.map((social, index) => ( ))}
) }