6
6
CarouselViewport ,
7
7
} from './carousel' ;
8
8
import { PayfitIcon , UkgIcon } from '@nx/nx-dev/ui-icons' ;
9
+ import { PlayIcon } from '@heroicons/react/24/outline' ;
10
+ import { sendCustomEvent } from '@nx/nx-dev/feature-analytics' ;
11
+ import { VideoModal } from './video-modal' ;
9
12
10
13
export function Carousel ( {
11
14
items,
@@ -70,38 +73,62 @@ export function Carousel({
70
73
}
71
74
72
75
export function TestimonialCarousel ( ) : ReactElement {
76
+ const [ isOpen , setIsOpen ] = useState ( false ) ;
77
+ const [ currentVideo , setCurrentVideo ] = useState ( '' ) ;
78
+
79
+ const openVideo = ( videoUrl : string ) => {
80
+ setCurrentVideo ( videoUrl ) ;
81
+ setIsOpen ( true ) ;
82
+ } ;
83
+
73
84
return (
74
85
< section className = "" >
75
86
< div className = "mx-auto max-w-7xl px-6 lg:px-8" >
76
87
< Carousel
77
88
items = { [
78
89
{
79
90
element : (
80
- < div className = "relative overflow-hidden" >
91
+ < div
92
+ onClick = { ( ) => {
93
+ openVideo ( 'https://youtu.be/Vdk-tza4PCs' ) ;
94
+ sendCustomEvent (
95
+ 'payfit-testimonial-video-click' ,
96
+ 'testimonial-carousel' ,
97
+ 'enterprise'
98
+ ) ;
99
+ } }
100
+ className = "group relative cursor-pointer overflow-hidden"
101
+ >
81
102
< div
82
- className = "absolute inset-0 bg-opacity-75 bg-contain bg-right bg-no-repeat"
103
+ className = "absolute inset-0 bg-opacity-75 bg-cover bg-center bg-no-repeat transition-transform duration-700 group-hover:scale-105 "
83
104
style = { {
84
105
backgroundImage :
85
106
"url('https://images.unsplash.com/photo-1511376868136-742c0de8c9a8?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D')" ,
86
107
} }
87
108
/>
88
109
< div className = "absolute inset-0 bg-gradient-to-r from-[#0F6FDE] via-[#0F6FDE] via-70% to-[#0F6FDE]/40" />
110
+ < div className = "absolute inset-0 z-10 flex items-center justify-center bg-white/60 opacity-0 backdrop-blur-sm transition duration-300 group-hover:opacity-100 dark:bg-slate-950/60" >
111
+ < div className = "flex items-center gap-2 text-lg font-semibold text-slate-950 drop-shadow dark:text-white" >
112
+ < PlayIcon className = "size-8" />
113
+ Watch the interview
114
+ </ div >
115
+ </ div >
89
116
< div className = "relative mx-auto grid max-w-2xl grid-cols-1 px-12 py-16 text-white lg:mx-0 lg:max-w-none lg:grid-cols-4" >
90
117
< div className = "col-span-3 flex flex-col" >
91
118
< figure className = "flex flex-auto flex-col justify-between" >
92
119
< blockquote className = "text-pretty text-xl/8" >
93
120
< p >
94
- “ The number of hours we spent trying to manage CI
121
+ " The number of hours we spent trying to manage CI
95
122
before, trying to load balance in CircleCI, the
96
123
number of agents that we run ourselves by hand and
97
124
try to distribute ourselves manually - it was
98
- painful, we’ d spend hours and days trying to do
125
+ painful, we' d spend hours and days trying to do
99
126
that.{ ' ' }
100
127
< span className = "font-semibold" >
101
- With Nx Cloud we don’ t need to think about that,
128
+ With Nx Cloud we don' t need to think about that,
102
129
here is my task, deal with it and make it fast
103
130
</ span >
104
- .”
131
+ ."
105
132
</ p >
106
133
</ blockquote >
107
134
< figcaption className = "mt-10 flex items-center gap-x-6" >
@@ -114,7 +141,7 @@ export function TestimonialCarousel(): ReactElement {
114
141
< div className = "font-semibold" >
115
142
Nicolas Beaussart
116
143
</ div >
117
- < div className = "mt-1 " >
144
+ < div className = "mt-1" >
118
145
Staff Platform Engineer, Payfit
119
146
</ div >
120
147
</ div >
@@ -130,36 +157,46 @@ export function TestimonialCarousel(): ReactElement {
130
157
</ div >
131
158
</ div >
132
159
) ,
133
- // innerButtonElement: (
134
- // <PayfitIcon
135
- // aria-hidden="true"
136
- // className="h-10 self-start text-[#0F6FDE]"
137
- // />
138
- // ),
139
160
innerButtonElement : (
140
161
< span className = "text-2xl" > Increase speed</ span >
141
162
) ,
142
163
} ,
143
164
{
144
165
element : (
145
- < div className = "relative" >
166
+ < div
167
+ onClick = { ( ) => {
168
+ openVideo ( 'https://youtu.be/rSC8wihnfP4' ) ;
169
+ sendCustomEvent (
170
+ 'ukg-testimonial-video-click' ,
171
+ 'testimonial-carousel' ,
172
+ 'enterprise'
173
+ ) ;
174
+ } }
175
+ className = "group relative cursor-pointer overflow-hidden"
176
+ >
146
177
< div
147
- className = "absolute inset-0 bg-opacity-75 bg-contain bg-right bg-no-repeat"
178
+ className = "absolute inset-0 bg-opacity-75 bg-cover bg-center bg-no-repeat transition-transform duration-700 group-hover:scale-105 "
148
179
style = { {
149
180
backgroundImage :
150
181
"url('https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D')" ,
151
182
} }
152
183
/>
153
184
< div className = "absolute inset-0 bg-gradient-to-r from-[#005151] via-[#005151] via-55% to-[#005151]/40" />
185
+ < div className = "absolute inset-0 z-10 flex items-center justify-center bg-white/60 opacity-0 backdrop-blur-sm transition duration-300 group-hover:opacity-100 dark:bg-slate-950/60" >
186
+ < div className = "flex items-center gap-2 text-lg font-semibold text-slate-950 drop-shadow dark:text-white" >
187
+ < PlayIcon className = "size-8" />
188
+ Watch the interview
189
+ </ div >
190
+ </ div >
154
191
< div className = "relative mx-auto grid max-w-2xl grid-cols-1 px-12 py-16 text-white lg:mx-0 lg:max-w-none lg:grid-cols-4" >
155
192
< div className = "col-span-2 flex flex-col" >
156
193
< figure className = "flex flex-auto flex-col justify-between" >
157
194
< blockquote className = "text-pretty text-xl/8" >
158
195
< p >
159
- “ I really like the Nx check-ins - Nx people are very
196
+ " I really like the Nx check-ins - Nx people are very
160
197
well prepared for how to help their team grow and
161
198
scale and to help us spot some of our challenges. I
162
- can’ t see a future where we don’ t have Nx.”
199
+ can' t see a future where we don' t have Nx."
163
200
</ p >
164
201
</ blockquote >
165
202
< figcaption className = "mt-10 flex items-center gap-x-6" >
@@ -181,16 +218,19 @@ export function TestimonialCarousel(): ReactElement {
181
218
</ div >
182
219
</ div >
183
220
) ,
184
- // innerButtonElement: (
185
- // <UkgIcon aria-hidden="true" className="h-8 text-[#005151]" />
186
- // ),
187
221
innerButtonElement : (
188
222
< span className = "text-2xl" > Proactive partnership</ span >
189
223
) ,
190
224
} ,
191
225
] }
192
226
/>
193
227
</ div >
228
+
229
+ < VideoModal
230
+ isOpen = { isOpen }
231
+ onClose = { ( ) => setIsOpen ( false ) }
232
+ videoUrl = { currentVideo }
233
+ />
194
234
</ section >
195
235
) ;
196
236
}
0 commit comments