diff --git a/aider/website/home.html b/aider/website/home.html index 81ff82d1e..fd43ba60f 100644 --- a/aider/website/home.html +++ b/aider/website/home.html @@ -225,6 +225,7 @@ border-radius: 8px; padding: 30px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); + transition: opacity 0.3s ease; } .testimonial-text { @@ -638,50 +639,75 @@ aider --model gpt-4o --api-key openai=your-key-goes-here const initialTestimonials = shuffledTestimonials.slice(0, displayCount); // Function to create a testimonial card - function createTestimonialCard(testimonial) { + function createTestimonialCard(testimonial, index) { return ` -
"${testimonial.text}"
"${newTestimonial.text}"
+ + `; + + // Add a brief animation effect + testimonialElement.style.opacity = 0; + setTimeout(() => { + testimonialElement.style.opacity = 1; + }, 300); + } + } + // Initialize testimonials document.addEventListener('DOMContentLoaded', function() { - updateTestimonials(); + initializeTestimonials(); - // Rotate testimonials + let currentIndex = 0; + + // Rotate one testimonial at a time setInterval(function() { - // Remove first testimonial and add a random one from the remaining pool - initialTestimonials.shift(); + updateSingleTestimonial(currentIndex); - const remainingTestimonials = testimonials.filter( - t => !initialTestimonials.some(it => it.author === t.author && it.text === t.text) - ); - - if (remainingTestimonials.length > 0) { - const randomIndex = Math.floor(Math.random() * remainingTestimonials.length); - initialTestimonials.push(remainingTestimonials[randomIndex]); - } else { - // If we've used all testimonials, reshuffle and start over - const newShuffled = shuffleArray([...testimonials]); - initialTestimonials.push(newShuffled[0]); - } - - updateTestimonials(); + // Move to the next index + currentIndex = (currentIndex + 1) % displayCount; }, 3000); });