1-
2-
31// loader
42
5-
63// Hide loader when the page fully loads
74window . addEventListener ( "load" , ( ) => {
85 const loader = document . getElementById ( 'page-loader' ) ;
@@ -14,16 +11,6 @@ window.addEventListener("load", () => {
1411 } , 500 ) ;
1512} ) ;
1613
17- // Optional: ability to manually hide if using SPA navigation
18- function hideLoaderNow ( ) {
19- const loader = document . getElementById ( 'page-loader' ) ;
20- if ( ! loader ) return ;
21- loader . classList . add ( 'hidden' ) ;
22- loader . setAttribute ( 'aria-hidden' , 'true' ) ;
23- }
24-
25-
26-
2714// Navigation functionality
2815document . addEventListener ( 'DOMContentLoaded' , function ( ) {
2916 const navToggle = document . getElementById ( 'navToggle' ) ;
@@ -138,23 +125,6 @@ document.addEventListener('DOMContentLoaded', function () {
138125 } ) ;
139126 } ) ;
140127
141- // Typing effect
142- function typeWriter ( element , text , speed = 100 ) {
143- let i = 0 ;
144- element . innerHTML = '' ;
145-
146- function type ( ) {
147- if ( i < text . length ) {
148- element . innerHTML += text . charAt ( i ) ;
149- i ++ ;
150- setTimeout ( type , speed ) ;
151- }
152- }
153- type ( ) ;
154- }
155- // Example usage:
156- // typeWriter(document.querySelector(".typing-name"), "Sakthivel");
157-
158128 // Image hover effects
159129 const heroImage = document . querySelector ( '.hero-image' ) ;
160130 const aboutImage = document . querySelector ( '.about-image-img' ) ;
@@ -173,11 +143,6 @@ document.addEventListener('DOMContentLoaded', function () {
173143 } ) ;
174144} ) ;
175145
176-
177-
178-
179-
180-
181146// Utility functions
182147function scrollToSection ( sectionId ) {
183148 const element = document . getElementById ( sectionId ) ;
@@ -314,50 +279,6 @@ function typeEffect() {
314279
315280document . addEventListener ( "DOMContentLoaded" , typeEffect ) ;
316281
317-
318- // Dynamic typing effect
319- function typeWriter ( element , text , speed = 100 ) {
320- let i = 0 ;
321- element . innerHTML = '' ;
322-
323- function type ( ) {
324- if ( i < text . length ) {
325- element . innerHTML += text . charAt ( i ) ;
326- i ++ ;
327- setTimeout ( type , speed ) ;
328- }
329- }
330-
331- type ( ) ;
332- }
333-
334-
335- // Initialize typing effect on hero title
336- // document.addEventListener('DOMContentLoaded', function() {
337- // const heroTitle = document.querySelector('.hero-title');
338- // if (heroTitle) {
339- // const originalText = heroTitle.innerHTML;
340- // setTimeout(() => {
341- // typeWriter(heroTitle, originalText, 50);
342- // }, 1000);
343- // }
344- // });
345-
346- // Mouse tracking effect for hero image
347- // document.addEventListener('mousemove', function (e) {
348- // const heroImage = document.querySelector('.hero-image-wrapper');
349- // if (heroImage) {
350- // const rect = heroImage.getBoundingClientRect();
351- // const x = e.clientX - rect.left - rect.width / 2;
352- // const y = e.clientY - rect.top - rect.height / 2;
353-
354- // const moveX = x * 0.01;
355- // const moveY = y * 0.01;
356-
357- // heroImage.style.transform = `translate(${moveX}px, ${moveY}px)`;
358- // }
359- // });
360-
361282// Intersection Observer for image animations
362283const imageObserver = new IntersectionObserver ( ( entries ) => {
363284 entries . forEach ( entry => {
@@ -381,8 +302,6 @@ document.addEventListener('DOMContentLoaded', function () {
381302 } ) ;
382303} ) ;
383304
384-
385-
386305document . querySelector ( ".contact-form" ) . addEventListener ( "submit" , function ( e ) {
387306 e . preventDefault ( ) ;
388307
0 commit comments