babygenius / index.html
yasserrmd's picture
undefined - Initial Deployment
9763af5 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Baby Genius - Interactive Learning for Infants</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>
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0px); }
}
.floating {
animation: float 3s ease-in-out infinite;
}
.speech-bubble {
position: relative;
background: #f8fafc;
border-radius: 1rem;
}
.speech-bubble:after {
content: '';
position: absolute;
bottom: 0;
left: 20%;
width: 0;
height: 0;
border: 20px solid transparent;
border-top-color: #f8fafc;
border-bottom: 0;
border-left: 0;
margin-left: -10px;
margin-bottom: -20px;
}
.btn-press {
transition: all 0.2s;
}
.btn-press:active {
transform: scale(0.95);
}
</style>
</head>
<body class="bg-gradient-to-b from-blue-50 to-purple-50 min-h-screen">
<div class="container mx-auto px-4 py-8">
<!-- Header -->
<header class="text-center mb-8">
<h1 class="text-4xl md:text-5xl font-bold text-purple-600 mb-2">Baby Genius</h1>
<p class="text-lg text-gray-600">Interactive learning to boost your baby's IQ development</p>
</header>
<!-- Main Content -->
<main class="flex flex-col lg:flex-row gap-8">
<!-- Interactive Panel -->
<div class="lg:w-2/3 bg-white rounded-2xl shadow-lg p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-semibold text-purple-700">Learning Activities</h2>
<div class="flex items-center space-x-2">
<span class="text-sm text-gray-500">Volume</span>
<input type="range" min="0" max="100" value="70" class="w-24 accent-purple-500">
</div>
</div>
<!-- Activity Cards -->
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6">
<!-- Animal Sounds -->
<div class="bg-yellow-50 rounded-xl p-4 border border-yellow-100">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-yellow-200 flex items-center justify-center mr-3">
<i class="fas fa-paw text-yellow-600"></i>
</div>
<h3 class="font-medium text-gray-800">Animal Friends</h3>
</div>
<p class="text-sm text-gray-600 mb-3">Learn animal names and sounds</p>
<div class="grid grid-cols-3 gap-2">
<button onclick="playSound('cow')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-yellow-100">
<img src="https://cdn-icons-png.flaticon.com/512/1998/1998610.png" class="w-12 h-12 mb-1">
<span class="text-xs">Cow</span>
</button>
<button onclick="playSound('duck')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-yellow-100">
<img src="https://cdn-icons-png.flaticon.com/512/3176/3176291.png" class="w-12 h-12 mb-1">
<span class="text-xs">Duck</span>
</button>
<button onclick="playSound('lion')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-yellow-100">
<img src="https://cdn-icons-png.flaticon.com/512/616/616408.png" class="w-12 h-12 mb-1">
<span class="text-xs">Lion</span>
</button>
</div>
</div>
<!-- Numbers -->
<div class="bg-blue-50 rounded-xl p-4 border border-blue-100">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-blue-200 flex items-center justify-center mr-3">
<i class="fas fa-sort-numeric-up-alt text-blue-600"></i>
</div>
<h3 class="font-medium text-gray-800">Counting Fun</h3>
</div>
<p class="text-sm text-gray-600 mb-3">Learn numbers 1 to 5</p>
<div class="grid grid-cols-5 gap-1">
<button onclick="playNumber(1)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
<span class="text-xl font-bold text-blue-600">1</span>
</button>
<button onclick="playNumber(2)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
<span class="text-xl font-bold text-blue-600">2</span>
</button>
<button onclick="playNumber(3)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
<span class="text-xl font-bold text-blue-600">3</span>
</button>
<button onclick="playNumber(4)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
<span class="text-xl font-bold text-blue-600">4</span>
</button>
<button onclick="playNumber(5)" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-blue-100">
<span class="text-xl font-bold text-blue-600">5</span>
</button>
</div>
</div>
<!-- Colors -->
<div class="bg-red-50 rounded-xl p-4 border border-red-100">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-red-200 flex items-center justify-center mr-3">
<i class="fas fa-palette text-red-600"></i>
</div>
<h3 class="font-medium text-gray-800">Color World</h3>
</div>
<p class="text-sm text-gray-600 mb-3">Learn basic colors</p>
<div class="grid grid-cols-4 gap-2">
<button onclick="playColor('red')" class="btn-press rounded-lg p-3 bg-red-500 hover:bg-red-600"></button>
<button onclick="playColor('blue')" class="btn-press rounded-lg p-3 bg-blue-500 hover:bg-blue-600"></button>
<button onclick="playColor('yellow')" class="btn-press rounded-lg p-3 bg-yellow-400 hover:bg-yellow-500"></button>
<button onclick="playColor('green')" class="btn-press rounded-lg p-3 bg-green-500 hover:bg-green-600"></button>
</div>
</div>
<!-- Shapes -->
<div class="bg-green-50 rounded-xl p-4 border border-green-100">
<div class="flex items-center mb-3">
<div class="w-10 h-10 rounded-full bg-green-200 flex items-center justify-center mr-3">
<i class="fas fa-shapes text-green-600"></i>
</div>
<h3 class="font-medium text-gray-800">Shape Explorer</h3>
</div>
<p class="text-sm text-gray-600 mb-3">Learn basic shapes</p>
<div class="grid grid-cols-3 gap-2">
<button onclick="playShape('circle')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-green-100">
<div class="w-12 h-12 rounded-full bg-purple-400 mb-1"></div>
<span class="text-xs">Circle</span>
</button>
<button onclick="playShape('square')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-green-100">
<div class="w-12 h-12 bg-red-400 mb-1"></div>
<span class="text-xs">Square</span>
</button>
<button onclick="playShape('triangle')" class="btn-press bg-white rounded-lg p-2 flex flex-col items-center hover:bg-green-100">
<div class="w-0 h-0 border-l-[24px] border-l-transparent border-r-[24px] border-r-transparent border-b-[24px] border-b-blue-400 mb-1"></div>
<span class="text-xs">Triangle</span>
</button>
</div>
</div>
</div>
<!-- Talking Button -->
<div class="text-center mt-8">
<button onclick="playRandomPhrase()" class="btn-press bg-purple-600 hover:bg-purple-700 text-white font-bold py-4 px-8 rounded-full shadow-lg transition-all duration-300 transform hover:scale-105">
<i class="fas fa-comment-dots text-xl mr-2"></i>
Talk to Baby!
</button>
</div>
</div>
<!-- Side Panel -->
<div class="lg:w-1/3">
<!-- Baby Character -->
<div class="bg-white rounded-2xl shadow-lg p-6 mb-6 text-center">
<div class="relative mb-4">
<img src="https://cdn-icons-png.flaticon.com/512/1864/1864593.png" class="w-32 h-32 mx-auto floating">
<div id="speechBubble" class="speech-bubble p-4 mb-4 hidden">
<p id="bubbleText" class="text-gray-800"></p>
</div>
</div>
<h3 class="text-xl font-semibold text-purple-700 mb-2">Meet Baby Genius!</h3>
<p class="text-gray-600 mb-4">I'll help your baby learn and grow smarter every day!</p>
<div class="bg-purple-50 rounded-lg p-3">
<div class="flex justify-between items-center mb-2">
<span class="text-sm font-medium text-purple-700">Today's Progress</span>
<span class="text-xs bg-purple-100 text-purple-800 py-1 px-2 rounded-full">3/5 activities</span>
</div>
<div class="w-full bg-purple-200 rounded-full h-2">
<div class="bg-purple-600 h-2 rounded-full" style="width: 60%"></div>
</div>
</div>
</div>
<!-- Benefits Section -->
<div class="bg-white rounded-2xl shadow-lg p-6">
<h3 class="text-xl font-semibold text-purple-700 mb-4">How This Helps Baby's IQ</h3>
<div class="space-y-4">
<div class="flex items-start">
<div class="bg-blue-100 p-2 rounded-lg mr-3">
<i class="fas fa-brain text-blue-600"></i>
</div>
<div>
<h4 class="font-medium text-gray-800">Cognitive Development</h4>
<p class="text-sm text-gray-600">Stimulates brain connections through interactive learning</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-yellow-100 p-2 rounded-lg mr-3">
<i class="fas fa-comments text-yellow-600"></i>
</div>
<div>
<h4 class="font-medium text-gray-800">Language Skills</h4>
<p class="text-sm text-gray-600">Builds vocabulary and speech patterns early</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-green-100 p-2 rounded-lg mr-3">
<i class="fas fa-lightbulb text-green-600"></i>
</div>
<div>
<h4 class="font-medium text-gray-800">Problem Solving</h4>
<p class="text-sm text-gray-600">Encourages cause-and-effect understanding</p>
</div>
</div>
</div>
</div>
<!-- Tips Section -->
<div class="bg-white rounded-2xl shadow-lg p-6 mt-6">
<h3 class="text-xl font-semibold text-purple-700 mb-4">Parent Tips</h3>
<div class="space-y-3">
<div class="flex items-start">
<div class="bg-purple-100 p-1 rounded-full mr-3 mt-1">
<i class="fas fa-check text-purple-600 text-xs"></i>
</div>
<p class="text-sm text-gray-600">Engage with your baby while using the activities</p>
</div>
<div class="flex items-start">
<div class="bg-purple-100 p-1 rounded-full mr-3 mt-1">
<i class="fas fa-check text-purple-600 text-xs"></i>
</div>
<p class="text-sm text-gray-600">Limit sessions to 10-15 minutes for best attention</p>
</div>
<div class="flex items-start">
<div class="bg-purple-100 p-1 rounded-full mr-3 mt-1">
<i class="fas fa-check text-purple-600 text-xs"></i>
</div>
<p class="text-sm text-gray-600">Repeat words and sounds to reinforce learning</p>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="mt-12 text-center text-gray-500 text-sm">
<p>© 2023 Baby Genius - Designed to nurture young minds</p>
<p class="mt-1">Recommended for babies 6 months to 3 years</p>
</footer>
</div>
<script>
// Baby phrases
const babyPhrases = [
"Hi baby! Can you say hi?",
"Look at the pretty colors!",
"What does the cow say? Moo!",
"1... 2... 3! Let's count!",
"Big smile! You're so smart!",
"Peek-a-boo! I see you!",
"Clap your hands! Yay!",
"Where's your nose? There it is!",
"The sun is yellow like a banana!",
"Let's sing a song! La la la!"
];
// Animal sounds
const animalSounds = {
cow: { phrase: "The cow says moo!", sound: "https://www.soundjay.com/mechanical/sounds/cow-moo-01.mp3" },
duck: { phrase: "The duck says quack!", sound: "https://www.soundjay.com/mechanical/sounds/duck-quacking-01.mp3" },
lion: { phrase: "The lion says roar!", sound: "https://www.soundjay.com/mechanical/sounds/lion-01.mp3" }
};
// Number phrases
const numberPhrases = [
"One little finger",
"Two little eyes",
"Three little ducks",
"Four wheels on the car",
"Five fingers on your hand"
];
// Color phrases
const colorPhrases = {
red: "Red like an apple!",
blue: "Blue like the sky!",
yellow: "Yellow like the sun!",
green: "Green like grass!"
};
// Shape phrases
const shapePhrases = {
circle: "Round and round like a circle!",
square: "Four equal sides make a square!",
triangle: "Three corners on a triangle!"
};
// Play random baby phrase
function playRandomPhrase() {
const randomIndex = Math.floor(Math.random() * babyPhrases.length);
const phrase = babyPhrases[randomIndex];
showSpeechBubble(phrase);
speak(phrase);
}
// Play animal sound
function playSound(animal) {
const animalData = animalSounds[animal];
showSpeechBubble(animalData.phrase);
const audio = new Audio(animalData.sound);
audio.play();
// Also speak the phrase
setTimeout(() => {
speak(animalData.phrase);
}, 2000);
}
// Play number
function playNumber(num) {
const phrase = numberPhrases[num - 1];
showSpeechBubble(phrase);
speak(phrase);
}
// Play color
function playColor(color) {
const phrase = colorPhrases[color];
showSpeechBubble(phrase);
speak(phrase);
}
// Play shape
function playShape(shape) {
const phrase = shapePhrases[shape];
showSpeechBubble(phrase);
speak(phrase);
}
// Show speech bubble
function showSpeechBubble(text) {
const bubble = document.getElementById('speechBubble');
const bubbleText = document.getElementById('bubbleText');
bubbleText.textContent = text;
bubble.classList.remove('hidden');
// Hide after 5 seconds
setTimeout(() => {
bubble.classList.add('hidden');
}, 5000);
}
// Text-to-speech function
function speak(text) {
if ('speechSynthesis' in window) {
const utterance = new SpeechSynthesisUtterance(text);
utterance.rate = 0.8; // Slower speed for babies
utterance.pitch = 1.2; // Higher pitch
window.speechSynthesis.speak(utterance);
} else {
console.log("Text-to-speech not supported");
}
}
// Initialize with a welcome message
window.onload = function() {
setTimeout(() => {
showSpeechBubble("Welcome to Baby Genius! Let's learn and play!");
speak("Welcome to Baby Genius! Let's learn and play!");
}, 1000);
};
</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=yasserrmd/babygenius" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>