Skip to content
Open
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
56 changes: 37 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Will you be my Valentine?</title>
<title>Будешь моей валентинкой?</title>

<!-- Confetti library -->
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.3/dist/confetti.browser.min.js"></script>
Expand All @@ -22,11 +22,14 @@
body {
margin: 0;
min-height: 100svh;
display: grid;
place-items: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: radial-gradient(circle at top, var(--bg2), var(--bg1));
font-family: system-ui, sans-serif;
overflow: hidden;
overflow-y: auto; /* ← Разрешаем скролл вниз */
overflow-x: hidden;
padding: 16px;
}

Expand Down Expand Up @@ -108,6 +111,7 @@
.result {
display: none;
margin-top: 18px;
margin-bottom: 40px; /* ← Отступ снизу, чтобы текст не прилипал */
animation: pop .35s ease;
}

Expand All @@ -118,6 +122,8 @@

.fireworks {
width: min(380px, 90vw);
max-width: 100%; /* ← Чтобы видео не вылезало за экран */
height: auto;
margin: 0 auto;
display: block;
}
Expand Down Expand Up @@ -171,23 +177,32 @@
fill="#ff7aa2"/>
</svg>

<h1>nirali will you be my valentine?</h1>
<h1>Алисочка, будешь моей валентинкой? ❤️</h1>

<section class="button-zone" id="zone">
<button id="yesBtn">Yes</button>
<button id="noBtn">No</button>
<button id="yesBtn">Да ❤️</button>
<button id="noBtn">Нет</button>
</section>

<!-- HINT -->
<div class="hint" id="hint">“No” seems a bit shy 😈</div>
<div class="hint" id="hint">«Нет» стесняется, да? 😏</div>

<section class="result" id="result">
<h2>YAY! 🎉</h2>
<img
class="fireworks"
src="https://media.giphy.com/media/26ufdipQqU2lhNA4g/giphy.gif"
alt="Fireworks"
/>
<h2>УРА! (Изи, я и не сомневался) 🎉</h2>
<video
class="fireworks"
autoplay
loop
muted
playsinline
src="https://i.imgur.com/sKfKiM5.mp4"
alt="Наш фейерверк любви"
width="100%"
height="auto"
></video>
<p style="margin-top: 20px; font-size: 18px; opacity: 0.9;">
От Ромы 💌 14.02.2026
</p>
</section>
</main>

Expand Down Expand Up @@ -292,14 +307,17 @@ <h2>YAY! 🎉</h2>
/* ---------- YES CLICK ---------- */
yesBtn.addEventListener("click", () => {
zone.style.display = "none";
hint.style.display = "none"; // HIDE THE HINT
hint.style.display = "none";
result.style.display = "block";
resizeConfettiCanvas();
fullScreenConfetti();

// Запускаем видео после клика (важно для Safari)
const video = document.querySelector('.fireworks');
if (video) {
video.play().catch(() => {}); // Игнорируем ошибку, если autoplay заблокирован
}
});
</script>
</body>
</html>