File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 29
29
let index = 0 ;
30
30
let rol: NodeJS .Timeout ;
31
31
32
+ let titleClass = ' italic' ;
32
33
onMount (() => {
33
34
rol = setInterval (() => {
34
- if (index === greetings .length - 1 ) index = 0 ;
35
- else index ++ ;
35
+ if (index === greetings .length - 1 ) {
36
+ index = 0 ;
37
+ // only show all the options onces, then stop sliding
38
+ clearInterval (rol );
39
+ titleClass = ' ' ;
40
+ } else {
41
+ index ++ ;
42
+ }
36
43
}, 1250 );
37
44
});
38
45
167
174
168
175
<div class =" container h-full mx-auto flex justify-center items-center" >
169
176
<div class =" space-y-10 text-center flex flex-col items-center" >
170
- <h2 style = " display: inline " >
171
- <bold transition:slide >{greetings [index ]}</bold > your top contributors
177
+ <h2 class = " h2 " >
178
+ <span class ={ titleClass } transition:slide >{greetings [index ]}</span > your top contributors
172
179
</h2 >
173
180
<form class =" w-full" >
174
181
<div class =" input-group input-group-divider grid-cols-[auto_1fr_auto]" >
You can’t perform that action at this time.
0 commit comments