From c5703c060dcaeed551af7b41460b2281cbbb1268 Mon Sep 17 00:00:00 2001 From: AyrisAI Date: Sat, 16 May 2026 00:52:38 +0300 Subject: [PATCH] feat: implement full site animations with framer motion --- components/ClientWrapper.tsx | 13 ++++- components/SelectedWorks.tsx | 93 +++++++++++++++++++++++------------- 2 files changed, 71 insertions(+), 35 deletions(-) diff --git a/components/ClientWrapper.tsx b/components/ClientWrapper.tsx index 76c2b5e..8679e98 100644 --- a/components/ClientWrapper.tsx +++ b/components/ClientWrapper.tsx @@ -1,6 +1,7 @@ "use client"; import { usePathname } from "next/navigation"; +import { motion, AnimatePresence } from "framer-motion"; import Navbar from "./Navbar"; export default function ClientLayout({ children }: { children: React.ReactNode }) { @@ -10,7 +11,17 @@ export default function ClientLayout({ children }: { children: React.ReactNode } return ( <> {!isAdmin && } - {children} + + + {children} + + ); } \ No newline at end of file diff --git a/components/SelectedWorks.tsx b/components/SelectedWorks.tsx index b2e2d66..98cbdcc 100644 --- a/components/SelectedWorks.tsx +++ b/components/SelectedWorks.tsx @@ -3,6 +3,7 @@ import { useEffect, useState } from "react"; import Image from "next/image"; import Link from "next/link"; +import { motion } from "framer-motion"; import { ArrowRight, Loader2 } from "lucide-react"; import { getFeaturedProjects } from "@/app/actions"; @@ -13,44 +14,62 @@ interface ProjectCardProps { year: string; subtitle: string; slug: string; + index: number; } -function ProjectCard({ hero_image, category, title, year, subtitle, slug }: ProjectCardProps) { +function ProjectCard({ hero_image, category, title, year, subtitle, slug, index }: ProjectCardProps) { return ( - -
-
- {title} + + +
+
+ + {title} + - {/* Category Badge */} -
- - {category} - + {/* Category Badge */} +
+ + {category} + +
-
- {/* Content Below Image */} -
-
-

- {title} -

- - {year} - -
-

- {subtitle} -

+ {/* Content Below Image */} + +
+

+ {title} +

+ + {year} + +
+

+ {subtitle} +

+
-
- + +
); } @@ -83,7 +102,13 @@ export default function SelectedWorks() {
{/* Header Section */} -
+
Son Projeler

@@ -94,12 +119,12 @@ export default function SelectedWorks() { Tüm Portfolyo -

+
{/* Grid */}
{projects.map((project, index) => ( - + ))}