Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
493 lines (380 loc) · 19.4 KB
/
Copy pathindex.html
File metadata and controls
493 lines (380 loc) · 19.4 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
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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="heart1.png" type="image/png">
<meta charset="UTF-8">
<base target="_top">
<title>Will you be my valentine 💖</title>
<!-- Fonts & Icons -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<link href="https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@500&display=swap" rel="stylesheet">
<style>:root{--ts:0.6s}#visitCounter{position:fixed;top:10px;right:10px;font-size:.8em;font-family:'Segoe UI',sans-serif;color:pink;opacity:.4;pointer-events:auto;cursor:pointer;z-index:999;user-select:none;transition:cursor 0.3s,opacity 0.3s}html,body{width:100%;height:100%;margin:0;background:#fff0;overflow:hidden}#yes-btn,#no-btn{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#yes-btn:focus,#no-btn:focus{outline:none}.heart{opacity:var(--start-opacity,1);transition:opacity 0.6s ease,filter 0.6s ease;filter:blur(0)}.heart.fade-out{opacity:0;filter:blur(4px)}.heart:hover::before{-webkit-animation-play-state:paused;border-radius:100%;opacity:0}.heart::before{content:"";display:block;transition:all 400ms;-webkit-animation:pulse 1.2s steps(1) infinite;width:15px;height:15px;margin:-15px 0 0 -15px;box-shadow:30px 15px #b10097,45px 15px #d700a0,75px 15px #f753b6,90px 15px #ff6ec4,15px 30px #a3008c,30px 30px #c400a8,45px 30px #cc4ca8,60px 30px #f063b5,75px 30px #f679c0,90px 30px #e655a4,105px 30px #ffa6d1,15px 45px #93417a,30px 45px #b45d96,45px 45px #d773b1,60px 45px #ed7dc0,75px 45px #ff94d0,90px 45px #f88dc2,105px 45px #ffaad5,15px 60px #ad6a97,30px 60px #c974ae,45px 60px #db7ebd,60px 60px #f790d3,75px 60px #ffaad8,90px 60px #f38dc6,105px 60px #ffc0e3,30px 75px #b0739f,45px 75px #d88cc0,60px 75px #ea91cf,75px 75px #f49cd8,90px 75px #ffaae1,45px 90px #cd91bb,60px 90px #e4a6cd,75px 90px #fbaedc,60px 105px #ddb1d2}@-webkit-keyframes pulse{50%{-webkit-filter:blur(1.4px);-webkit-transform:translate(-2px,2px)}}body{margin:0;min-height:100vh;background:#000;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}#rizzText{color:#fff;font-family:'Smooch Sans',sans-serif;font-size:2em;text-align:center;opacity:0;transition:opacity 0.8s ease;margin:0}.rizz-spinner{width:28px;height:28px;animation:spin 3s infinite linear;opacity:0;transition:opacity 0.8s ease;margin:8px 0;position:absolute}#rizzBtnWrapper{opacity:0;transition:opacity 0.8s ease;margin-top:8px;-webkit-tap-highlight-color:#fff0;-webkit-touch-callout:none;user-select:none;outline:none;touch-action:manipulation}#question,#rizzText{user-select:none;-webkit-user-select:none;-ms-user-select:none}.rizz-spinner::before{content:'';display:block;height:28px;width:5.6px;background:pink;position:absolute;left:50%;margin-left:-2.8px;animation:spin 0.5s infinite ease-in-out}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeSlideUp{from{opacity:0;transform:translateX(-50%) translateY(20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}.ripple-wrapper{position:relative;display:none;margin-top:120px;padding:10px;border-radius:2rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;z-index:1}.ripple{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:2rem;background:rgb(255 204 204 / .3);pointer-events:none;z-index:0;animation:rippleWave 2.5s ease-out forwards}.ripple-wrapper:hover::before{animation:rippleWave 2.5s ease-out forwards}@keyframes rippleWave{0%{transform:scale(.1);opacity:.4}60%{transform:scale(1.5);opacity:.15}100%{transform:scale(2);opacity:0}}.ripple-wrapper.clicked::before{animation:rippleWave 2.5s ease-out forwards}.box_button{position:relative;font-size:1.5rem;width:14rem;height:4.2rem;display:flex;align-items:center;justify-content:center;border-radius:2rem;border:2px solid #fff;background-color:#444;cursor:pointer;overflow:hidden;z-index:1;transition:background-color 0.3s ease;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.box_button:focus{outline:none}.box_button:hover{background-color:rgb(255 204 204 / .45)}.icon{color:#fff;font-size:1.8rem;margin-right:.5rem;transition:var(--ts)}.box_button:hover .icon{color:#FCC}.text{color:#FCC;font-family:'Smooch Sans',sans-serif;font-size:1.4rem}.ear{position:absolute;top:-15%;height:35%;width:20%;background:#fff;z-index:1}.ear::before,.ear::after{content:'';position:absolute;bottom:24%;height:10%;width:5%;border-radius:50%;background:#161616}.ear--left{left:-4%;border-radius:70% 30% 0% 0% / 100% 100% 0% 0%;transform:rotate(-10deg)}.ear--left::before,.ear--left::after{right:10%}.ear--left::after{transform:rotate(-45deg)}.ear--right{right:-4%;border-radius:30% 70% 0% 0% / 100% 100% 0% 0%;transform:rotate(10deg)}.ear--right::before,.ear--right::after{left:10%}.ear--right::after{transform:rotate(45deg)}.face{position:absolute;height:100%;width:100%;background:#030303;border-radius:50%;background:rgb(3 3 3 / .1);z-index:2}.eye{position:absolute;top:35%;height:30%;width:31%;background:#fff;border-radius:50% 50% 50% 50% / 60% 60% 40% 40%}.eye::after{content:'';position:absolute;top:0;left:0;height:0;width:100%;border-radius:0 0 50% 50% / 0 0 40% 40%;background:#161616;animation:blink 4s infinite ease-in}@keyframes blink{0%,90%{height:0}92.5%,97.5{height:100%}95%,100%{height:0}}.eye::before{content:'';position:absolute;top:60%;height:10%;width:15%;background:#fff;border-radius:50%}.eye--left{left:0}.eye--left::before{right:-5%}.eye--right{right:0}.eye--right::before{left:-5%}.eye-pupil{position:absolute;top:25%;height:50%;width:20%;background:#161616;border-radius:50%;animation:look-around 4s infinite}@keyframes look-around{0%,25%,100%{transform:translate(0,0)}5%,10%{transform:translate(50%,-25%)}15%,20%{transform:translate(-100%,-25%)}}.eye--left .eye-pupil{right:30%}.eye--right .eye-pupil{left:30%}.eye-pupil::after{content:'';position:absolute;top:30%;right:-5%;height:20%;width:35%;border-radius:50%;background:#fff}.muzzle{position:absolute;top:60%;left:50%;height:6%;width:10%;background:#fff;transform:translateX(-50%);clip-path:polygon(50% 100%,0 0,100% 0)}.cat{position:relative;width:120px;height:120px;margin-top:32px;margin-bottom:12px;transform:scale(1);overflow:visible}#wrapper h2{text-align:center;font-size:1.5em;color:#e94d58;margin:15px 0;-webkit-tap-highlight-color:#fff0;-webkit-touch-callout:none;user-select:none;outline:none;touch-action:manipulation}#wrapper button{width:150px;height:50px;font-size:1.1em;border-radius:30px;outline:none;cursor:pointer;border:2px solid #e94d58;box-shadow:0 2px 4px gray;transition:transform 0.2s ease;-webkit-tap-highlight-color:#fff0;-webkit-touch-callout:none;user-select:none;outline:none;touch-action:manipulation}#yes-btn{background:#e94d58;color:#fff}#no-btn{background:#fff;color:#e94d58;cursor:not-allowed}.pink-rizz{color:pink;font-weight:700;text-shadow:0 0 1px pink}</style>
</head>
<body>
<div id="visitCounter">.</div>
<!-- Container for hearts, behind all content -->
<div id="heartContainer" style="position: fixed; inset: 0; z-index: 0; pointer-events: none;"></div>
<!-- CAT with its own top margin -->
<div class="cat" style="position: absolute; top: 5vh; left: 50%; transform: translateX(-50%); z-index: 10;">
<div class="ear ear--left"></div>
<div class="ear ear--right"></div>
<div class="face">
<div class="eye eye--left">
<div class="eye-pupil"></div>
</div>
<div class="eye eye--right">
<div class="eye-pupil"></div>
</div>
<div class="muzzle"></div>
</div>
</div>
<!-- MAIN CONTENT WRAPPER (hidden until GIF loads) -->
<div id="mainContent" style="display: none; position: absolute; top: 25vh; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; z-index: 10;">
<!-- Center Block -->
<div style="display: flex; flex-direction: column; align-items: center; gap: 12px;">
<div id="rizzText" style="opacity:0;"></div>
<!-- SPINNER for initial gif load -->
<div id="initialSpinner" class="rizz-spinner"></div>
<!-- SPINNER for rizz reload -->
<div id="rizzSpinner" class="rizz-spinner" style="opacity:0; visibility:hidden;"></div>
<div class="ripple-wrapper" id="rizzBtnWrapper" style="opacity:0;">
<div class="box_button" id="box_button">
<div class="icon"><i class="fas fa-cat"></i></div>
<div class="text">not impressed?</div>
</div>
</div>
</div>
<!-- Question Block (styled like ripple button) -->
<div id="wrapper" style="margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; font-family: 'Smooch Sans', sans-serif;">
<h2 id="question" style="color: #e94d58; font-size: 2em; text-align: center;">Will you go out with me?</h2>
<img
id="gif"
alt="gif"
src="love.gif"
style="width: 240px; height: auto; pointer-events: none; user-select: none;"
/>
<div id="btn-group" style="display: flex; gap: 24px; margin-top: 20px;">
<button id="yes-btn" style="
padding: 12px 24px;
background: #ffc0cb;
color: white;
font-family: 'Smooch Sans', sans-serif;
font-weight: bold;
font-size: 1.2em;
border-radius: 2rem;
border: none;
cursor: pointer;
box-shadow: 0 3px 6px rgba(0,0,0,0.2);
transition: background 0.3s ease, transform 0.3s ease;
outline: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
">Yes</button>
<button id="no-btn" style="
padding: 12px 24px;
background: white;
color: #e94d58;
font-family: 'Smooch Sans', sans-serif;
font-size: 1.2em;
border-radius: 2rem;
border: 2px solid #e94d58;
cursor: pointer;
box-shadow: 0 3px 6px rgba(0,0,0,0.2);
transition: transform 0.3s ease;
outline: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
">no</button>
</div>
</div>
<script>
const ua = navigator.userAgent.toLowerCase();
const isAndroid = ua.includes("android");
const isIPhone = ua.includes("iphone") || ua.includes("ipod");
const isMobile = isAndroid || isIPhone;
const fontSize = isMobile ? "5vw" : "2em";
const yeefontSize = isMobile ? "5vw" : "1.8em";
const question = document.getElementById("question");
const gif = document.getElementById("gif");
const yesBtn = document.getElementById("yes-btn");
const noBtn = document.getElementById("no-btn");
const rizz = document.getElementById("rizzText");
const spinner = document.getElementById("rizzSpinner");
const btnWrapper = document.getElementById("rizzBtnWrapper");
const heartContainer = document.getElementById('heartContainer');
const pleads = [
"Pleaseeeee 🥺",
"pleasshhhhhh <3",
"plsplsplsplsplspls 😭",
"pleeeeeeeeeaaaaassseeeeeeee :3",
"pretty please with cats on top 🐾",
"come onnnnn 😿",
"yes is just no without the n 😏",
"I'm begging here 😩",
"one little date won't hurt 🤧",
"uwu just say yes 💞"
];
let pleadIndex = 0;
let hasShownAll = false;
let yesClickCount = 0;
// Preload the audio
const loveAudio = new Audio("careless.mp3");
loveAudio.preload = "auto";
let noScale = 1;
let yesScale = 1;
// initial scale for YES button
// Preload GIFs
const sadGif = new Image();
sadGif.src = "sad.gif";
const yesGif1 = new Image();
yesGif1.src = "yes.gif";
const yesGif2 = new Image();
yesGif2.src = "yes2.gif";
window.addEventListener("DOMContentLoaded", async () => {
rizz.style.opacity = "0";
spinner.style.opacity = "1";
spinner.style.visibility = "visible";
const rizzText = document.getElementById("rizzText");
if (rizzText) rizzText.style.fontSize = fontSize;
try {
const res = await fetch("https://rizzapi.vercel.app/random");
const data = await res.json();
rizz.textContent = data.text || "You got no rizz 😔";
} catch (err) {
rizz.textContent = "Failed to fetch rizz 😿";
} finally {
spinner.style.opacity = "0";
setTimeout(() => {
spinner.style.visibility = "hidden";
rizz.style.opacity = "1";
btnWrapper.style.opacity = "1";
}, 500);
}
});
gif.onload = () => {
document.getElementById("mainContent").style.display = "flex";
const initSpin = document.getElementById("initialSpinner");
if (initSpin) {
initSpin.style.opacity = "0";
initSpin.style.visibility = "hidden";
}
};
if (gif.complete) {
gif.onload();
}
function waitForAudio(audio, callback) {
const checkReady = () => {
if (audio.readyState >= 4) {
callback();
} else {
setTimeout(checkReady, 50); // Check again shortly
}
};
checkReady();
}
document.getElementById("box_button").addEventListener("click", async () => {
rizz.style.opacity = "0";
spinner.style.visibility = "visible";
spinner.style.opacity = "1";
try {
await new Promise(resolve => setTimeout(resolve, 600));
const res = await fetch("https://rizzapi.vercel.app/random");
const data = await res.json();
const text = data.text || "You got no rizz 😔";
rizz.textContent = text;
if (yesClickCount >= 2) {
// Apply styles directly to the element
rizz.style.color = "#ffc0cb";
rizz.style.fontWeight = "bold";
rizz.style.textShadow = "0 0 1px #ffc0cb";
} else {
// Reset to default styles
rizz.style.color = "";
rizz.style.fontWeight = "";
rizz.style.textShadow = "";
}
} catch {
rizz.textContent = "Failed to fetch rizz 😿";
} finally {
spinner.style.opacity = "0";
rizz.style.opacity = "1";
setTimeout(() => {
spinner.style.visibility = "hidden";
}, 600);
}
});
let heartInterval;
function startHearts() {
heartInterval1 = setInterval(createHeart, 300); // 1st heart every 300ms
setTimeout(() => {
heartInterval2 = setInterval(createHeart, 300); // 2nd heart every 300ms, but delayed by 150ms
}, 150);
}
function stopHearts() {
clearInterval(heartInterval);
}
function createHeart() {
const heart = document.createElement("div");
heart.className = "heart";
// Base size and bigger random variation ±30px
const baseSize = 105;
const sizeVariation = (Math.random() * 60) - 30; // -30 to +30
const newSize = baseSize + sizeVariation;
heart.style.width = `${newSize}px`;
heart.style.height = `${newSize}px`;
heart.style.margin = `-${newSize / 2}px 0 0 -${newSize / 2}px`;
// Random opacity between 0.5 and 1
const baseOpacity = (0.5 + Math.random() * 0.5).toFixed(2);
heart.style.setProperty('--start-opacity', baseOpacity);
// Random rotation between 0 and 360 degrees
const randomAngle = Math.random() * 360;
heart.style.transform = `rotate(${randomAngle}deg)`;
// Random position anywhere on viewport
const vw = window.innerWidth;
const vh = window.innerHeight;
const posX = Math.random() * vw;
const posY = Math.random() * vh;
heart.style.position = "fixed";
heart.style.left = `${posX}px`;
heart.style.top = `${posY}px`;
heart.style.pointerEvents = "none";
document.body.appendChild(heart);
setTimeout(() => {
// Add fade-out class AFTER next repaint to ensure transition applies
requestAnimationFrame(() => {
heart.classList.add("fade-out");
});
setTimeout(() => heart.remove(), 700); // match transition + buffer
}, 2000);
}
yesBtn.addEventListener("click", () => {
yesClickCount++;
if (yesClickCount === 1) {
question.innerHTML = "Reallyyyy? 🥺✨";
gif.src = yesGif1.src;
} else if (yesClickCount === 2) {
question.innerHTML = `
<span style="color: #ffc0cb;white-space: nowrap;">
Yeeeeee see you in my dms (dm me xd) <br>ฅ ^ ≧∇≦^ ฅ
</span>`;
gif.src = yesGif2.src;
rizz.innerHTML = `<span style="color: #ffc0cb; font-weight: bold; text-shadow: 0 0 1px #ffc0cb;">${rizz.textContent}</span>`;
// Fade out buttons
yesBtn.style.transition = "opacity 0.5s ease";
noBtn.style.transition = "opacity 0.5s ease";
yesBtn.style.opacity = "0";
noBtn.style.opacity = "0";
setTimeout(() => {
yesBtn.remove();
noBtn.remove();
}, 600);
waitForAudio(loveAudio, () => {
loveAudio.currentTime = 0;
loveAudio.play().catch(() => {
console.warn("Autoplay failed — user interaction may be required.");
});
startHearts(); // ✅
});
updateCount();
}
});
noBtn.addEventListener("click", () => {
if (yesClickCount > 0) {
// Reset YES click count and pleading sequence
yesClickCount = 0;
pleadIndex = 0;
hasShownAll = false;
gif.src = sadGif.src;
}
if (noScale > 0.4) {
noScale -= 0.05;
noBtn.style.transform = `scale(${noScale})`;
}
// Linearly grow YES button by 10%
if (yesScale < 1.6) {
yesScale += 0.08;
yesBtn.style.transform = `scale(${yesScale})`;
}
// Update currentScale so growth continues on next NO
currentScale = 2 - (yesScale - 1) / 0.06;
// Update pleading text
let pleadText;
if (!hasShownAll) {
pleadText = pleads[pleadIndex++];
if (pleadIndex >= pleads.length) hasShownAll = true;
} else {
pleadText = pleads[Math.floor(Math.random() * pleads.length)];
}
question.textContent = pleadText;
gif.src = sadGif.src;
});
yesBtn.addEventListener("mouseover", () => {
yesBtn.style.background = "#ff99aa";
});
yesBtn.addEventListener("mouseout", () => {
yesBtn.style.background = "#ffc0cb";
});
const rippleWrapper = document.querySelector('.ripple-wrapper');
rippleWrapper.addEventListener('click', () => {
const ripple = document.createElement('div');
ripple.classList.add('ripple');
const oldRipple = rippleWrapper.querySelector('.ripple');
if (oldRipple) oldRipple.remove();
rippleWrapper.appendChild(ripple);
setTimeout(() => ripple.remove(), 2500);
});
function goFullScreen() {
const elem = document.documentElement;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
}
const rizzText = document.getElementById("rizzText");
if (rizzText) rizzText.style.fontSize = fontSize;
const question = document.getElementById("question");
if (question) question.style.fontSize = fontSize;
}
document.body.addEventListener("click", () => {
goFullScreen();
}, { once: true }); // only run once on first click
window.addEventListener('load', () => {
document.title = "Will you be my Valentine? 💖";
});
const counter = document.getElementById("visitCounter");
let clickedOnce = false;
function updateCount() {
fetch("https://script.google.com/macros/s/AKfycbymudnVAJefDqKU8RjKfAzFlTa5AS2VM22QhIdDLztr2YknM65dbPjDfRW9uRkyNCk5-Q/exec")
.then(res => res.text())
.then(count => {
counter.textContent =count;
});
}
counter.addEventListener("click", () => {
if (clickedOnce || yesClickCount < 2) return; // ❌ ignore if clicked before or less than 2 yeses
clickedOnce = true;
// visually remove "clickable" feel
counter.style.cursor = "default";
counter.style.opacity = "0.25";
fetch("https://script.google.com/macros/s/AKfycbymudnVAJefDqKU8RjKfAzFlTa5AS2VM22QhIdDLztr2YknM65dbPjDfRW9uRkyNCk5-Q/exec?mode=decrease")
.then(res => res.text())
.then(count => {
counter.textContent = count;
})
.catch(err => {
console.error("Counter fetch failed:", err);
});
});
</script>
</body>
</html>