Skip to content

Commit 20e15c3

Browse files
committed
Clean up main.js: remove conflicting typing animation, fix Konami code, remove cursor trail CSS
1 parent e61a363 commit 20e15c3

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

assets/js/main.js

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -107,38 +107,6 @@ document.addEventListener('DOMContentLoaded', function() {
107107
}
108108
});
109109

110-
// Typing animation for hero subtitle (optional enhancement)
111-
function typeWriter(element, text, speed = 100) {
112-
if (!element) return;
113-
114-
element.innerHTML = '';
115-
element.style.borderRight = '2px solid var(--gold-primary)';
116-
117-
let i = 0;
118-
function type() {
119-
if (i < text.length) {
120-
element.innerHTML += text.charAt(i);
121-
i++;
122-
setTimeout(type, speed);
123-
} else {
124-
// Remove cursor after typing
125-
setTimeout(() => {
126-
element.style.borderRight = 'none';
127-
}, 1000);
128-
}
129-
}
130-
type();
131-
}
132-
133-
// Initialize typing animation for hero subtitle after page load
134-
setTimeout(() => {
135-
const heroSubtitle = document.querySelector('.hero-subtitle');
136-
if (heroSubtitle) {
137-
const originalText = heroSubtitle.textContent;
138-
typeWriter(heroSubtitle, originalText, 80);
139-
}
140-
}, 1500);
141-
142110
// Dark mode toggle (future enhancement)
143111
function initDarkModeToggle() {
144112
const toggleButton = document.querySelector('.dark-mode-toggle');
@@ -200,7 +168,6 @@ document.addEventListener('DOMContentLoaded', function() {
200168

201169
if (JSON.stringify(konamiInput) === JSON.stringify(konamiCode)) {
202170
document.body.classList.add('konami-activated');
203-
cursorTrailEnabled = false; // Disable cursor trail during rainbow mode
204171

205172
// Create celebration particles
206173
for (let i = 0; i < 50; i++) {
@@ -229,7 +196,6 @@ document.addEventListener('DOMContentLoaded', function() {
229196
// Reset after 5 seconds
230197
setTimeout(() => {
231198
document.body.classList.remove('konami-activated');
232-
cursorTrailEnabled = true;
233199
konamiInput = [];
234200
}, 5000);
235201
}
@@ -279,24 +245,6 @@ style.textContent = `
279245
}
280246
}
281247
282-
.cursor-trail {
283-
position: fixed;
284-
width: 6px;
285-
height: 6px;
286-
background: var(--gold-primary);
287-
border-radius: 50%;
288-
pointer-events: none;
289-
z-index: 9999;
290-
animation: trailFade 0.8s ease-out forwards;
291-
}
292-
293-
@keyframes trailFade {
294-
to {
295-
opacity: 0;
296-
transform: scale(0);
297-
}
298-
}
299-
300248
.particle {
301249
position: absolute;
302250
width: 3px;

0 commit comments

Comments
 (0)