Skip to content
Open

Vi #71

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DHAN TECHFEST 2026</title>

<style>
*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:'Poppins',sans-serif;
}

body{
overflow:hidden;
background:#000;
color:white;
}

/* CANVAS BACKGROUND */
canvas{
position:fixed;
top:0;
left:0;
z-index:-1;
}

/* CONTENT */
.container{
min-height:100vh;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
text-align:center;
padding:20px;
}

h1{
font-size:3.5rem;
color:#f5c542; /* Gold */
letter-spacing:2px;
}

h2{
margin-top:10px;
font-weight:300;
color:#cfcfcf; /* Silver */
}

.date{
margin-top:15px;
color:#ffd369; /* Warm gold */
font-size:1.1rem;
}

button{
margin-top:30px;
padding:14px 36px;
border:none;
border-radius:30px;
font-size:1.1rem;
background:linear-gradient(135deg,#f5c542,#ffdf7e);
color:#000;
cursor:pointer;
transition:0.3s;
box-shadow:0 0 20px rgba(245,197,66,0.4);
}

button:hover{
transform:scale(1.05);
box-shadow:0 0 30px rgba(245,197,66,0.7);
}

@media(max-width:600px){
h1{font-size:2.5rem;}
}
</style>
</head>

<body>

<canvas id="techCanvas"></canvas>

<div class="container">
<h1>DHAN TECHFEST 2026</h1>
<h2>Dhanekula Institute of Engineers & Technology</h2>
<div class="date">innovations and creations</div>
<button onclick="alert('Registration opens soon!')">Register Now</button>
</div>

<script>
const canvas = document.getElementById("techCanvas");
const ctx = canvas.getContext("2d");

canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

window.addEventListener("resize", ()=>{
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});

const particles = [];
const PARTICLE_COUNT = 120;
const MAX_DISTANCE = 130;

class Particle{
constructor(){
this.x = Math.random()*canvas.width;
this.y = Math.random()*canvas.height;
this.vx = (Math.random()-0.5)*0.7;
this.vy = (Math.random()-0.5)*0.7;
this.radius = 2;
}

move(){
this.x += this.vx;
this.y += this.vy;

if(this.x < 0 || this.x > canvas.width) this.vx *= -1;
if(this.y < 0 || this.y > canvas.height) this.vy *= -1;
}

draw(){
ctx.beginPath();
ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
ctx.fillStyle = "#f5c542"; // Gold particles
ctx.fill();
}
}

for(let i=0;i<PARTICLE_COUNT;i++){
particles.push(new Particle());
}

function connect(){
for(let i=0;i<particles.length;i++){
for(let j=i;j<particles.length;j++){
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const dist = Math.sqrt(dx*dx + dy*dy);

if(dist < MAX_DISTANCE){
ctx.beginPath();
ctx.strokeStyle = `rgba(245,197,66,${1 - dist/MAX_DISTANCE})`;
ctx.lineWidth = 0.6;
ctx.moveTo(particles[i].x, particles[i].y);
ctx.lineTo(particles[j].x, particles[j].y);
ctx.stroke();
}
}
}
}

function animate(){
ctx.clearRect(0,0,canvas.width,canvas.height);

particles.forEach(p=>{
p.move();
p.draw();
});

connect();
requestAnimationFrame(animate);
}

animate();
</script>

</body>
</html>