חתונה
Gershy & Libby
28 May 2026 · יב סיון תשפ״ו
000
Days
00
Hours
00
Minutes
00
Seconds
Until they stand together under the chuppah
מזל טוב
/* ── Stars ── */ const canvas = document.getElementById('stars'); const ctx = canvas.getContext('2d'); let stars = []; function resize() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; stars = Array.from({ length: 180 }, () => ({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, r: Math.random() * 1.4 + 0.2, a: Math.random(), speed: Math.random() * 0.004 + 0.001, phase: Math.random() * Math.PI * 2 })); } let t = 0; function drawStars() { ctx.clearRect(0, 0, canvas.width, canvas.height); t += 0.012; stars.forEach(s => { const alpha = 0.15 + 0.65 * ((Math.sin(t * s.speed * 50 + s.phase) + 1) / 2); ctx.beginPath(); ctx.arc(s.x, s.y, s.r, 0, Math.PI * 2); ctx.fillStyle = `rgba(232, 208, 138, ${alpha})`; ctx.fill(); }); requestAnimationFrame(drawStars); } resize(); window.addEventListener('resize', resize); drawStars(); /* ── Floating particles ── */ for (let i = 0; i < 18; i++) { const p = document.createElement('div'); p.className = 'particle'; const x = Math.random() * 100; const dur = 12 + Math.random() * 20; const delay = Math.random() * 25; const dx = (Math.random() - 0.5) * 120; p.style.cssText = `left:${x}vw; bottom:-10px; --dx:${dx}px; animation-duration:${dur}s; animation-delay:${delay}s; width:${1+Math.random()*2}px; height:${1+Math.random()*2}px;`; document.body.appendChild(p); } /* ── Countdown ── */ const weddingDate = new Date('2026-05-28T18:00:00-04:00'); const dEl = document.getElementById('days'); const hEl = document.getElementById('hours'); const mEl = document.getElementById('minutes'); const sEl = document.getElementById('seconds'); const msgEl = document.getElementById('message'); function pad(n, len = 2) { return String(n).padStart(len, '0'); } function flip(el, newVal) { if (el.textContent !== newVal) { el.classList.remove('flip'); void el.offsetWidth; el.classList.add('flip'); el.textContent = newVal; } } function tick() { const now = new Date(); const diff = weddingDate - now; if (diff <= 0) { document.getElementById('countdown').style.display = 'none'; msgEl.textContent = ''; const married = document.createElement('div'); married.className = 'married-msg'; married.textContent = '🎉 Mazal Tov! 🎉'; msgEl.parentNode.insertBefore(married, msgEl); return; } const totalSec = Math.floor(diff / 1000); const s = totalSec % 60; const totalMin = Math.floor(totalSec / 60); const mn = totalMin % 60; const totalHr = Math.floor(totalMin / 60); const h = totalHr % 24; const d = Math.floor(totalHr / 24); flip(dEl, pad(d, 3)); flip(hEl, pad(h)); flip(mEl, pad(mn)); flip(sEl, pad(s)); } tick(); setInterval(tick, 1000); /* ── Yiddish wishes ── */ const wishes = [ { y: 'מזל טוב! זייט געזונט און גליקלעך!', t: 'Mazel tov! Be healthy and happy!' }, { y: 'זאָלט איר לעבן ביז הונדערט און צוואַנציק יאָר!', t: 'May you live to 120 years!' }, { y: 'אַ גליקלעכע חתונה! לחיים!', t: 'A happy wedding! To life!' }, { y: 'זאָלט איר האָבן פֿיל נחת פֿון אַלעמען!', t: 'May you have much joy from everyone!' }, { y: 'גאָט זאָל אײַך בענטשן מיט ליבע און שלום!', t: 'May God bless you with love and peace!' }, { y: 'אַ לאַנג לעבן, אַ ברייט לעבן!', t: 'A long life, a wide life!' }, { y: 'זאָלט איר שטענדיק זיין צוזאַמען מיט פֿרייד!', t: 'May you always be together with joy!' }, { y: 'ווי צוקער זיס זאָל זײַן אײַער לעבן!', t: 'Sweet as sugar shall your life be!' }, { y: 'זאָלט איר האָבן נאָר שמחות!', t: 'May you have only celebrations!' }, { y: 'ליב האָבן, לאַכן, לעבן — אַלץ צוזאַמען!', t: 'Love, laugh, live — all together!' }, ]; let lastWishIdx = -1; function showWish() { let idx; do { idx = Math.floor(Math.random() * wishes.length); } while (idx === lastWishIdx); lastWishIdx = idx; const w = wishes[idx]; const popup = document.getElementById('wishPopup'); document.getElementById('wishYiddish').textContent = w.y; document.getElementById('wishTranslation').textContent = w.t; popup.classList.add('show'); setTimeout(() => popup.classList.remove('show'), 5000); } setTimeout(() => { showWish(); setInterval(showWish, 60000); }, 3000);