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;
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 {

View File

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