@@ -10,7 +10,7 @@ import { useRef } from 'react';
1010const Home = ( ) => {
1111 // const MotionButton = motion(Button);
1212 const constraintsRef = useRef ( null ) ;
13- const IS_COMING_SOON = true ; // Set to false when the event tickets are available
13+ const IS_COMING_SOON = false ; // Set to false when the event tickets are available
1414
1515 return (
1616 < div className = "relative min-h-screen flex flex-col justify-center items-center p-4 sm:p-6 md:p-10 text-white overflow-hidden" >
@@ -237,89 +237,175 @@ const Home = () => {
237237export default Home ;
238238
239239const EnhancedCTAButtons = ( ) => {
240+ // ---------------------------------------------------------
241+ // MANUAL TOGGLES: Control availability here
242+ // ---------------------------------------------------------
243+ const IS_TICKET_SALE_OPEN = false ;
244+ const IS_CFP_OPEN = true ;
245+ const IS_SPONSOR_OPEN = false ; // Set to true to enable Sponsor button
246+
240247 return (
241248 < div className = "flex flex-col sm:flex-row items-center justify-center gap-4 sm:gap-6 w-full" >
242- { /* Main CTA - Get Ticket */ }
249+
250+ { /* 1. Main CTA - Get Ticket */ }
243251 < motion . div
244- whileHover = { { scale : 1.05 } }
245- whileTap = { { scale : 0.95 } }
246- className = " w-full sm:w-auto"
252+ whileHover = { IS_TICKET_SALE_OPEN ? { scale : 1.05 } : { } }
253+ whileTap = { IS_TICKET_SALE_OPEN ? { scale : 0.95 } : { } }
254+ className = { ` w-full sm:w-auto ${ ! IS_TICKET_SALE_OPEN ? 'cursor-not-allowed opacity-80' : '' } ` }
247255 >
248- < a
249- href = "https://www.eventbrite.it/e/serverlessdays-milano-2025-tickets-1460042399119"
250- target = "_blank"
251- className = "group block w-full"
252- >
253- < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-gradient-to-r from-white via-pink-50 to-white text-purple-900 font-black text-lg sm:text-xl rounded-2xl border-4 border-purple-200 shadow-2xl hover:shadow-purple-500/50 transition-all duration-300 ease-in-out group-hover:border-purple-300" >
254- < span className = "absolute inset-0 bg-gradient-to-r from-purple-100 via-pink-100 to-purple-100 opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ span >
255- < span className = "relative flex items-center justify-center gap-3" >
256- < motion . span
257- animate = { { rotate : [ 0 , 10 , - 10 , 0 ] } }
258- transition = { {
259- duration : 2 ,
260- repeat : Infinity ,
261- ease : 'easeInOut' ,
262- } }
263- >
264- 🎫
265- </ motion . span >
266- < span > Get Your Ticket!</ span >
267- < motion . span
268- animate = { { scale : [ 1 , 1.2 , 1 ] } }
269- transition = { {
270- duration : 2 ,
271- repeat : Infinity ,
272- ease : 'easeInOut' ,
273- delay : 0.5 ,
274- } }
275- >
276- ✨
277- </ motion . span >
278- </ span >
279- </ button >
280- </ a >
256+ { IS_TICKET_SALE_OPEN ? (
257+ < a
258+ href = "https://www.eventbrite.it/e/serverlessdays-milano-2025-tickets-1460042399119"
259+ target = "_blank"
260+ className = "group block w-full"
261+ >
262+ < TicketButtonContent isOpen = { true } />
263+ </ a >
264+ ) : (
265+ < div className = "block w-full pointer-events-none" >
266+ < TicketButtonContent isOpen = { false } />
267+ </ div >
268+ ) }
281269 </ motion . div >
282270
283- { /* Secondary CTA - Become Sponsor */ }
271+ { /* 2. Secondary CTA - CFP ( Become a Speaker) */ }
284272 < motion . div
285- whileHover = { { scale : 1.05 } }
286- whileTap = { { scale : 0.95 } }
287- className = " w-full sm:w-auto"
273+ whileHover = { IS_CFP_OPEN ? { scale : 1.05 } : { } }
274+ whileTap = { IS_CFP_OPEN ? { scale : 0.95 } : { } }
275+ className = { ` w-full sm:w-auto ${ ! IS_CFP_OPEN ? 'cursor-not-allowed opacity-80' : '' } ` }
288276 >
289- < a
290- href = "https://drive.google.com/uc?export=download& id = 1 p7ZAFM7yXGp7qwGvOPjR_HuaMenHS_7W "
291- target = "_blank"
292- className = "group block w-full"
293- >
294- < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-gradient-to-r from-purple-600 via-blue-600 to-purple-600 text-white font-bold text-lg sm:text-xl rounded-2xl shadow-xl hover:shadow-blue-500/50 transition-all duration-300 ease-in-out border-2 border-purple-400 group-hover:border-blue-400" >
295- < span className = "absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ span >
296- < span className = "relative flex items-center justify-center gap-3" >
297- < motion . span
298- animate = { { rotate : [ 0 , 360 ] } }
299- transition = { { duration : 3 , repeat : Infinity , ease : 'linear' } }
300- >
301- 🤝
302- </ motion . span >
303- < span > Become a Sponsor</ span >
304- < motion . span
305- animate = { { y : [ 0 , - 3 , 0 ] } }
306- transition = { {
307- duration : 2 ,
308- repeat : Infinity ,
309- ease : 'easeInOut' ,
310- delay : 1 ,
311- } }
312- >
313- 🚀
314- </ motion . span >
315- </ span >
316- </ button >
317- </ a >
277+ { IS_CFP_OPEN ? (
278+ < a
279+ href = "https://www.papercall.io/serverlessdays-milano-2026"
280+ target = "_blank"
281+ className = "group block w-full"
282+ >
283+ < SpeakerButtonContent isOpen = { true } />
284+ </ a >
285+ ) : (
286+ < div className = "block w-full pointer-events-none" >
287+ < SpeakerButtonContent isOpen = { false } />
288+ </ div >
289+ ) }
290+ </ motion . div >
291+
292+ { /* 3. Secondary CTA - Become Sponsor */ }
293+ < motion . div
294+ whileHover = { IS_SPONSOR_OPEN ? { scale : 1.05 } : { } }
295+ whileTap = { IS_SPONSOR_OPEN ? { scale : 0.95 } : { } }
296+ className = { `w-full sm:w-auto ${ ! IS_SPONSOR_OPEN ? 'cursor-not-allowed opacity-80' : '' } ` }
297+ >
298+ { IS_SPONSOR_OPEN ? (
299+ < a
300+ href = "https://drive.google.com/uc?export=download& id = 1 p7ZAFM7yXGp7qwGvOPjR_HuaMenHS_7W "
301+ target = "_blank"
302+ className = "group block w-full"
303+ >
304+ < SponsorButtonContent isOpen = { true } />
305+ </ a >
306+ ) : (
307+ < div className = "block w-full pointer-events-none" >
308+ < SponsorButtonContent isOpen = { false } />
309+ </ div >
310+ ) }
318311 </ motion . div >
312+
319313 </ div >
320314 ) ;
321315} ;
322316
317+ // ---------------------------------------------------------
318+ // HELPER COMPONENTS (Render the Button Looks)
319+ // ---------------------------------------------------------
320+
321+ const TicketButtonContent = ( { isOpen } : { isOpen : boolean } ) => {
322+ if ( isOpen ) {
323+ return (
324+ < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-gradient-to-r from-white via-pink-50 to-white text-purple-900 font-black text-lg sm:text-xl rounded-2xl border-4 border-purple-200 shadow-2xl hover:shadow-purple-500/50 transition-all duration-300 ease-in-out group-hover:border-purple-300 cursor-pointer" >
325+ < span className = "absolute inset-0 bg-gradient-to-r from-purple-100 via-pink-100 to-purple-100 opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ span >
326+ < span className = "relative flex items-center justify-center gap-3" >
327+ < motion . span animate = { { rotate : [ 0 , 10 , - 10 , 0 ] } } transition = { { duration : 2 , repeat : Infinity , ease : 'easeInOut' } } >
328+ 🎫
329+ </ motion . span >
330+ < span > Get Your Ticket!</ span >
331+ < motion . span animate = { { scale : [ 1 , 1.2 , 1 ] } } transition = { { duration : 2 , repeat : Infinity , ease : 'easeInOut' , delay : 0.5 } } >
332+ ✨
333+ </ motion . span >
334+ </ span >
335+ </ button >
336+ ) ;
337+ }
338+ return (
339+ < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-slate-100 text-slate-400 font-bold text-lg sm:text-xl rounded-2xl border-4 border-slate-200 shadow-none cursor-not-allowed grayscale" >
340+ < span className = "relative flex items-center justify-center gap-3" >
341+ < span > 🎫</ span >
342+ < span > Tickets coming Soon</ span >
343+ < span > ✨</ span >
344+ </ span >
345+ </ button >
346+ ) ;
347+ } ;
348+
349+ const SpeakerButtonContent = ( { isOpen } : { isOpen : boolean } ) => {
350+ if ( isOpen ) {
351+ // Active: Vibrant Orchid (Pink/Purple)
352+ return (
353+ < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-gradient-to-r from-purple-500 via-pink-500 to-purple-500 text-white font-bold text-lg sm:text-xl rounded-2xl shadow-xl hover:shadow-pink-500/50 transition-all duration-300 ease-in-out border-2 border-purple-300 group-hover:border-pink-300 cursor-pointer" >
354+ < span className = "absolute inset-0 bg-gradient-to-r from-pink-500 via-purple-500 to-pink-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ span >
355+ < span className = "relative flex items-center justify-center gap-3" >
356+ < motion . span animate = { { rotate : [ 0 , 10 , - 10 , 0 ] } } transition = { { duration : 2 , repeat : Infinity , ease : 'easeInOut' } } >
357+ 📢
358+ </ motion . span >
359+ < span > Become a Speaker</ span >
360+ < motion . span animate = { { y : [ 0 , - 3 , 0 ] } } transition = { { duration : 2 , repeat : Infinity , ease : 'easeInOut' , delay : 1 } } >
361+ 🗣️
362+ </ motion . span >
363+ </ span >
364+ </ button >
365+ ) ;
366+ }
367+ // Disabled
368+ return (
369+ < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-slate-100 text-slate-400 font-bold text-lg sm:text-xl rounded-2xl border-2 border-slate-200 shadow-none cursor-not-allowed grayscale" >
370+ < span className = "relative flex items-center justify-center gap-3" >
371+ < span > 📢</ span >
372+ < span > CFP Coming Soon</ span >
373+ < span > 🗣️</ span >
374+ </ span >
375+ </ button >
376+ ) ;
377+ } ;
378+
379+ const SponsorButtonContent = ( { isOpen } : { isOpen : boolean } ) => {
380+ if ( isOpen ) {
381+ // Active: Purple/Blue
382+ return (
383+ < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-gradient-to-r from-purple-600 via-blue-600 to-purple-600 text-white font-bold text-lg sm:text-xl rounded-2xl shadow-xl hover:shadow-blue-500/50 transition-all duration-300 ease-in-out border-2 border-purple-400 group-hover:border-blue-400 cursor-pointer" >
384+ < span className = "absolute inset-0 bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ span >
385+ < span className = "relative flex items-center justify-center gap-3" >
386+ < motion . span animate = { { rotate : [ 0 , 360 ] } } transition = { { duration : 3 , repeat : Infinity , ease : 'linear' } } >
387+ 🤝
388+ </ motion . span >
389+ < span > Become a Sponsor</ span >
390+ < motion . span animate = { { y : [ 0 , - 3 , 0 ] } } transition = { { duration : 2 , repeat : Infinity , ease : 'easeInOut' , delay : 1 } } >
391+ 🚀
392+ </ motion . span >
393+ </ span >
394+ </ button >
395+ ) ;
396+ }
397+ // Disabled
398+ return (
399+ < button className = "relative overflow-hidden w-full sm:w-auto px-8 sm:px-10 py-4 sm:py-5 bg-slate-100 text-slate-400 font-bold text-lg sm:text-xl rounded-2xl border-2 border-slate-200 shadow-none cursor-not-allowed grayscale" >
400+ < span className = "relative flex items-center justify-center gap-3" >
401+ < span > 🤝</ span >
402+ < span > Become Sponsor Soon</ span >
403+ < span > 🚀</ span >
404+ </ span >
405+ </ button >
406+ ) ;
407+ } ;
408+
323409/**
324410 * Renders the EarlyBirdText component.
325411 *
0 commit comments