diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index ecd1125..d7ebc7c 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -38,7 +38,7 @@ export default function Layout() { ]; return ( - + @@ -31,6 +32,7 @@ export default function HomePage(): React.JSX.Element { + ); } diff --git a/src/pages/HomePage/sections/SkincareBackground.tsx b/src/pages/HomePage/sections/SkincareBackground.tsx new file mode 100644 index 0000000..bccf527 --- /dev/null +++ b/src/pages/HomePage/sections/SkincareBackground.tsx @@ -0,0 +1,64 @@ +import { motion, useScroll, useTransform } from "motion/react"; + +export default function SkincareBackground() { + const { scrollYProgress } = useScroll(); + + const y1 = useTransform(scrollYProgress, [0, 1], ["0%", "-150%"]); + const rotate1 = useTransform(scrollYProgress, [0, 1], [0, 120]); + + const y2 = useTransform(scrollYProgress, [0, 1], ["0%", "150%"]); + const rotate2 = useTransform(scrollYProgress, [0, 1], [0, -120]); + + const y3 = useTransform(scrollYProgress, [0, 1], ["0%", "-100%"]); + const x3 = useTransform(scrollYProgress, [0, 1], ["0%", "100%"]); + const rotate3 = useTransform(scrollYProgress, [0, 1], [-20, 90]); + + return ( +
+
+
+ + +
+ + + +
+ + + +
+ +
+ ); +} \ No newline at end of file