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