Skip to content

Commit 41d6f30

Browse files
authored
Update index.html
1 parent 1ff8544 commit 41d6f30

1 file changed

Lines changed: 22 additions & 43 deletions

File tree

index.html

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,32 @@
1717
}
1818
/* basic */
1919
*{box-sizing:border-box}
20-
html,body{height:100%;margin:0;background:var(--bg);color:var(--white);font-family:var(--font);-webkit-font-smoothing:antialiased}
20+
html,body{height:100%;margin:0;background:var(--bg);color:var(--white);font-family:var(--font);-webkit-font-smoothing:antialiased;position:relative;overflow-x:hidden;}
2121
a{color:inherit;text-decoration:none}
22-
.container{max-width:1200px;margin:60px auto;padding:0 20px 120px}
22+
.container{max-width:1200px;margin:60px auto;padding:0 20px 120px;position:relative;z-index:2;}
23+
24+
/* OVERLAY */
25+
body::before {
26+
content: "";
27+
position: fixed;
28+
top:0;
29+
left:0;
30+
width:100%;
31+
height:100%;
32+
background: linear-gradient(135deg, rgba(255,0,0,0.15), rgba(255,127,0,0.15), rgba(255,255,0,0.15));
33+
background-size: 300% 300%;
34+
z-index:0;
35+
pointer-events:none;
36+
animation: overlayMove 15s linear infinite;
37+
}
38+
@keyframes overlayMove {
39+
0% {background-position:0% 50%;}
40+
50% {background-position:100% 50%;}
41+
100% {background-position:0% 50%;}
42+
}
2343

2444
/* HERO */
2545
.hero{position:relative;height:100vh;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden;background:var(--bg);}
26-
canvas#hero-bg{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;}
2746
.hero-inner{position:relative;z-index:2;}
2847

2948
/* NAME */
@@ -173,7 +192,6 @@
173192
</head>
174193
<body>
175194
<section class="hero" id="hero">
176-
<canvas id="hero-bg"></canvas>
177195
<div class="hero-inner">
178196
<h1 class="name">ctxzero</h1>
179197

@@ -393,45 +411,6 @@ <h2 class="section-heading">Get in Touch</h2>
393411
this.textContent='ctxzero.pentest@gmail.com'; this.dataset.shown='1';
394412
}
395413
});
396-
397-
/* particle background (kept from original, slight perf-friendly tweak) */
398-
const canvas = document.getElementById('hero-bg');
399-
const ctx = canvas.getContext('2d');
400-
function resizeCanvas(){ canvas.width = window.innerWidth; canvas.height = window.innerHeight; }
401-
resizeCanvas();
402-
let particles = [];
403-
const PCOUNT = Math.max(40, Math.min(180, Math.floor(window.innerWidth/10)));
404-
for(let i=0;i<PCOUNT;i++){
405-
particles.push({
406-
x:Math.random()*canvas.width,
407-
y:Math.random()*canvas.height,
408-
r:Math.random()*2+1,
409-
vx:(Math.random()-0.5)*0.6,
410-
vy:(Math.random()-0.5)*0.6
411-
});
412-
}
413-
function animate(){
414-
ctx.clearRect(0,0,canvas.width,canvas.height);
415-
particles.forEach(p=>{
416-
p.x += p.vx; p.y += p.vy;
417-
if(p.x < -10) p.x = canvas.width+10;
418-
if(p.x > canvas.width+10) p.x = -10;
419-
if(p.y < -10) p.y = canvas.height+10;
420-
if(p.y > canvas.height+10) p.y = -10;
421-
const grd = ctx.createRadialGradient(p.x,p.y,0,p.x,p.y,p.r*4);
422-
grd.addColorStop(0,'rgba(255,255,0,0.9)');
423-
grd.addColorStop(0.5,'rgba(255,127,0,0.55)');
424-
grd.addColorStop(1,'rgba(255,0,0,0.12)');
425-
ctx.fillStyle = grd;
426-
ctx.beginPath();
427-
ctx.arc(p.x,p.y,p.r,0,Math.PI*2);
428-
ctx.fill();
429-
});
430-
requestAnimationFrame(animate);
431-
}
432-
animate();
433-
window.addEventListener('resize', ()=>{ resizeCanvas(); });
434-
435414
</script>
436415
</body>
437416
</html>

0 commit comments

Comments
 (0)