├── .eslintrc.json ├── public ├── medias │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── PPPangaia-Medium.ttf │ └── curve_footer.svg ├── vercel.svg └── next.svg ├── src ├── app │ ├── favicon.ico │ ├── ._globals.css │ ├── layout.js │ ├── globals.css │ └── page.js └── components │ ├── ._Footer.jsx │ └── Footer.jsx ├── jsconfig.json ├── next.config.mjs ├── postcss.config.js ├── .gitignore ├── tailwind.config.js ├── package.json └── README.md /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /public/medias/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/public/medias/1.jpg -------------------------------------------------------------------------------- /public/medias/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/public/medias/2.jpg -------------------------------------------------------------------------------- /public/medias/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/public/medias/3.jpg -------------------------------------------------------------------------------- /public/medias/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/public/medias/4.jpg -------------------------------------------------------------------------------- /public/medias/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/public/medias/5.jpg -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /src/app/._globals.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/src/app/._globals.css -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /src/components/._Footer.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/src/components/._Footer.jsx -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/medias/PPPangaia-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olivierlarose/text-along-path/HEAD/public/medias/PPPangaia-Medium.ttf -------------------------------------------------------------------------------- /src/app/layout.js: -------------------------------------------------------------------------------- 1 | import { Inter } from "next/font/google"; 2 | import "./globals.css"; 3 | 4 | 5 | export const metadata = { 6 | title: "Create Next App", 7 | description: "Generated by create next app", 8 | }; 9 | 10 | export default function RootLayout({ children }) { 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /public/medias/curve_footer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @font-face { 6 | font-family: 'Main'; 7 | src: url('../../public/medias/PPPangaia-Medium.ttf'); 8 | } 9 | 10 | :root { 11 | --foreground-rgb: 0, 0, 0; 12 | --background-start-rgb: 214, 219, 220; 13 | --background-end-rgb: 255, 255, 255; 14 | } 15 | 16 | body { 17 | color: rgb(var(--foreground-rgb)); 18 | font-family: 'Main'; 19 | } 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 5 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 12 | "gradient-conic": 13 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | }; 19 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/page.js: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { useEffect } from "react"; 3 | import Lenis from '@studio-freight/lenis' 4 | import Footer from "@/components/Footer"; 5 | 6 | export default function Home() { 7 | 8 | useEffect( () => { 9 | const lenis = new Lenis() 10 | 11 | function raf(time) { 12 | lenis.raf(time) 13 | requestAnimationFrame(raf) 14 | } 15 | 16 | requestAnimationFrame(raf) 17 | }, []) 18 | 19 | return ( 20 |
21 |
22 |
24 | ); 25 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "text-move-path", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@studio-freight/lenis": "^1.0.36", 13 | "framer-motion": "^11.0.5", 14 | "next": "14.1.0", 15 | "react": "^18", 16 | "react-dom": "^18" 17 | }, 18 | "devDependencies": { 19 | "autoprefixer": "^10.0.1", 20 | "eslint": "^8", 21 | "eslint-config-next": "14.1.0", 22 | "postcss": "^8", 23 | "tailwindcss": "^3.3.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | # or 14 | bun dev 15 | ``` 16 | 17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 18 | 19 | You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file. 20 | 21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 | 23 | ## Learn More 24 | 25 | To learn more about Next.js, take a look at the following resources: 26 | 27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 29 | 30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 31 | 32 | ## Deploy on Vercel 33 | 34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 35 | 36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 37 | -------------------------------------------------------------------------------- /src/components/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef } from "react"; 2 | import { useScroll, useTransform, motion } from 'framer-motion'; 3 | 4 | export default function Footer() { 5 | const container = useRef(); 6 | const paths = useRef([]); 7 | const { scrollYProgress } = useScroll({ 8 | target: container, 9 | offset: ['start end', 'end end'] 10 | }) 11 | 12 | useEffect( () => { 13 | scrollYProgress.on("change", e => { 14 | paths.current.forEach( (path, i) => { 15 | path.setAttribute("startOffset", -40 + (i * 40) + (e * 40) + "%"); 16 | }) 17 | }) 18 | }, []) 19 | 20 | return ( 21 |
22 | 23 | 24 | 25 | { 26 | [...Array(3)].map((_, i) => { 27 | return paths.current[i] = ref} startOffset={i * 40 + "%"} href="#curve">Curabitur mattis efficitur velit 28 | }) 29 | } 30 | 31 | 32 | 33 |
34 | ) 35 | } 36 | 37 | const Logos = ({scrollProgress}) => { 38 | const y = useTransform(scrollProgress, [0, 1], [-700, 0]) 39 | return ( 40 |
41 | 42 | { 43 | [...Array(5)].map((_, i) => { 44 | return 45 | }) 46 | } 47 | 48 |
49 | ) 50 | } --------------------------------------------------------------------------------