From a4925d5944bc73463ff42c7fb9fe77ca69610421 Mon Sep 17 00:00:00 2001 From: amantahiliani Date: Sun, 11 May 2025 21:53:52 -0400 Subject: [PATCH] Animations --- src/App.css | 33 ++++++++++++++++++++++++++++++--- src/App.js | 35 ++++++++++++++++++++++------------- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/src/App.css b/src/App.css index c503e26..e08ec61 100644 --- a/src/App.css +++ b/src/App.css @@ -7,7 +7,23 @@ left: 0px; font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif; color: azure; - overflow: hidden; + overflow-x: hidden; + scroll-behavior: smooth; +} + +html { + scroll-behavior: smooth; +} + +section { + opacity: 0; + transform: translateY(20px); + transition: opacity 0.6s ease-out, transform 0.6s ease-out; +} + +section.visible { + opacity: 1; + transform: translateY(0); } .App-logo { @@ -61,8 +77,19 @@ hr { border: 10px solid aquamarine; } -.publications { - margin-top: 230px; +.publications, .Experience, .DevTools, .Contact { + margin-top: 100px; + padding: 40px 0; +} + +.section-title { + margin-bottom: 40px; + transform: translateY(0); + transition: transform 0.4s ease-out; +} + +section:hover .section-title { + transform: translateY(-5px); } .slick-dots button:before { diff --git a/src/App.js b/src/App.js index 22c240b..3adf82a 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,22 @@ import DevToolsComponent from "./components/devtools"; import SocialMedia from "./components/SocialMedia"; function Portfolio() { + useEffect(() => { + const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.classList.add('visible'); + } + }); + }, { threshold: 0.1 }); + + document.querySelectorAll('section').forEach((section) => { + observer.observe(section); + }); + + return () => observer.disconnect(); + }, []); + return (
@@ -29,33 +45,26 @@ function Portfolio() {
-

+

Publications

-

+

Experience

-
-

+
+

Dev Tools

-
-
-

- Publications -

- -
-
-

+
+

Social Links