Skip to content

Commit

Permalink
improve transition
Browse files Browse the repository at this point in the history
  • Loading branch information
andyschwab committed Dec 20, 2024
1 parent eddd330 commit 7cb0a55
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,4 +585,15 @@ gsap.to(".menu-button", {
document.querySelector('.menu-button').classList.remove('active');
}
}
});

// Animate body background color when approaching about section
gsap.to("body", {
scrollTrigger: {
trigger: "#about",
start: "top 90%",
end: "top 50%",
scrub: 1
},
backgroundColor: "rgb(20, 30, 60)", // Brighter dark blue
});
16 changes: 16 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,22 @@ body {
transition: opacity 0.5s ease;
}

/* Add transition overlay */
.transition-overlay {
position: fixed;
inset: 0;
background: radial-gradient(
circle at center,
rgba(74, 144, 226, 0.3) 0%,
rgba(41, 121, 255, 0.2) 50%,
rgba(41, 121, 255, 0.1) 100%
);
z-index: var(--z-dark-overlay);
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease;
}

/* CTA Button */
.cta-button {
background: transparent;
Expand Down

0 comments on commit 7cb0a55

Please sign in to comment.