fixed news
This commit is contained in:
@@ -9,14 +9,14 @@ export const NewsMarquee: React.FC<NewsMarqueeProps> = ({ titles }) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Join all titles with a separator and duplicate for seamless looping
|
||||
const marqueeText = titles.join(' --- ') + ' --- ' + titles.join(' --- ');
|
||||
// Join all titles with a separator and duplicate multiple times for seamless looping
|
||||
const fullMarqueeText = Array(4).fill(titles.join(' --- ')).join(' --- ');
|
||||
|
||||
return (
|
||||
<div className="fixed bottom-0 z-40 h-10 left-0 w-full overflow-hidden bg-gray-900 text-yellow-400 py-2 border-t-2 border-yellow-500">
|
||||
<div className="absolute whitespace-nowrap animate-marquee z-50">
|
||||
<div className="fixed bottom-0 left-0 w-full overflow-hidden bg-gray-900 text-yellow-400 py-2 border-t-2 border-yellow-500 z-50 h-10">
|
||||
<div className="absolute whitespace-nowrap animate-marquee">
|
||||
<span className="text-lg font-bold px-4">
|
||||
{marqueeText}
|
||||
{fullMarqueeText}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
marquee: 'marquee 120s linear infinite', // Adjusted duration for slower scroll
|
||||
marquee: 'marquee 240s linear infinite', // Adjusted duration for slower scroll
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user