comem / index.html
admingeorge's picture
Add 3 files
d2c6a1f verified
Raw History Blame Contribute Delete
16.7 kB
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cartão de Aniversário Interativo</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Poppins:wght@300;400;600&display=swap');
body {
font-family: 'Poppins', sans-serif;
background-color: #f0f8ff;
}
.card {
perspective: 1000px;
transition: all 0.5s ease;
}
.card-inner {
transform-style: preserve-3d;
transition: transform 0.8s;
}
.card:hover .card-inner {
transform: rotateY(10deg) rotateX(5deg);
}
.birthday-text {
font-family: 'Dancing Script', cursive;
}
.confetti {
position: absolute;
width: 10px;
height: 10px;
background-color: #FFD700;
opacity: 0;
}
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-20px); }
100% { transform: translateY(0px); }
}
.floating {
animation: float 3s ease-in-out infinite;
}
.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }
.share-dropdown {
display: none;
position: absolute;
right: 0;
top: 100%;
margin-top: 8px;
background: white;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
z-index: 10;
min-width: 200px;
}
.share-dropdown.show {
display: block;
animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
.toast {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.8);
color: white;
padding: 12px 24px;
border-radius: 8px;
z-index: 1000;
display: none;
}
.toast.show {
display: block;
animation: slideUp 0.5s ease-out;
}
@keyframes slideUp {
from { bottom: -50px; opacity: 0; }
to { bottom: 20px; opacity: 1; }
}
</style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
<div class="max-w-2xl w-full">
<div class="card bg-white rounded-3xl shadow-2xl overflow-hidden">
<div class="card-inner">
<!-- Card Front -->
<div class="relative">
<div class="absolute inset-0 bg-gradient-to-br from-blue-100 to-amber-100 opacity-70"></div>
<div class="relative z-10 p-8">
<div class="flex justify-between items-start">
<div>
<h1 class="text-4xl md:text-5xl font-bold text-blue-600 birthday-text">Feliz Aniversário!</h1>
<p class="text-gray-600 mt-2">Um dia especial merece uma celebração especial</p>
</div>
<div class="w-16 h-16 rounded-full bg-blue-200 flex items-center justify-center shadow-lg">
<i class="fas fa-birthday-cake text-3xl text-blue-600 floating"></i>
</div>
</div>
<div class="mt-8 flex flex-col md:flex-row gap-6">
<div class="flex-1">
<div class="bg-white bg-opacity-80 rounded-2xl p-6 shadow-lg h-full">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Personalize seu cartão</h2>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Nome do Aniversariante</label>
<input type="text" id="nameInput" class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="Digite o nome">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Mensagem Personalizada</label>
<textarea id="messageInput" rows="3" class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="Digite sua mensagem especial"></textarea>
</div>
<button onclick="updateCard()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-300 transform hover:scale-105">
Atualizar Cartão
</button>
</div>
</div>
</div>
<div class="flex-1">
<div class="bg-white bg-opacity-80 rounded-2xl p-6 shadow-lg h-full flex flex-col">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-semibold text-gray-800">Seu Cartão</h2>
<div class="relative">
<button id="shareBtn" class="hidden bg-gray-100 hover:bg-gray-200 text-gray-800 p-2 rounded-full transition duration-200">
<i class="fas fa-share-alt"></i>
</button>
<div id="shareDropdown" class="share-dropdown">
<div class="p-2">
<button onclick="shareOnWhatsApp()" class="w-full text-left px-4 py-2 hover:bg-gray-100 rounded flex items-center">
<i class="fab fa-whatsapp text-green-500 mr-2"></i> Compartilhar no WhatsApp
</button>
<button onclick="copyShareLink()" class="w-full text-left px-4 py-2 hover:bg-gray-100 rounded flex items-center">
<i class="fas fa-link text-blue-500 mr-2"></i> Copiar link
</button>
</div>
</div>
</div>
</div>
<div id="cardPreview" class="flex-1 flex flex-col items-center justify-center bg-gradient-to-br from-blue-50 to-amber-50 rounded-xl p-6 relative overflow-hidden">
<div class="absolute inset-0 flex items-center justify-center opacity-10">
<i class="fas fa-star text-9xl text-blue-300"></i>
</div>
<div class="relative z-10 text-center">
<p class="text-gray-600 mb-2">Querido(a)</p>
<h3 id="displayName" class="text-3xl font-bold text-blue-600 mb-6">[Nome]</h3>
<p class="birthday-text text-2xl text-gray-800 mb-4">Feliz Aniversário!</p>
<div id="displayMessage" class="text-gray-700 italic">
Que este dia seja tão especial quanto você é para mim!
</div>
<div class="mt-8 flex justify-center space-x-2">
<i class="fas fa-gift text-2xl text-amber-500 floating delay-1"></i>
<i class="fas fa-heart text-2xl text-red-500 floating delay-2"></i>
<i class="fas fa-star text-2xl text-yellow-500 floating delay-3"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="absolute bottom-0 left-0 right-0 h-2 bg-gradient-to-r from-blue-400 via-amber-400 to-blue-400"></div>
</div>
</div>
</div>
<div class="mt-6 text-center text-gray-500 text-sm">
<p>Clique no botão "Atualizar Cartão" para personalizar sua mensagem</p>
</div>
</div>
<button id="confettiBtn" class="fixed bottom-6 right-6 w-14 h-14 rounded-full bg-blue-600 text-white shadow-xl flex items-center justify-center hover:bg-blue-700 transition duration-300">
<i class="fas fa-sparkles text-2xl"></i>
</button>
<div id="toast" class="toast">
Link copiado para a área de transferência!
</div>
<script>
// Variável para armazenar o estado do cartão
let cardUpdated = false;
function updateCard() {
const nameInput = document.getElementById('nameInput');
const messageInput = document.getElementById('messageInput');
const displayName = document.getElementById('displayName');
const displayMessage = document.getElementById('displayMessage');
const shareBtn = document.getElementById('shareBtn');
// Update name
if(nameInput.value.trim() !== '') {
displayName.textContent = nameInput.value;
} else {
displayName.textContent = '[Nome]';
}
// Update message
if(messageInput.value.trim() !== '') {
displayMessage.textContent = messageInput.value;
} else {
displayMessage.textContent = 'Que este dia seja tão especial quanto você é para mim!';
}
// Small celebration effect
const card = document.querySelector('.card');
card.classList.add('animate-pulse');
setTimeout(() => {
card.classList.remove('animate-pulse');
}, 1000);
// Show share button
shareBtn.classList.remove('hidden');
cardUpdated = true;
}
// Confetti effect
document.getElementById('confettiBtn').addEventListener('click', function() {
createConfetti();
});
function createConfetti() {
const colors = ['#3b82f6', '#FFD700', '#10b981', '#f59e0b', '#6366f1', '#ec4899'];
for(let i = 0; i < 100; i++) {
const confetti = document.createElement('div');
confetti.className = 'confetti';
confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
confetti.style.left = Math.random() * 100 + 'vw';
confetti.style.top = -10 + 'px';
confetti.style.transform = `rotate(${Math.random() * 360}deg)`;
confetti.style.width = Math.random() * 10 + 5 + 'px';
confetti.style.height = Math.random() * 10 + 5 + 'px';
confetti.style.borderRadius = Math.random() > 0.5 ? '50%' : '0';
document.body.appendChild(confetti);
const animationDuration = Math.random() * 3 + 2;
confetti.style.transition = `top ${animationDuration}s linear, opacity ${animationDuration}s ease-out`;
confetti.style.opacity = '1';
setTimeout(() => {
confetti.style.top = '100vh';
confetti.style.opacity = '0';
}, 10);
setTimeout(() => {
confetti.remove();
}, animationDuration * 1000);
}
}
// Initialize with some random confetti
setTimeout(createConfetti, 1000);
// Share functionality
const shareBtn = document.getElementById('shareBtn');
const shareDropdown = document.getElementById('shareDropdown');
shareBtn.addEventListener('click', function(e) {
e.stopPropagation();
shareDropdown.classList.toggle('show');
});
// Close dropdown when clicking outside
document.addEventListener('click', function() {
shareDropdown.classList.remove('show');
});
function shareOnWhatsApp() {
if (!cardUpdated) {
showToast("Por favor, personalize o cartão primeiro!");
return;
}
const name = document.getElementById('displayName').textContent;
const message = document.getElementById('displayMessage').textContent;
const text = `Feliz Aniversário ${name}! ${message}\n\nConfira este cartão especial: ${window.location.href}`;
const encodedText = encodeURIComponent(text);
window.open(`https://wa.me/?text=${encodedText}`, '_blank');
}
function copyShareLink() {
if (!cardUpdated) {
showToast("Por favor, personalize o cartão primeiro!");
return;
}
// In a real app, you would generate a unique URL for the card
// For this demo, we'll just copy the current URL
navigator.clipboard.writeText(window.location.href)
.then(() => {
showToast("Link copiado para a área de transferência!");
})
.catch(err => {
showToast("Erro ao copiar o link. Tente novamente.");
console.error('Erro ao copiar: ', err);
});
}
function showToast(message) {
const toast = document.getElementById('toast');
toast.textContent = message;
toast.classList.add('show');
setTimeout(() => {
toast.classList.remove('show');
}, 3000);
}
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=admingeorge/comem" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>