Skip to content

Commit a1b35d7

Browse files
committed
refactor: Remove parallax scroll effects for steady professional appearance
1 parent 60410fe commit a1b35d7

1 file changed

Lines changed: 2 additions & 56 deletions

File tree

js/script.js

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
// ===================================
2-
// Floating Shapes Background
2+
// NO Floating Shapes - Removed for steady professional appearance
33
// ===================================
44

5-
function createFloatingShapes() {
6-
const shapesContainer = document.createElement('div');
7-
shapesContainer.className = 'floating-shapes';
8-
document.body.insertBefore(shapesContainer, document.body.firstChild);
9-
10-
const shapes = [
11-
{ type: 'circle', size: 100, top: '10%', left: '10%', duration: 20 },
12-
{ type: 'square', size: 80, top: '60%', left: '80%', duration: 25 },
13-
{ type: 'circle', size: 60, top: '80%', left: '20%', duration: 18 },
14-
{ type: 'square', size: 120, top: '30%', left: '70%', duration: 22 },
15-
{ type: 'circle', size: 90, top: '50%', left: '50%', duration: 30 }
16-
];
17-
18-
shapes.forEach((shape, index) => {
19-
const shapeEl = document.createElement('div');
20-
shapeEl.className = `shape ${shape.type}`;
21-
shapeEl.style.cssText = `
22-
width: ${shape.size}px;
23-
height: ${shape.size}px;
24-
top: ${shape.top};
25-
left: ${shape.left};
26-
animation-duration: ${shape.duration}s;
27-
animation-delay: ${index * 0.5}s;
28-
`;
29-
shapesContainer.appendChild(shapeEl);
30-
});
31-
}
32-
335
// ===================================
346
// Mobile Navigation Toggle
357
// ===================================
@@ -143,35 +115,9 @@ animateElements.forEach(el => {
143115
});
144116

145117
// ===================================
146-
// Parallax Effect on Scroll
118+
// NO Parallax Effects - Removed for steady appearance
147119
// ===================================
148120

149-
window.addEventListener('scroll', () => {
150-
const scrolled = window.pageYOffset;
151-
152-
// Parallax for hero section
153-
const hero = document.querySelector('.hero');
154-
if (hero) {
155-
const heroContent = hero.querySelector('.hero-content');
156-
if (heroContent) {
157-
heroContent.style.transform = `translateY(${scrolled * 0.3}px)`;
158-
}
159-
}
160-
161-
// Parallax for profile card
162-
const profileCard = document.querySelector('.profile-card');
163-
if (profileCard) {
164-
profileCard.style.transform = `translateY(${scrolled * 0.15}px) rotateY(${scrolled * 0.01}deg)`;
165-
}
166-
167-
// Parallax for floating shapes
168-
const shapes = document.querySelectorAll('.shape');
169-
shapes.forEach((shape, index) => {
170-
const speed = (index + 1) * 0.05;
171-
shape.style.transform = `translateY(${scrolled * speed}px) rotate(${scrolled * 0.1}deg)`;
172-
});
173-
});
174-
175121
// ===================================
176122
// Active Navigation Link
177123
// ===================================

0 commit comments

Comments
 (0)