11
2+
23const sampleProjects = [
34 {
45 id : 1 ,
@@ -404,78 +405,22 @@ const sampleProjects = [
404405 icon . textContent = theme === 'dark' ? '☀️' : '🌙' ;
405406 } ) ;
406407
407- // Show the overlay
408- const overlay = document . getElementById ( "message-overlay" ) ;
409- overlay . style . opacity = "1" ;
410- overlay . style . pointerEvents = "auto" ;
411-
412- // Hide the overlay after 3 seconds
413- setTimeout ( ( ) => {
414- overlay . style . opacity = "0" ;
415- overlay . style . pointerEvents = "none" ;
416- } , 3000 ) ;
417-
418- // Clear form
419- document . getElementById ( "contact-form" ) . reset ( ) ;
420-
421- return false ; // Prevent actual form submission
422- }
423-
424- const toggle = document . getElementById ( 'darkModeToggle' ) ;
425- const body = document . body ;
426- const icon = document . getElementById ( 'themeIcon' ) ;
427-
428- // Load preference
429- const savedTheme = localStorage . getItem ( 'theme' ) ;
430- if ( savedTheme === 'dark' ) {
431- body . classList . add ( 'dark-theme' ) ;
432- icon . textContent = '☀️' ; // Sun in dark mode
433- } else {
434- icon . textContent = '🌙' ; // Moon in light mode
435- }
436-
437- toggle . addEventListener ( 'click' , ( ) => {
438- body . classList . toggle ( 'dark-theme' ) ;
439- const theme = body . classList . contains ( 'dark-theme' ) ? 'dark' : 'light' ;
440- localStorage . setItem ( 'theme' , theme ) ;
441-
442- // Update icon
443- icon . textContent = theme === 'dark' ? '☀️' : '🌙' ;
444- } ) ;
445-
446- //Review Section JS
447- const swiper = new Swiper ( ".review-swiper" , {
448- loop : true ,
449- slidesPerView : 1 ,
450- spaceBetween : 20 ,
451- navigation : {
452- nextEl : ".swiper-button-next" ,
453- prevEl : ".swiper-button-prev" ,
454- } ,
455- keyboard : {
456- enabled : true ,
457- } ,
458- mousewheel : {
459- forceToAxis : true ,
460- } ,
461- grabCursor : true ,
462- speed : 600 ,
463- } ) ;
464-
465-
466- //Scroll to top functionality
467- const scrollToTopBtn = document . getElementById ( "scrollToTopBtn" ) ;
468-
469- // Show button when user scrolls down
470- window . addEventListener ( "scroll" , ( ) => {
471- scrollToTopBtn . style . display = window . scrollY > 300 ? "block" : "none" ;
472- } ) ;
473-
474- // Scroll to top smoothly
475- scrollToTopBtn . addEventListener ( "click" , ( ) => {
476- window . scrollTo ( {
477- top : 0 ,
478- behavior : "smooth"
479- } ) ;
480- } ) ;
481-
408+ //Review Section JS
409+ const swiper = new Swiper ( ".review-swiper" , {
410+ loop : true ,
411+ slidesPerView : 1 ,
412+ spaceBetween : 20 ,
413+ navigation : {
414+ nextEl : ".swiper-button-next" ,
415+ prevEl : ".swiper-button-prev" ,
416+ } ,
417+ keyboard : {
418+ enabled : true ,
419+ } ,
420+ mousewheel : {
421+ forceToAxis : true ,
422+ } ,
423+ grabCursor : true ,
424+ speed : 600 ,
425+ } ) ;
426+
0 commit comments