-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
192 lines (176 loc) · 9.01 KB
/
index.html
File metadata and controls
192 lines (176 loc) · 9.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2025 → 2026 Countdown (EAT)</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap">
<style>
body { margin: 0; overflow: hidden; background: #000; color: cyan; font-family: 'Orbitron', sans-serif; height: 100vh; }
#background {
position: fixed; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4;
transition: opacity 3s ease; z-index: 1;
}
#grid {
position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(cyan 1px, transparent 1px), linear-gradient(90deg, cyan 1px, transparent 1px);
background-size: 50px 50px; opacity: 0.1; animation: gridMove 30s linear infinite; z-index: 2;
}
@keyframes gridMove { 0% { background-position: 0 0; } 100% { background-position: 50px 50px; } }
.countdown {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
text-align: center; z-index: 10; font-weight: 900;
}
.digits {
font-size: 8vw; letter-spacing: 10px; text-shadow: 0 0 20px cyan, 0 0 40px cyan;
animation: glow 4s infinite alternate;
}
.to-2026 {
font-size: 4vw; margin-top: 20px; text-shadow: 0 0 15px cyan; opacity: 0.9;
}
.happy-2026 {
font-size: 8vw; animation: pulse 2s infinite; text-shadow: 0 0 50px magenta, 0 0 100px cyan;
}
@keyframes glow {
from { text-shadow: 0 0 20px cyan; }
to { text-shadow: 0 0 50px cyan, 0 0 100px cyan; }
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.upload-btn {
position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%);
padding: 15px 40px; background: rgba(0,255,255,0.1); border: 2px solid cyan;
color: cyan; font-size: 1.8em; cursor: pointer; border-radius: 30px; z-index: 20;
box-shadow: 0 0 20px cyan; transition: all 0.3s;
}
.upload-btn:hover { background: rgba(0,255,255,0.3); box-shadow: 0 0 40px cyan; }
.banner {
position: absolute; bottom: 20px; width: 100%; text-align: center; z-index: 10;
font-size: 2.5em; text-shadow: 0 0 20px cyan; opacity: 0; transition: opacity 2s ease;
}
.banner.visible { opacity: 1; }
canvas { position: fixed; top: 0; left: 0; z-index: 15; pointer-events: none; }
</style>
</head>
<body>
<img id="background" src="" alt="Background">
<div id="grid"></div>
<canvas id="confetti"></canvas>
<div class="countdown">
<div class="digits" id="timer">Calculating...</div>
<div class="to-2026" id="label">TO 2026 (EAT)</div>
</div>
<button class="upload-btn" id="uploadBtn">Upload Your 2025 Moments (max 10)</button>
<input type="file" id="fileInput" multiple accept="image/*" style="display:none;">
<div class="banner" id="banner"></div>
<audio id="sound" src="https://www.soundjay.com/buttons/sounds/button-3.mp3"></audio>
<script>
// Target: Midnight January 1, 2026 in EAT (UTC+3) = 2025-12-31 21:00:00 UTC
const target = new Date("2025-12-31T21:00:00Z").getTime();
const timerEl = document.getElementById('timer');
const labelEl = document.getElementById('label');
const background = document.getElementById('background');
const banner = document.getElementById('banner');
const sound = document.getElementById('sound');
const confettiCanvas = document.getElementById('confetti');
const ctx = confettiCanvas.getContext('2d');
confettiCanvas.width = window.innerWidth;
confettiCanvas.height = window.innerHeight;
const defaultImages = [
"https://thumbs.dreamstime.com/b/futuristic-countdown-stage-glowing-neon-platform-displayed-perfect-new-year-s-technology-themes-cyberpunk-aesthetic-382179237.jpg",
"https://pikwizard.com/pw/medium/5925f3a22a6297759748159b491e3027.jpg",
"https://static.vecteezy.com/system/resources/thumbnails/073/629/030/small_2x/futuristic-neon-glow-the-year-2026-arrives-on-dark-digital-display-with-reflection-video.jpg",
"https://www.shutterstock.com/image-photo/cyberpunk-neon-new-year-cityscape-260nw-2704302969.jpg",
"https://thumbs.dreamstime.com/b/futuristic-neon-glowing-lightning-abstract-design-against-starry-space-background-new-year-technology-graphic-lights-illustrate-ai-412925902.jpg",
"https://t3.ftcdn.net/jpg/18/54/05/06/360_F_1854050675_3qUvY3ItnBfrzeDXreXQSAezL3UwlcBl.jpg",
"https://thumbs.dreamstime.com/b/happy-new-year-text-featuring-large-glowing-numbers-against-dark-futuristic-circuit-board-background-digital-technology-410564845.jpg",
"https://png.pngtree.com/thumb_back/fw800/background/20251022/pngtree-happy-new-year-2026-glowing-neon-futuristic-tunnel-celebration-image_19841747.webp"
];
let allImages = [...defaultImages];
let currentIndex = 0;
let is2026 = false;
function updateCountdown() {
const now = new Date().getTime();
const diff = target - now;
if (diff <= 0 && !is2026) {
is2026 = true;
timerEl.innerHTML = '<span class="happy-2026">Happy 2026!</span>';
labelEl.style.display = 'none';
banner.textContent = "Happy New Year! Glad to have you here";
banner.classList.add('visible');
sound.play();
launchConfetti();
return;
}
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const remainingAfterDays = diff % (1000 * 60 * 60 * 24);
const hours = Math.floor(remainingAfterDays / (1000 * 60 * 60));
const minutes = Math.floor((remainingAfterDays % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((remainingAfterDays % (1000 * 60)) / 1000);
let display = '';
if (days > 0) display += `${days}d `;
display += `${String(hours).padStart(2,'0')}:${String(minutes).padStart(2,'0')}:${String(seconds).padStart(2,'0')}`;
timerEl.textContent = display;
if (!is2026) {
banner.textContent = "And with that the 2025 Season comes to an end. Good Night";
banner.classList.add('visible');
}
requestAnimationFrame(updateCountdown);
}
function changeBackground() {
currentIndex = (currentIndex + 1) % allImages.length;
background.style.opacity = 0;
setTimeout(() => {
background.src = allImages[currentIndex];
background.style.opacity = 0.4;
}, 3000);
}
document.getElementById('uploadBtn').onclick = () => document.getElementById('fileInput').click();
document.getElementById('fileInput').onchange = (e) => {
const files = Array.from(e.target.files);
const remaining = 10 - (allImages.length - defaultImages.length);
files.slice(0, remaining).forEach(file => {
const reader = new FileReader();
reader.onload = (ev) => {
allImages.push(ev.target.result);
changeBackground();
};
reader.readAsDataURL(file);
});
};
function launchConfetti() {
let particles = [];
for (let i = 0; i < 400; i++) {
particles.push({
x: Math.random() * confettiCanvas.width,
y: -20,
vx: Math.random() * 6 - 3,
vy: Math.random() * 8 + 5,
color: ['cyan', 'magenta', 'lime', 'yellow'][Math.floor(Math.random()*4)],
size: Math.random() * 12 + 8
});
}
function animate() {
ctx.clearRect(0, 0, confettiCanvas.width, confettiCanvas.height);
particles.forEach((p, i) => {
p.x += p.vx;
p.y += p.vy;
p.vy += 0.2;
ctx.fillStyle = p.color;
ctx.fillRect(p.x, p.y, p.size, p.size);
if (p.y > confettiCanvas.height + 20) particles.splice(i, 1);
});
if (particles.length > 0) requestAnimationFrame(animate);
}
animate();
}
window.onload = () => {
background.src = allImages[0];
updateCountdown();
setInterval(changeBackground, 10000);
};
window.onresize = () => {
confettiCanvas.width = window.innerWidth;
confettiCanvas.height = window.innerHeight;
};
</script>
</body>
</html>