mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +00:00
feat: replace flip animation with elegant fade transition for testimonials
This commit is contained in:
parent
3c7783585e
commit
e2bfdc444a
1 changed files with 11 additions and 6 deletions
|
@ -470,19 +470,24 @@ const testimonials = [
|
||||||
// Update the displayed testimonial
|
// Update the displayed testimonial
|
||||||
const testimonialElement = document.getElementById(`testimonial-${index}`);
|
const testimonialElement = document.getElementById(`testimonial-${index}`);
|
||||||
if (testimonialElement) {
|
if (testimonialElement) {
|
||||||
// Start the flip animation
|
// Start fade out with slight upward movement
|
||||||
testimonialElement.style.transform = "rotateY(90deg)";
|
testimonialElement.style.transition = "opacity 0.4s ease, transform 0.4s ease";
|
||||||
|
testimonialElement.style.opacity = "0";
|
||||||
|
testimonialElement.style.transform = "translateY(10px)";
|
||||||
|
|
||||||
// Update content when card is perpendicular to view (hidden)
|
// Update content when fully faded out
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
testimonialElement.innerHTML = `
|
testimonialElement.innerHTML = `
|
||||||
<p class="testimonial-text">${newTestimonial.text}</p>
|
<p class="testimonial-text">${newTestimonial.text}</p>
|
||||||
<p class="testimonial-author">— <a href="${newTestimonial.link}" target="_blank">${newTestimonial.author}</a></p>
|
<p class="testimonial-author">— <a href="${newTestimonial.link}" target="_blank">${newTestimonial.author}</a></p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// Complete the flip
|
// Start fade in
|
||||||
testimonialElement.style.transform = "rotateY(0deg)";
|
setTimeout(() => {
|
||||||
}, 300);
|
testimonialElement.style.opacity = "1";
|
||||||
|
testimonialElement.style.transform = "translateY(0)";
|
||||||
|
}, 50);
|
||||||
|
}, 400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue