"use client"; import { siteConfig } from "@/config/site"; import { GithubOutlined, LinkedinOutlined, XOutlined, } from "@lineiconshq/free-icons"; import { Lineicons } from "@lineiconshq/react-lineicons"; import gsap from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; import Link from "next/link"; import { useEffect, useRef } from "react"; gsap.registerPlugin(ScrollTrigger); const socialIcons = { github: GithubOutlined, linkedin: LinkedinOutlined, x: XOutlined, } as const; const navLinks = [ { href: "/", label: "Accueil" }, { href: "/tutos", label: "Tutoriels" }, { href: "/dashboard", label: "Dashboard" }, ]; export function Footer() { const footerRef = useRef(null); const contentRef = useRef(null); const logoRef = useRef(null); const linksRef = useRef(null); const socialRef = useRef(null); const bottomRef = useRef(null); useEffect(() => { const ctx = gsap.context(() => { const tl = gsap.timeline({ scrollTrigger: { trigger: footerRef.current, start: "top 90%", toggleActions: "play none none reverse", }, }); tl.fromTo( logoRef.current, { opacity: 0, y: 30 }, { opacity: 1, y: 0, duration: 0.6, ease: "power2.out" } ); tl.fromTo( linksRef.current?.querySelectorAll("a") || [], { opacity: 0, y: 20 }, { opacity: 1, y: 0, duration: 0.4, stagger: 0.1, ease: "power2.out", }, "-=0.3" ); tl.fromTo( socialRef.current?.querySelectorAll("a") || [], { opacity: 0, scale: 0.8 }, { opacity: 1, scale: 1, duration: 0.4, stagger: 0.1, ease: "back.out(1.7)", }, "-=0.3" ); tl.fromTo( bottomRef.current, { opacity: 0 }, { opacity: 1, duration: 0.5 }, "-=0.2" ); }, footerRef); return () => ctx.revert(); }, []); const handleSocialHover = (e: React.MouseEvent, entering: boolean) => { gsap.to(e.currentTarget, { scale: entering ? 1.15 : 1, y: entering ? -3 : 0, duration: 0.25, ease: "power2.out", }); }; return ( ); }