@@ -65,21 +65,21 @@ document.addEventListener('DOMContentLoaded', () => {
65
65
66
66
// Form handling
67
67
const emailForm = document . querySelector ( '.input-group' )
68
- const emailInput = emailForm . querySelector ( 'input[type="email"]' )
68
+ // const // emailInput = null // emailForm.querySelector('input[type="email"]')
69
69
const honeypotInput = emailForm . querySelector ( 'input[name="contact_me_by_fax"]' )
70
- const notifyButton = emailForm . querySelector ( '.notify-btn' )
70
+ // const notifyButton = emailForm.querySelector('.notify-btn')
71
71
72
72
// Check if user has already signed up
73
73
/*if (localStorage.getItem('mcp_demo_signup')) {
74
74
const savedEmail = localStorage.getItem('mcp_demo_signup')
75
75
showSuccessState(savedEmail)
76
76
}*/
77
77
78
- function showSuccessState ( email ) {
79
- const inputGroup = emailInput . closest ( '.input-group' )
78
+ /* function showSuccessState(email) {
79
+ const inputGroup = // emailInput.closest('.input-group')
80
80
inputGroup.classList.add('success')
81
- emailInput . value = email
82
- emailInput . disabled = true
81
+ // emailInput.value = email
82
+ // emailInput.disabled = true
83
83
notifyButton.disabled = true
84
84
85
85
// Update button
@@ -90,7 +90,7 @@ document.addEventListener('DOMContentLoaded', () => {
90
90
`
91
91
notifyButton.classList.add('success')
92
92
createConfetti(notifyButton)
93
- }
93
+ }*/
94
94
95
95
// Rate limiting configuration
96
96
const RATE_LIMIT_DURATION = 60000 // 1 minute
@@ -175,24 +175,24 @@ document.addEventListener('DOMContentLoaded', () => {
175
175
}
176
176
177
177
// Setup accessibility attributes
178
- function setupAccessibility ( ) {
179
- emailInput . setAttribute ( 'aria-label' , 'Email address for notification' )
178
+ /* function setupAccessibility() {
179
+ // emailInput.setAttribute('aria-label', 'Email address for notification')
180
180
notifyButton.setAttribute('aria-label', 'Sign up for notification')
181
181
document.querySelector('.success-message')?.setAttribute('role', 'status')
182
- }
182
+ }*/
183
183
184
184
// Debounced email validation on input
185
185
const validateEmailDebounced = debounce ( ( email ) => {
186
186
const isValid = isValidEmail ( email )
187
- emailInput . style . border = isValid ? '' : '1px solid red'
187
+ // emailInput.style.border = isValid ? '' : '1px solid red'
188
188
} , 300 )
189
189
190
- emailInput . addEventListener ( 'input' , ( e ) => validateEmailDebounced ( e . target . value ) )
190
+ // emailInput.addEventListener('input', (e) => validateEmailDebounced(e.target.value))
191
191
192
192
// Enhanced click handler with all improvements
193
- notifyButton . addEventListener ( 'click' , async ( e ) => {
193
+ /* notifyButton.addEventListener('click', async (e) => {
194
194
e.preventDefault()
195
- const email = emailInput . value . trim ( )
195
+ // const email = // emailInput.value.trim()
196
196
197
197
// Rate limit check
198
198
if (!checkRateLimit()) {
@@ -202,12 +202,12 @@ document.addEventListener('DOMContentLoaded', () => {
202
202
203
203
// Basic validation
204
204
if (!email) {
205
- emailInput . style . border = '1px solid red'
205
+ // emailInput.style.border = '1px solid red'
206
206
return
207
207
}
208
208
209
209
if (!isValidEmail(email)) {
210
- emailInput . style . border = '1px solid red'
210
+ // emailInput.style.border = '1px solid red'
211
211
showToast('Please enter a valid email address.')
212
212
return
213
213
}
@@ -217,8 +217,8 @@ document.addEventListener('DOMContentLoaded', () => {
217
217
return
218
218
}*/
219
219
220
- // Honeypot check
221
- if ( honeypotInput . value ) {
220
+ // Honeypot check
221
+ /* if (honeypotInput.value) {
222
222
console.log('Bot detected')
223
223
return
224
224
}
@@ -250,7 +250,7 @@ document.addEventListener('DOMContentLoaded', () => {
250
250
setupAccessibility()
251
251
} catch (error) {
252
252
console.error('Error:', error)
253
- emailInput . style . border = '1px solid red'
253
+ // emailInput.style.border = '1px solid red'
254
254
255
255
if (error.message.includes('UNIQUE constraint failed')) {
256
256
showToast('This email is already registered for the demo. Check your inbox for details.')
@@ -262,10 +262,10 @@ document.addEventListener('DOMContentLoaded', () => {
262
262
showToast('Something went wrong. Please try again.')
263
263
}
264
264
}
265
- } )
265
+ })*/
266
266
267
267
// Initialize accessibility
268
- setupAccessibility ( )
268
+ // ()
269
269
270
270
function setupCalendarActions ( ) {
271
271
const calendarActions = document . querySelectorAll (
@@ -339,9 +339,9 @@ END:VCALENDAR`
339
339
setupCalendarActions ( )
340
340
341
341
// Remove red border on input focus
342
- emailInput . addEventListener ( 'focus' , ( ) => {
343
- emailInput . style . border = 'none'
344
- } )
342
+ // emailInput.addEventListener('focus', () => {
343
+ // emailInput.style.border = 'none'
344
+ // })
345
345
346
346
// Company list hover effect
347
347
const companies = document . querySelectorAll ( '.demo-companies li' )
@@ -385,10 +385,12 @@ END:VCALENDAR`
385
385
if ( company ) {
386
386
item . setAttribute ( 'data-company' , company )
387
387
}
388
+ console . log ( 'add attrib' )
388
389
} )
389
390
390
391
// Create background containers for each company
391
392
companyNames . forEach ( ( company ) => {
393
+ console . log ( 'add container' )
392
394
const background = document . createElement ( 'div' )
393
395
background . className = `company-background ${ company } `
394
396
@@ -445,6 +447,7 @@ END:VCALENDAR`
445
447
backgrounds [ currentBackgroundIndex ] . classList . add ( 'active' )
446
448
companyItems [ currentBackgroundIndex ] . classList . add ( 'active' )
447
449
currentBackgroundIndex = ( currentBackgroundIndex + 1 ) % backgrounds . length
450
+ console . log ( 'cucle' )
448
451
}
449
452
450
453
// Start cycling every 3 seconds
0 commit comments