Spaces:
Running
Running
File size: 11,257 Bytes
b914f0c f96e2a6 b914f0c f96e2a6 70156f6 06e4533 f96e2a6 7022b8d f96e2a6 7022b8d f96e2a6 06e4533 93d8ddc 06e4533 93d8ddc 06e4533 93d8ddc 06e4533 93d8ddc 06e4533 93d8ddc f96e2a6 93d8ddc 1041609 f96e2a6 b914f0c 5cf51be b914f0c 920e2c1 b914f0c 5cf51be b914f0c 23fe024 e887851 c661054 23fe024 6c42184 b914f0c 5cf51be b914f0c c661054 b914f0c a44305e e9140b3 b914f0c 920e2c1 a44305e b914f0c f96e2a6 b914f0c 2dfcd4b 34b0b56 b914f0c 2dfcd4b 34b0b56 ec8a8b5 f96e2a6 e9140b3 5dddd9e ac426fc 8ad1884 7f5536e cae2d47 f7a3339 86db6a5 8ad1884 b0973ff b6c082e 8ad1884 2a9c80b 8ad1884 86db6a5 8ad1884 ec8a8b5 8ad1884 86db6a5 8ad1884 bcb411b ec8a8b5 3d5d74c e9140b3 f96e2a6 b914f0c 93d8ddc b914f0c 93d8ddc b914f0c f96e2a6 b914f0c 70d3287 34b0b56 70d3287 b914f0c 920e2c1 b914f0c | 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 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | const chapters = document.querySelectorAll(".chapter");
let currentChapter = 0;
/* =========================
YOUR LITTLE THINGS
========================= */
const littleThings = [
"The way you miss me.",
"The way hours feel like seconds with you.",
"Your care towards me.",
"Talks about our future.",
"How you make me feel understood.",
"Your quiet kindness.",
"The comfort of just being with you.",
"How you make ordinary moments feel special."
];
const memories = [
"Locking eyes with one another.",
"Sitting together for the first time in Punjabi class.",
"Our little-little talks in Room-6.",
"Dropping you home for the first time — and you know what you did.",
"Our first outing together — Siswan Dam.",
"Me missing you for the first time during Independence Week holidays.",
"You asking me to be your teacher.",
"Exchanging phone numbers and the start of chatting.",
"Your Birthday Week.",
"Room-6 in the library, where everything felt quietly beautiful.",
"The change of library location — we got afraid maybe everything would change, but somehow we managed.",
"Going out to eat for the first time, just the two of us.",
"Our talks after 4pm in Room-6.",
"You telling me that you are attracted to me.",
"Finally on Oct 4, telling me all about your feelings.",
"Then came 11 Oct.",
"Holding hands for the first time.",
"Saying 'I love you' for the first time.",
"Saying bye to each other before Diwali holidays.",
"Trying to stay connected during the holidays.",
"Meetings after sunset.",
"Getting to know each other on a whole different level.",
"Our first hug at the rose garden — I still feel it.",
"Then came the long distance phase, which taught us many things.",
"You coming to see me on 19th December — best moment.",
"The time we spent apart and how it taught me how deeply I love you.",
"Finally coming back to Chandigarh.",
"Our first movie date.",
"Spending the whole day together on 6 Jan for the first time.",
"Joining the library.",
"You gifting me something for the first time.",
"19th Jan.",
"Again long distance.",
"You showing me all the photos and telling stories behind them.",
"Finally 1 Feb and 2 Feb."
];
let memoryIndex = 0;
/* =========================
SHOW MEMORY
========================= */
function showMemory() {
const memoryText = document.getElementById("memoryText");
if (memoryIndex < memories.length) {
memoryText.innerText = memories[memoryIndex];
memoryIndex++;
} else {
memoryText.innerText = "And so many more beautiful moments… 💖";
}
}
/* =========================
SHOW LITTLE THING
========================= */
function showLittleThing() {
const littleText = document.getElementById("littleText");
const random =
littleThings[Math.floor(Math.random() * littleThings.length)];
littleText.innerText = random;
}
/* =========================
TYPEWRITER
========================= */
const lines = [
"You are my peace.",
"My chaos.",
"My comfort.",
"My home.",
"And loving you is the easiest thing",
"I have ever done."
];
function startLoveLetter() {
const container = document.getElementById("typeText");
container.innerHTML = "";
lines.forEach((line, index) => {
const div = document.createElement("div");
div.textContent = line;
div.style.opacity = 0;
div.style.transition = "opacity 0.8s ease";
container.appendChild(div);
setTimeout(() => {
div.style.opacity = 1;
}, index * 800);
});
}
/* =========================
CHAPTER NAVIGATION
========================= */
function nextChapter() {
chapters[currentChapter].classList.remove("active");
currentChapter++;
if (currentChapter < chapters.length) {
chapters[currentChapter].classList.add("active");
if (currentChapter === 3) {
startLoveLetter();
showValentineMessage();
}
}
}
/* =========================
MOVING NO BUTTON
========================= */
function moveNo() {
const noBtn = document.getElementById("noBtn");
const x = Math.random() * 200 - 100;
const y = Math.random() * 200 - 100;
noBtn.style.transform = `translate(${x}px, ${y}px)`;
}
/* =========================
YES BUTTON EFFECT
========================= */
function sayYes() {
document.getElementById("finalMessage").innerText =
"You just made me the happiest person alive 💖";
// Hearts
for (let i = 0; i < 30; i++) {
createHeart();
}
// Sparkles
for (let i = 0; i < 25; i++) {
createSparkle();
}
// Confetti
for (let i = 0; i < 40; i++) {
createConfetti();
}
// Extra petals moment
for (let i = 0; i < 20; i++) {
createPetal();
}
document.getElementById("songBtn").style.display = "inline-block";
}
function showValentineMessage() {
const message = document.getElementById("valentineMessage");
const question = document.getElementById("proposalQuestion");
const buttons = document.getElementById("finalButtons");
message.innerHTML = `
<p><strong>Happy Valentine’s Day, my love.</strong></p>
<p>From Room-6 conversations to long distance nights,
from our first hand hold to every “I love you” —
every memory with you lives in my heart.</p>
<p>You are my peace. My comfort. My safest place.</p>
<p>Loving you isn’t just a feeling.</p>
<p>It’s home.</p>
<p>Today, I celebrate us.</p>
`;
// Fade message
setTimeout(() => {
message.style.opacity = 1;
}, 500);
// Fade question
setTimeout(() => {
question.style.opacity = 1;
}, 5000);
// Fade buttons
setTimeout(() => {
buttons.style.opacity = 1;
}, 6500);
}
const introLyrics = [
"This one is for you…",
"For every late night we stayed up talking…",
"For every moment I missed you…",
"For every time you held my hand…",
"And now… listen carefully ❤️"
];
const syncedLyrics = [
{ time: 1, text: "This one is for you…" },
{ time: 3.5, text: "For every late night we stayed up talking…" },
{ time: 7, text: "For every moment I missed you…" },
{ time: 10.5, text: "For every time you held my hand…" },
{ time: 14, text: "And now… listen carefully ❤️" },
{ time: 22, text: "Zulfan De Vichon Vich Ni" },
{ time: 25, text: "Karke Tu Cheer Nikaldi" },
{ time: 27, text: "Lagda Ae Canvas Vichon" },
{ time: 30, text: "Koyi Tasveer Nikaldi" },
{ time: 33, text: "Jidde Na Dissdi Pariye" },
{ time: 35, text: "Seene Chon Peed Nikaldi" },
{ time: 38, text: "Ranjhe Jehi Feeling Aundi" },
{ time: 41, text: "Kolon Jadon Heer Nikaldi" },
{ time: 43, text: "Tera Hunn Sadde Dil Vich" },
{ time: 46, text: "Rehna Te Banda Aa Ni" },
{ time: 49, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 51, text: "Kahna Te Banda Aa Ni" },
{ time: 54, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 57, text: "Kahna Te Banda Aa Ni" },
{ time: 60, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 86, text: "Lagda Ae Rab Ne Koyi" },
{ time: 89, text: "Shayari Jeondi Karti" },
{ time: 91, text: "Addhi Ankh Baddal Baaki" },
{ time: 93, text: "Saagar Ton Doongi Ghadti" },
{ time: 97, text: "Jithe Tussi Milde Ho Ji" },
{ time: 99, text: "Jannat Jehi Lagdi Dharti" },
{ time: 102, text: "Thodda Naa Jad Laine Aa" },
{ time: 105, text: "Lagda Main Aayat Padhti" },
{ time: 108, text: "Lagda Main Aayat Padhti" },
{ time: 110, text: "Mudd Mudd Ke Naam Tera Pher" },
{ time: 113, text: "Laina Te Banda Aa Ni" },
{ time: 115, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 118, text: "Kahna Te Banda Aa Ni" },
{ time: 121, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 123, text: "Kahna Te Banda Aa Ni" },
{ time: 126, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 142, text: "Balldi Tu Laat Ni Agg Di" },
{ time: 145, text: "Gabbru Parvana Kudiye" },
{ time: 147, text: "Ghoori Tere Mathe Fikki" },
{ time: 150, text: "Aashiq Nu Taana Kudiye" },
{ time: 153, text: "Labh Lainda Munda Tainu" },
{ time: 155, text: "Vekhan Da Bahana Kudiye" },
{ time: 158, text: "Ban’na Ae Tera Mara" },
{ time: 161, text: "Sohna Afsana Kudiye" },
{ time: 163, text: "Nakhra Hunn Tera Adiye" },
{ time: 166, text: "Sehna Te Banda Aa Ni" },
{ time: 169, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 172, text: "Kahna Te Banda Aa Ni" },
{ time: 174, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 177, text: "Kahna Te Banda Aa Ni" },
{ time: 179, text: "Taithon Vadh Sohna Koi Nahi" },
{ time: 182, text: "Kahna Te Banda Aa Ni" },
{ time: 185, text: "Taithon Vadh Sohna Koi Nahi" }
];
function startSong() {
const overlay = document.getElementById("songOverlay");
const audio = document.getElementById("loveSong");
const lyricsBox = document.getElementById("lyricsBox");
document.querySelector(".dance-container").style.display = "flex";
overlay.style.display = "flex";
audio.play();
audio.ontimeupdate = function () {
const currentTime = Math.floor(audio.currentTime);
for (let i = 0; i < syncedLyrics.length; i++) {
if (currentTime === syncedLyrics[i].time) {
lyricsBox.style.opacity = 0;
setTimeout(() => {
lyricsBox.innerText = syncedLyrics[i].text;
lyricsBox.style.opacity = 1;
}, 300);
}
}
};
}
function createHeart() {
const heart = document.createElement("div");
heart.innerText = "💖";
heart.style.position = "fixed";
heart.style.left = Math.random() * 100 + "vw";
heart.style.top = "100vh";
heart.style.fontSize = "20px";
heart.style.animation = "rise 2s ease forwards";
document.body.appendChild(heart);
setTimeout(() => heart.remove(), 2000);
}
/* =========================
HEART RISE ANIMATION
========================= */
const style = document.createElement("style");
style.innerHTML = `
@keyframes rise {
from { transform: translateY(0); opacity: 1; }
to { transform: translateY(-100vh); opacity: 0; }
}`;
document.head.appendChild(style);
/* =========================
FALLING PETALS
========================= */
function createPetal() {
const petal = document.createElement("div");
petal.classList.add("petal");
petal.innerText = "🌸";
petal.style.left = Math.random() * 100 + "vw";
petal.style.animationDuration = 5 + Math.random() * 5 + "s";
document.querySelector(".petals").appendChild(petal);
setTimeout(() => petal.remove(), 10000);
}
function createSparkle() {
const sparkle = document.createElement("div");
sparkle.classList.add("sparkle");
sparkle.innerText = "✨";
sparkle.style.left = Math.random() * 100 + "vw";
sparkle.style.top = Math.random() * 100 + "vh";
document.body.appendChild(sparkle);
setTimeout(() => sparkle.remove(), 1500);
}
function createConfetti() {
const confetti = document.createElement("div");
confetti.classList.add("confetti");
confetti.style.left = Math.random() * 100 + "vw";
confetti.style.backgroundColor =
["#ff4d88", "#ff99cc", "#ffd6e8", "#ff66a3"][
Math.floor(Math.random() * 4)
];
document.body.appendChild(confetti);
setTimeout(() => confetti.remove(), 3000);
}
setInterval(createPetal, 500);
/* Initialize */
chapters[0].classList.add("active");
|