26
26
justify-content : center;
27
27
align-items : center;
28
28
padding : 0 ;
29
- overflow-x : hidden; /* Prevent horizontal scrolling */
29
+ overflow-x : hidden;
30
30
}
31
31
32
32
body {
166
166
align-items : center;
167
167
justify-content : center;
168
168
padding : 0.5rem ;
169
- border-radius : 50% ; /* Changed to make circular */
169
+ border-radius : 50% ;
170
170
font-size : 1.2rem ;
171
171
color : # fff ;
172
172
text-decoration : none;
173
173
transition : all 0.3s ease;
174
- width : 50px ; /* Adjusted for circular shape */
175
- height : 50px ; /* Adjusted for circular shape */
174
+ width : 50px ;
175
+ height : 50px ;
176
176
}
177
177
178
178
.social-icon i {
179
- margin : 0 ; /* Adjusted to center the icon */
179
+ margin : 0 ;
180
180
}
181
181
182
182
.social-icon : hover {
192
192
.whatsapp { background-color : # 25D366 ; }
193
193
.schedule {
194
194
background-color : # ff5733 ;
195
- border-radius : 25px ; /* Keep this button pill-shaped */
196
- padding : 0.5rem 1rem ; /* Reset padding for text */
197
- width : auto; /* Reset width for this button */
198
- height : auto; /* Reset height for this button */
195
+ border-radius : 25px ;
196
+ padding : 0.5rem 1rem ;
197
+ width : auto;
198
+ height : auto;
199
199
}
200
200
201
201
.schedule i {
202
- margin-right : 0.5rem ; /* Add margin for icon separation */
202
+ margin-right : 0.5rem ;
203
203
}
204
204
205
205
.taggbox {
270
270
width : 100% ;
271
271
height : 100% ;
272
272
overflow : auto;
273
- background-color : rgba (0 , 0 , 0 , 0.9 );
273
+ background-color : rgba (0 , 0 , 0 , 0.7 );
274
274
}
275
275
276
276
.modal-content {
277
- margin : auto;
278
- display : block ;
277
+ margin : 15 % auto;
278
+ padding : 4 px ;
279
279
width : 80% ;
280
280
max-width : 700px ;
281
+ background-color : white;
282
+ border-radius : 15px ;
283
+ box-shadow : 0 5px 15px rgba (0 , 0 , 0 , 0.3 );
284
+ position : relative;
281
285
animation-name : zoom;
282
- animation-duration : 0.6 s ;
286
+ animation-duration : 0.3 s ;
283
287
}
284
288
285
289
@keyframes zoom {
288
292
}
289
293
290
294
.close {
295
+ color : # 777 ;
291
296
position : absolute;
292
- top : 15px ;
293
- right : 35px ;
294
- color : # f1f1f1 ;
295
- font-size : 40px ;
297
+ right : 10px ;
298
+ top : 10px ;
299
+ font-size : 24px ;
296
300
font-weight : bold;
297
- transition : 0.3 s ;
301
+ cursor : pointer ;
298
302
}
299
303
300
304
.close : hover ,
301
305
.close : focus {
302
- color : # bbb ;
306
+ color : # 000 ;
303
307
text-decoration : none;
304
- cursor : pointer;
305
- }
306
-
307
- .social-icon .circle-share {
308
- background-color : # 007bff ;
309
- padding : 0.5rem ;
310
- border-radius : 50% ;
311
- font-size : 1.5rem ;
312
- color : # fff ;
313
- text-decoration : none;
314
- display : flex;
315
- align-items : center;
316
- justify-content : center;
317
- position : absolute;
318
- top : 10px ;
319
- right : 10px ;
320
- transition : all 0.3s ease;
321
- }
322
-
323
- .social-icon .circle-share i {
324
- margin : 0 ;
325
308
}
326
309
327
- .social-icon .circle-share : hover {
328
- background-color : # 0056b3 ;
329
- transform : scale (1.05 );
330
- box-shadow : 0 5px 15px rgba (0 , 0 , 0 , 0.3 );
331
- }
332
-
333
- .social-icon .circle-share : active {
334
- transform : scale (0.95 );
310
+ .modal-content iframe {
311
+ border : none;
312
+ width : 100% ;
313
+ height : 500px ;
314
+ border-radius : 10px ;
335
315
}
336
316
</ style >
337
317
</ head >
@@ -355,7 +335,7 @@ <h1 data-lang-en="Book an appointment with López!" data-lang-es="Reserva una ci
355
335
< br >
356
336
< div class ="social-links ">
357
337
<!-- Schedule Appointment Button -->
358
- < a href ="https://lopezbarber58.setmore.com " target =" _blank " class ="social-icon schedule " aria-label ="Schedule Appointment ">
338
+ < a href ="javascript:void(0); " class ="social-icon schedule " aria-label ="Schedule Appointment ">
359
339
< i class ="fas fa-calendar "> </ i >
360
340
< span data-lang-en ="Book Appointment " data-lang-es ="Reservar Cita "> Book Appointment</ span >
361
341
</ a >
@@ -369,11 +349,6 @@ <h1 data-lang-en="Book an appointment with López!" data-lang-es="Reserva una ci
369
349
< a href ="https://instagram.com/lopezbarber58 " target ="_blank " class ="social-icon instagram " aria-label ="Instagram de López ">
370
350
< i class ="fab fa-instagram "> </ i >
371
351
</ a >
372
-
373
- <!-- New Circle Share Button -->
374
- < a href ="javascript:void(0); " class ="social-icon circle-share " onclick ="openPopupImage() " aria-label ="Share Image ">
375
- < i class ="fas fa-share "> </ i >
376
- </ a >
377
352
</ div >
378
353
< br >
379
354
< div class ="taggbox " id ="taggboxWidget " data-widget-id ="2147120 " data-tags ="false "> </ div >
@@ -392,10 +367,13 @@ <h1 data-lang-en="Book an appointment with López!" data-lang-es="Reserva una ci
392
367
< img src ="https://flagcdn.com/w320/gb.png " alt ="English " onclick ="changeLanguage('en') " />
393
368
</ div >
394
369
395
- <!-- The Modal -->
396
- < div id ="myModal " class ="modal ">
397
- < span class ="close "> ×</ span >
398
- < img class ="modal-content " id ="img01 ">
370
+ <!-- The Modal for Appointment Booking -->
371
+ < div id ="appointmentModal " class ="modal ">
372
+ < div class ="modal-content ">
373
+ < span class ="close "> ×</ span >
374
+ < h2 > Book an Appointment</ h2 >
375
+ < iframe src ="https://lopezbarber58.setmore.com " width ="100% " height ="500px " frameborder ="0 "> </ iframe >
376
+ </ div >
399
377
</ div >
400
378
</ div >
401
379
@@ -419,47 +397,43 @@ <h1 data-lang-en="Book an appointment with López!" data-lang-es="Reserva una ci
419
397
// Set default language on load (example: English)
420
398
window . onload = ( ) => {
421
399
const userLang = navigator . language || navigator . userLanguage ;
422
- changeLanguage ( userLang . startsWith ( 'es' ) ? 'es' : 'en' ) ; // Default to Spanish if user's language is Spanish, else English
400
+ changeLanguage ( userLang . startsWith ( 'es' ) ? 'es' : 'en' ) ;
423
401
} ;
424
402
425
403
// Function to hide loading spinner after widget loads
426
404
function hideLoadingSpinner ( ) {
427
405
document . getElementById ( 'loadingOverlay' ) . style . opacity = 0 ;
428
- document . querySelector ( '.container' ) . style . opacity = 1 ; // Show the main content
406
+ document . querySelector ( '.container' ) . style . opacity = 1 ;
429
407
setTimeout ( ( ) => {
430
408
document . getElementById ( 'loadingOverlay' ) . style . display = 'none' ;
431
- } , 1000 ) ; // Wait for the fade-out to complete
409
+ } , 1000 ) ;
432
410
}
433
411
434
412
// Wait for the widget to load
435
413
window . addEventListener ( 'load' , function ( ) {
436
- setTimeout ( hideLoadingSpinner , 3000 ) ; // Ensure spinner stays for 3 seconds
414
+ setTimeout ( hideLoadingSpinner , 3000 ) ;
437
415
} ) ;
438
416
439
- // Function to open the modal with the image
440
- function openPopupImage ( ) {
441
- var modal = document . getElementById ( "myModal" ) ;
442
- var modalImg = document . getElementById ( "img01" ) ;
443
- var imgSource = "https://myxxdev.github.io/images/LopezBarber58QRCode.png" ; // Replace this with the actual image URL
417
+ // Function to open the appointment modal
418
+ document . querySelector ( '.schedule' ) . addEventListener ( 'click' , function ( event ) {
419
+ event . preventDefault ( ) ;
420
+ var modal = document . getElementById ( "appointmentModal" ) ;
444
421
modal . style . display = "block" ;
445
- modalImg . src = imgSource ;
446
-
447
- // Get the <span> element that closes the modal
448
- var span = document . getElementsByClassName ( "close" ) [ 0 ] ;
422
+ } ) ;
449
423
450
- // When the user clicks on <span> (x), close the modal
451
- span . onclick = function ( ) {
452
- modal . style . display = "none" ;
453
- }
454
- }
424
+ // For closing the modal
425
+ document . querySelector ( '.close' ) . addEventListener ( 'click' , function ( ) {
426
+ var modal = document . getElementById ( "appointmentModal" ) ;
427
+ modal . style . display = "none" ;
428
+ } ) ;
455
429
456
- // When the user clicks anywhere outside of the modal, close it
457
- window . onclick = function ( event ) {
458
- var modal = document . getElementById ( "myModal " ) ;
430
+ // Close modal if clicking outside of it
431
+ window . addEventListener ( 'click' , function ( event ) {
432
+ var modal = document . getElementById ( "appointmentModal " ) ;
459
433
if ( event . target == modal ) {
460
434
modal . style . display = "none" ;
461
435
}
462
- }
436
+ } ) ;
463
437
</ script >
464
438
465
439
</ body >
0 commit comments