feat: Speed up testimonials rotation and add script tags

This commit is contained in:
Paul Gauthier 2025-03-28 15:57:53 -10:00 committed by Paul Gauthier (aider)
parent 761a297903
commit 3c7783585e

View file

@ -242,6 +242,7 @@ from scripts.badges import get_testimonials_js
text = get_testimonials_js() text = get_testimonials_js()
cog.out(text) cog.out(text)
]]]--> ]]]-->
<script>
const testimonials = [ const testimonials = [
{ {
text: "The best free open source AI coding assistant.", text: "The best free open source AI coding assistant.",
@ -384,7 +385,9 @@ const testimonials = [
link: "https://x.com/rsweetland/status/1904963807237259586" link: "https://x.com/rsweetland/status/1904963807237259586"
} }
]; ];
</script>
<!--[[[end]]]--> <!--[[[end]]]-->
<script>
// Function to shuffle array // Function to shuffle array
function shuffleArray(array) { function shuffleArray(array) {
@ -515,7 +518,7 @@ const testimonials = [
// Store this index as the last flipped // Store this index as the last flipped
lastFlippedIndex = randomIndex; lastFlippedIndex = randomIndex;
}, 3000); }, 1500);
}); });
</script> </script>