From 762a16a5f7e3ff4f0f913de81d8354cc6d14cb3d Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Mon, 2 Jun 2025 14:07:17 +1200 Subject: [PATCH] collab, footer --- src/app/(website)/components/Footer/index.tsx | 25 ++++ .../components/Home/Collaboration/index.tsx | 141 ++++++++++++++++++ .../components/Home/Projects/index.tsx | 2 +- src/app/(website)/page.tsx | 4 + 4 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 src/app/(website)/components/Footer/index.tsx create mode 100644 src/app/(website)/components/Home/Collaboration/index.tsx diff --git a/src/app/(website)/components/Footer/index.tsx b/src/app/(website)/components/Footer/index.tsx new file mode 100644 index 0000000..98a828c --- /dev/null +++ b/src/app/(website)/components/Footer/index.tsx @@ -0,0 +1,25 @@ +export default function Footer() { + return ( + + ); +} diff --git a/src/app/(website)/components/Home/Collaboration/index.tsx b/src/app/(website)/components/Home/Collaboration/index.tsx new file mode 100644 index 0000000..2c9fe9f --- /dev/null +++ b/src/app/(website)/components/Home/Collaboration/index.tsx @@ -0,0 +1,141 @@ +"use client"; + +import { motion, MotionValue, useScroll, useTransform } from "motion/react"; +import Link from "next/link"; +import { useEffect, useRef } from "react"; + +const collaborators = { + aotearoa: Array.from({ length: 16 }).map((x, i) => `Organisation ${i}`), + international: Array.from({ length: 8 }).map((x, i) => `Organisation ${i}`), +}; + +export default function Collboaration() { + const containerRef = useRef(null); + const { scrollYProgress } = useScroll({ + target: containerRef, + offset: ["start end", "end end"], + }); + + const titleOpacity = useTransform(scrollYProgress, [0.15, 0.25], [0, 1]); + const titleY = useTransform(scrollYProgress, [0.15, 0.25], [-40, 0]); + + const aotearoaOpacity = useTransform( + scrollYProgress, + [0.25, 0.3, 0.6, 0.7], + [0, 1, 1, 0] + ); + const aotearoaY = useTransform( + scrollYProgress, + [0.25, 0.3, 0.6, 0.7], + [20, 0, 0, -20] + ); + + const internationalOpacity = useTransform( + scrollYProgress, + [0.6, 0.7], + [0, 1] + ); + const internationalY = useTransform(scrollYProgress, [0.6, 0.7], [20, 0]); + + const n = [collaborators.aotearoa.length, collaborators.international.length]; + + return ( +
+
+
+
+ + We have worked with … + +
+ +
+ + Aotearoa + + + International + +
+
+
+ {collaborators.aotearoa.map((org, i) => ( + + ))} +
+
+ {collaborators.international.map((org, i) => ( + + ))} +
+
+
+
+
+ +
+
+

Want to collaborate?

+ +

Get in touch >

+ +
+
+
+ ); +} + +const Collaborator = ({ + name, + progress, + range, +}: { + name: string; + progress: MotionValue; + range: [number, number, number, number]; +}) => { + const opacity = useTransform(progress, range, [0, 1, 1, 0]); + return ( + + {name} + + ); +}; diff --git a/src/app/(website)/components/Home/Projects/index.tsx b/src/app/(website)/components/Home/Projects/index.tsx index 7e83b93..281d10b 100644 --- a/src/app/(website)/components/Home/Projects/index.tsx +++ b/src/app/(website)/components/Home/Projects/index.tsx @@ -132,7 +132,7 @@ export default function Projects({ ))} -
+

Have a project idea?

diff --git a/src/app/(website)/page.tsx b/src/app/(website)/page.tsx index fe1cf42..9bc14d1 100644 --- a/src/app/(website)/page.tsx +++ b/src/app/(website)/page.tsx @@ -7,6 +7,8 @@ import HeroData from "./components/Home/Hero/02-data"; import bgImage from "./bg.jpg"; import Image from "next/image"; import Projects from "./components/Home/Projects"; +import Collboaration from "./components/Home/Collaboration"; +import Footer from "./components/Footer"; export default async function Home() { const payload = await getPayload({ config }); @@ -46,6 +48,8 @@ export default async function Home() { /> + +
);