Updated the NewsAnimation component to enhance its visual effects and improve the overall user experience.
[skip gpt_engineer]
Этот коммит содержится в:
gpt-engineer-app[bot] 2024-12-15 13:43:34 +00:00
родитель b05d3546d5
Коммит 21918356cb

Просмотреть файл

@ -3,11 +3,14 @@ import { motion } from 'framer-motion';
export const NewsAnimation = ({ className = '' }: { className?: string }) => {
const headlines = [
"BREAKING NEWS • MATHEMATICAL TRUTH QUESTIONED •",
"EXPERTS DIVIDED ON BASIC ARITHMETIC •",
"NEW STUDY CHALLENGES CONVENTIONAL MATH •",
"MATHEMATICAL REVOLUTION BREWING •",
"EDUCATION SYSTEM IN CRISIS •"
"🔥 BREAKING: Math Community Divided Over '2+2=5' Theory",
"📊 Poll Shows Rising Support for Alternative Mathematics",
"🎓 Top Universities Consider New Mathematical Framework",
"💭 Opinion: Why Traditional Math Needs a Revolution",
"🌍 Global Movement Questions Mathematical Constants",
"📱 #Math2Point0 Trending Worldwide",
"⚡ LIVE: Mathematical Paradigm Shift in Progress",
"🔍 Investigation: The Hidden Truth Behind Numbers"
];
return (
@ -15,19 +18,23 @@ export const NewsAnimation = ({ className = '' }: { className?: string }) => {
{headlines.map((headline, index) => (
<motion.div
key={index}
className="absolute whitespace-nowrap text-yellow-500 font-bold"
className="absolute whitespace-nowrap text-yellow-500 font-bold flex items-center gap-2"
style={{
top: `${index * 20}%`,
}}
initial={{ x: "100%" }}
animate={{ x: "-100%" }}
transition={{
duration: 20,
repeat: Infinity,
ease: "linear",
delay: index * 2,
animate={{
x: "-100%",
transition: {
duration: 15,
repeat: Infinity,
ease: "linear",
delay: index * 2,
}
}}
>
<span className="animate-pulse inline-block">LIVE</span>
<span className="mx-2"></span>
{headline}
</motion.div>
))}