diff --git a/app/_components/home/OpenSource.tsx b/app/_components/home/OpenSource.tsx index 92c429b..6684b17 100644 --- a/app/_components/home/OpenSource.tsx +++ b/app/_components/home/OpenSource.tsx @@ -1,26 +1,40 @@ import { ArrowRightIcon } from "lucide-react"; -import { Button } from "../common/button"; import { OPEN_SOURCE } from "@/app/_constants/open-source"; import Link from "next/link"; import Image from "next/image"; import { addBasePath } from "@/app/_lib/add-base-path"; +import { useScroll, useTransform, motion } from "framer-motion"; +import { useRef } from "react"; +import clsx from "clsx"; export default function OpenSource() { + const sectionRef = useRef(null); + + const { scrollYProgress } = useScroll({ + target: sectionRef, + offset: ["start 0.9", "start 0.8"], + }); + + const backgroundColor = useTransform(scrollYProgress, [0, 1], ["#FFFFFF", "#000000"]); + const titleColor = useTransform(scrollYProgress, [0, 1], ["#071414", "#E6FDFC"]); + const textColor = useTransform(scrollYProgress, [0, 1], ["#767676", "#BEBEBE"]); + const buttonColor = useTransform(scrollYProgress, [0, 1], ["#002424", "#E6FDFC"]); + return ( -
+