diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index a320e63..9976d1b 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -39,9 +39,8 @@ export default function Blog() { : projects.filter((p) => p.category === activeFilter); const containerVariants = { - hidden: { opacity: 0 }, + hidden: {}, visible: { - opacity: 1, transition: { staggerChildren: 0.1, }, @@ -49,13 +48,11 @@ export default function Blog() { }; const itemVariants = { - hidden: { y: 20, opacity: 0 }, + hidden: { opacity: 0, y: 20 }, visible: { - y: 0, opacity: 1, - transition: { - duration: 0.5, - }, + y: 0, + transition: { duration: 0.9 }, }, }; @@ -115,22 +112,18 @@ export default function Blog() { {/* Blog Posts List */} - +
{filteredPosts.map((post, i) => ( -
- {/* Optional Thumbnail */} {post.image && (
)} - {/* Content */}

@@ -151,7 +143,6 @@ export default function Blog() { {post.description}

- {/* Metadata */}
{post.author} • @@ -173,7 +164,6 @@ export default function Blog() {

- {/* Read More */}
- + ))}
- +
); } diff --git a/src/app/projects/page.tsx b/src/app/projects/page.tsx index 879fee8..822338b 100644 --- a/src/app/projects/page.tsx +++ b/src/app/projects/page.tsx @@ -140,8 +140,11 @@ export default function Projects() { key={i} layout className="relative group" + initial={{ opacity: 0, y: 20 }} + whileInView={{ opacity: 1, y: 0 }} + transition={{ duration: 0.6, ease: "easeOut" }} + viewport={{ once: true, amount: 0.3 }} whileHover={{ y: -8 }} - viewport={{ once: false }} >
diff --git a/src/lib/formatNumber.tsx b/src/lib/formatNumber.tsx index cccc1ab..25295bd 100644 --- a/src/lib/formatNumber.tsx +++ b/src/lib/formatNumber.tsx @@ -1,4 +1,5 @@ export default function formatNumber(num: number): string { + if (num === null) return num; if (num < 1000) return num.toString(); if (num < 1_000_000) return (num / 1000).toFixed(num % 1000 === 0 ? 0 : 1) + "k";