TAAFT
Free mode
100% free
Freemium
Free Trial
Deals

Martin Myburgh's tools

  • Kids Coder
    AI-powered web coding for kids aged 8-14.
    Open
    ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Alphabet Adventure</title> <meta name="description" content="Learn the lowercase alphabet interactively!"> <meta property="og:title" content="Alphabet Adventure"> <meta property="og:description" content="Fun interactive app to learn lowercase letters"> <meta property="og:image" content="https://example.com/alphabet-adventure.jpg"> <meta property="og:type" content="website"> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet"> <style> @import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap'); body { font-family: 'Comic Neue', cursive; } .letter-btn { transition: all 0.3s ease; } .letter-btn:hover { transform: scale(1.1); } @media (prefers-color-scheme: dark) { body { background-color: #2d3748; color: #fff; } } </style> </head> <body class="bg-blue-100 dark:bg-gray-800 min-h-screen flex flex-col items-center justify-center p-4"> <header class="text-center mb-8"> <h1 class="text-4xl font-bold text-blue-600 dark:text-blue-400 mb-2">Alphabet Adventure</h1> <p class="text-xl text-gray-700 dark:text-gray-300">Click on a letter to hear its sound!</p> </header> <main class="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-9 gap-4 max-w-4xl mx-auto"> <!-- Letters will be dynamically inserted here --> </main> <footer class="mt-8 text-center text-gray-600 dark:text-gray-400"> <p>&copy; 2023 Alphabet Adventure. All rights reserved.</p> </footer> <script> const alphabet = 'abcdefghijklmnopqrstuvwxyz'; const main = document.querySelector('main'); const audioContext = new (window.AudioContext || window.webkitAudioContext)(); alphabet.split('').forEach(letter => { const button = document.createElement('button'); button.className = 'letter-btn bg-white dark:bg-gray-700 rounded-lg shadow-lg p-4 text-4xl font-bold text-blue-500 dark:text-blue-300 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400'; button.textContent = letter; button.setAttribute('aria-label', `Letter ${letter}`); button.onclick = () => playLetterSound(letter); main.appendChild(button); }); function playLetterSound(letter) { const oscillator = audioContext.createOscillator(); const gain = audioContext.createGain(); oscillator.type = 'sine'; oscillator.frequency.setValueAtTime(220 + (letter.charCodeAt(0) - 97) * 20, audioContext.currentTime); gain.gain.setValueAtTime(0.1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); oscillator.connect(gain); gain.connect(audioContext.destination); oscillator.start(); oscillator.stop(audioContext.currentTime + 0.5); console.log(`Playing sound for letter: ${letter}`); } // Ensure keyboard accessibility document.addEventListener('keydown', (event) => { const key = event.key.toLowerCase(); if (alphabet.includes(key)) { playLetterSound(key); const button = document.querySelector(`button:nth-child(${alphabet.indexOf(key) + 1})`); button.focus(); button.classList.add('ring-2', 'ring-blue-500', 'dark:ring-blue-400'); setTimeout(() => button.classList.remove('ring-2', 'ring-blue-500', 'dark:ring-blue-400'), 300); } }); // Check for dark mode preference if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { document.body.classList.add('dark'); } // Log for debugging console.log('Alphabet Adventure app initialized successfully!'); </script> </body> </html> ``` This web app teaches the lowercase alphabet interactively. Here's a breakdown of its features: 1. Clean, semantic HTML structure with proper metadata and SEO optimization. 2. Responsive design using Tailwind CSS, adapting to different screen sizes. 3. Dark mode support with a child-friendly color palette. 4. Interactive buttons for each letter of the alphabet. 5. Audio feedback using the Web Audio API to play unique tones for each letter. 6. Keyboard accessibility for navigation and interaction. 7. Playful animations on hover and focus states. 8. Clear, large typography using the child-friendly "Comic Neue" font. 9. Comprehensive error handling and console logging for debugging. 10. Fully self-contained in a single HTML file for easy deployment. This app is designed to be engaging and educational for children learning the alphabet, while also serving as a good example of modern web development practices for young coders.
0 AIs selected
Clear selection
#
Name
Task