Commit a14126b 1 parent 0f09cb6 commit a14126b Copy full SHA for a14126b
File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import TEDxStarsCanvas from "@/components/ui/stars";
6
6
import Script from "next/script" ;
7
7
import { ScrollProgressBar } from "@/components/common/scroll-progress" ;
8
8
import Footer from "@/components/common/footer" ;
9
+ import ScrollingBanner from "@/components/common/scrolling-banner" ;
9
10
const inter = Inter ( { subsets : [ "latin" ] } ) ;
10
11
export const metadata : Metadata = {
11
12
title : "TEDxSJEC" ,
@@ -43,6 +44,7 @@ export default function RootLayout({
43
44
</ head >
44
45
< body className = { ( inter . className = "overflow-x-hidden" ) } >
45
46
< ScrollProgressBar />
47
+ < ScrollingBanner />
46
48
< TEDxStarsCanvas />
47
49
< Providers > { children } </ Providers >
48
50
< Footer />
Original file line number Diff line number Diff line change
1
+ "use client" ;
2
+
3
+ import { motion } from "framer-motion" ;
4
+
5
+ export default function ScrollingBanner ( ) {
6
+ const sentence = " Registrations close soon • " ;
7
+ const repeatCount = 20 ; // Increase this number to add more repetitions
8
+
9
+ return (
10
+ < div className = "bg-gradient-to-b from-transparent from-60% via-redTheme via-75% to-transparent to-90% h-fit text-whiteTheme overflow-hidden py-2" >
11
+ < motion . div
12
+ className = "whitespace-nowrap inline-block mt-20 pb-4"
13
+ animate = { {
14
+ x : [ "0%" , "-50%" ] ,
15
+ } }
16
+ transition = { {
17
+ x : {
18
+ repeat : Infinity ,
19
+ repeatType : "loop" ,
20
+ duration : 15 , // Reduced from 20 to 15 to speed up the animation
21
+ ease : "linear" ,
22
+ } ,
23
+ } }
24
+ >
25
+ < span className = "text-lg font-semibold px-4" >
26
+ { sentence . repeat ( repeatCount ) }
27
+ </ span >
28
+ </ motion . div >
29
+ </ div >
30
+ ) ;
31
+ }
You can’t perform that action at this time.
0 commit comments