From 37065af6d49b56394767d924ea3a15e3f23aa89c Mon Sep 17 00:00:00 2001 From: Jeeho Ahn Date: Tue, 19 Dec 2023 23:49:57 +0900 Subject: [PATCH] a --- app/components/sticky.tsx | 2 +- app/cursor.css | 115 ++++++++++++++++++++++++++++++++++++++ app/footer.tsx | 5 +- app/globals.css | 3 +- app/layout.tsx | 1 + app/method.tsx | 36 ------------ app/page.tsx | 14 ++--- app/preloader.tsx | 9 +++ app/works/project.tsx | 41 ++++++++++++++ app/{ => works}/works.tsx | 52 ++++++----------- package.json | 1 + pnpm-lock.yaml | 7 +++ 12 files changed, 205 insertions(+), 81 deletions(-) create mode 100644 app/cursor.css delete mode 100644 app/method.tsx create mode 100644 app/works/project.tsx rename app/{ => works}/works.tsx (72%) diff --git a/app/components/sticky.tsx b/app/components/sticky.tsx index 7034250..59ec482 100644 --- a/app/components/sticky.tsx +++ b/app/components/sticky.tsx @@ -22,7 +22,7 @@ export function Sticky({ start?: number; end?: number | string; target?: string; - snap: + snap?: | number | number[] | "labels" diff --git a/app/cursor.css b/app/cursor.css new file mode 100644 index 0000000..04e9a95 --- /dev/null +++ b/app/cursor.css @@ -0,0 +1,115 @@ +.mf-cursor{ + position:fixed; + top:0; + left:0; + z-index:250; + direction:ltr; + contain:layout style size; + pointer-events:none; + transition:opacity .3s,color .4s +} +.mf-cursor:before{ + content:""; + position:absolute; + top:-24px; + left:-24px; + display:block; + width:48px; + height:48px; + transform:scale(0.2); + background:currentColor; + border-radius:50%; + transition:transform .25s ease-in-out,opacity .1s +} +.mf-cursor.-inverse{ + color:#fff +} +@supports(mix-blend-mode: exclusion){ + .mf-cursor.-exclusion{ + mix-blend-mode:exclusion + } + .mf-cursor.-exclusion:before{ + background:#fff + } +} +.mf-cursor.-pointer:before{ + transform:scale(0.15) +} +.mf-cursor.-text:before{ + opacity:.85; + transform:scale(2) +} +.mf-cursor.-text.-active:before{ + transform:scale(2); + transition-duration:.2s +} +.mf-cursor.-icon:before{ + transform:scale(1.5) +} +.mf-cursor.-icon.-active:before{ + transform:scale(1.4) +} +.mf-cursor.-hidden:before{ + transform:scale(0) +} +.mf-cursor-text{ + position:absolute; + top:-18px; + left:-18px; + width:36px; + height:36px; + display:flex; + align-items:center; + justify-content:center; + transform:scale(0) rotate(10deg); + opacity:0; + color:#fff; + font-size:32px; + line-height:20px; + text-align:center; + transition:opacity .4s,transform .3s +} +.mf-cursor.-text .mf-cursor-text,.mf-cursor.-icon .mf-cursor-text{ + opacity:1; + transform:scale(1) +} +.mf-cursor-media{ + position:absolute; + width:400px; + height:400px; + margin:-200px 0 0 -200px +} +.mf-cursor-media img,.mf-cursor-media video{ + position:absolute; + top:50%; + left:50%; + transform:translate(-50%, -50%); + border-radius:50% +} +@supports(object-fit: cover){ + .mf-cursor-media img,.mf-cursor-media video{ + position:static; + width:100%; + height:100%; + object-fit:cover; + transform:translateZ(0) + } +} +.mf-cursor-media-box{ + position:relative; + width:100%; + height:100%; + overflow:hidden; + transform:scale(0) translateZ(0); + padding:1px; + opacity:0; + border-radius:50%; + transition:transform .35s,opacity .2s .2s +} +.mf-cursor.-media .mf-cursor-media-box{ + opacity:1; + transform:scale(0.696); + transition-duration:.4s,.4s; + transition-delay:0s,0s +} +/*# sourceMappingURL=mouse-follower.min.css.map */ diff --git a/app/footer.tsx b/app/footer.tsx index 8a0cf71..8ed0d75 100644 --- a/app/footer.tsx +++ b/app/footer.tsx @@ -6,7 +6,10 @@ import { useEffect } from "react"; export const Footer = () => { return ( <> -