Veranstaltung mit Link
// Simple confetti generator
const colors = ['#f94144', '#f3722c', '#f9c74f', '#90be6d', '#577590'];
const numConfetti = 100;
for (let i = 0; i < numConfetti; i++) {
let confetti = document.createElement('div');
confetti.classList.add('confetti');
confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
confetti.style.left = Math.random() * window.innerWidth + 'px';
confetti.style.top = -10 + 'px';
confetti.style.opacity = Math.random();
confetti.style.transform = `rotate(${Math.random() * 360}deg)`;
confetti.style.animation = `fall ${2 + Math.random() * 3}s ease-out forwards`;
document.body.appendChild(confetti);
}
// Animation styles
const style = document.createElement('style');
style.innerHTML = `
@keyframes fall {
to {
transform: translateY(${window.innerHeight + 20}px) rotate(720deg);
opacity: 0;
}
}
`;
document.head.appendChild(style);