Animations

This commit is contained in:
2025-05-11 21:53:52 -04:00
parent c21eda8c6b
commit a4925d5944
2 changed files with 52 additions and 16 deletions

View File

@@ -7,7 +7,23 @@
left: 0px; left: 0px;
font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif; font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
color: azure; 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 { .App-logo {
@@ -61,8 +77,19 @@ hr {
border: 10px solid aquamarine; border: 10px solid aquamarine;
} }
.publications { .publications, .Experience, .DevTools, .Contact {
margin-top: 230px; 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 { .slick-dots button:before {

View File

@@ -17,6 +17,22 @@ import DevToolsComponent from "./components/devtools";
import SocialMedia from "./components/SocialMedia"; import SocialMedia from "./components/SocialMedia";
function Portfolio() { 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 ( return (
<div className="App"> <div className="App">
<meta name="Aman Tahiliani's Portfolio"></meta> <meta name="Aman Tahiliani's Portfolio"></meta>
@@ -29,33 +45,26 @@ function Portfolio() {
<About className="About" id="About" /> <About className="About" id="About" />
</section> </section>
<section className="publications" id="Publications"> <section className="publications" id="Publications">
<h2 style={{ color: "salmon", fontSize: "50px" }}> <h2 className="section-title" style={{ color: "salmon", fontSize: "50px" }}>
<b>Publications</b> <b>Publications</b>
</h2> </h2>
<SimpleSlider /> <SimpleSlider />
</section> </section>
<section className="Experience" id="Experience"> <section className="Experience" id="Experience">
<h2 style={{ color: "salmon", fontSize: "50px", marginTop: "110px" }}> <h2 className="section-title" style={{ color: "salmon", fontSize: "50px" }}>
<b>Experience</b> <b>Experience</b>
</h2> </h2>
<Experience /> <Experience />
</section> </section>
<section className="DevTools" id="DevTools" style={{ marginBottom: "100px" }}> <section className="DevTools" id="DevTools">
<h2 style={{ color: "salmon", fontSize: "50px" }}> <h2 className="section-title" style={{ color: "salmon", fontSize: "50px" }}>
<b>Dev Tools</b> <b>Dev Tools</b>
</h2> </h2>
<DevToolsComponent /> <DevToolsComponent />
</section> </section>
<hr /> <section className="Contact" id="Contact">
<section className="publications" id="Publications"> <h2 className="section-title" style={{ color: "cyan", fontSize: "50px" }}>
<h2 style={{ color: "salmon", fontSize: "50px" }}>
<b>Publications</b>
</h2>
<SimpleSlider />
</section>
<section className="Contact" id="Contact" style={{ marginTop: "100px" }}>
<h2 style={{ color: "cyan", fontSize: "50px" }}>
<b>Social Links</b> <b>Social Links</b>
</h2> </h2>
<SocialMedia <SocialMedia