| <!DOCTYPE html> |
| <html lang="en" class="dark"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>TextToVideo Magic Maker</title> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <script src="https://unpkg.com/feather-icons"></script> |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script> |
| <style> |
| @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); |
| body { |
| font-family: 'Poppins', sans-serif; |
| } |
| .gradient-text { |
| background-clip: text; |
| -webkit-background-clip: text; |
| color: transparent; |
| background-image: linear-gradient(90deg, #6366f1, #8b5cf6); |
| } |
| #vanta-bg { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 100%; |
| z-index: -1; |
| } |
| </style> |
| </head> |
| <body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col"> |
| <div id="vanta-bg"></div> |
| |
| <header class="py-6 px-4 sm:px-6 lg:px-8"> |
| <div class="container mx-auto flex justify-between items-center"> |
| <h1 class="text-2xl font-bold gradient-text">TextToVideo ✨</h1> |
| <button id="theme-toggle" class="p-2 rounded-full bg-gray-800 hover:bg-gray-700 transition"> |
| <i data-feather="moon"></i> |
| </button> |
| </div> |
| </header> |
|
|
| <main class="flex-grow flex items-center justify-center px-4 sm:px-6 lg:px-8"> |
| <div class="container mx-auto max-w-4xl"> |
| <div class="bg-gray-800 bg-opacity-80 backdrop-blur-lg rounded-xl p-6 sm:p-8 shadow-2xl"> |
| <h2 class="text-2xl font-bold mb-6 text-center gradient-text">Create Your Video Magic</h2> |
| |
| <div class="space-y-6"> |
| <div> |
| <label for="text-input" class="block text-sm font-medium mb-2">Enter your text</label> |
| <textarea id="text-input" rows="4" class="w-full px-4 py-3 bg-gray-700 border border-gray-600 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 text-white placeholder-gray-400 transition" placeholder="Type your text here to generate an amazing video..."></textarea> |
| </div> |
| |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> |
| <div> |
| <label class="block text-sm font-medium mb-2">Style</label> |
| <select class="w-full px-4 py-3 bg-gray-700 border border-gray-600 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 text-white transition"> |
| <option>Minimal</option> |
| <option>Modern</option> |
| <option>Vintage</option> |
| <option>Futuristic</option> |
| </select> |
| </div> |
| <div> |
| <label class="block text-sm font-medium mb-2">Duration (seconds)</label> |
| <input type="number" min="5" max="60" value="15" class="w-full px-4 py-3 bg-gray-700 border border-gray-600 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 text-white transition"> |
| </div> |
| </div> |
| |
| <div class="flex justify-center"> |
| <button id="generate-btn" class="px-8 py-3 bg-gradient-to-r from-indigo-500 to-purple-600 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 transition-all transform hover:scale-105 shadow-lg flex items-center"> |
| <i data-feather="play" class="mr-2"></i> |
| Generate Video |
| </button> |
| </div> |
| </div> |
| </div> |
| |
| <div id="preview-container" class="mt-12 hidden"> |
| <div class="bg-gray-800 bg-opacity-80 backdrop-blur-lg rounded-xl p-6 shadow-2xl"> |
| <h3 class="text-xl font-bold mb-4 text-center">Your Video Preview</h3> |
| <div class="aspect-w-16 aspect-h-9 bg-gray-700 rounded-lg overflow-hidden flex items-center justify-center"> |
| <div id="video-placeholder" class="text-center p-8"> |
| <i data-feather="film" class="w-16 h-16 text-gray-500 mx-auto mb-4"></i> |
| <p class="text-gray-400">Your video will appear here</p> |
| </div> |
| <video id="video-output" class="hidden w-full" controls></video> |
| </div> |
| <div class="mt-4 flex justify-center space-x-4"> |
| <button class="px-4 py-2 bg-indigo-600 rounded-lg hover:bg-indigo-700 transition flex items-center"> |
| <i data-feather="download" class="mr-2"></i> |
| Download |
| </button> |
| <button class="px-4 py-2 bg-gray-600 rounded-lg hover:bg-gray-700 transition flex items-center"> |
| <i data-feather="share-2" class="mr-2"></i> |
| Share |
| </button> |
| </div> |
| </div> |
| </div> |
| </div> |
| </main> |
|
|
| <footer class="py-6 px-4 sm:px-6 lg:px-8 text-center text-gray-400 text-sm"> |
| <p>© 2023 TextToVideo Magic Maker. All rights reserved.</p> |
| </footer> |
|
|
| <script> |
| feather.replace(); |
| |
| |
| VANTA.GLOBE({ |
| el: "#vanta-bg", |
| mouseControls: true, |
| touchControls: true, |
| gyroControls: false, |
| minHeight: 200.00, |
| minWidth: 200.00, |
| scale: 1.00, |
| scaleMobile: 1.00, |
| color: 0x6366f1, |
| backgroundColor: 0x111827, |
| size: 0.8 |
| }); |
| |
| |
| const themeToggle = document.getElementById('theme-toggle'); |
| themeToggle.addEventListener('click', () => { |
| document.documentElement.classList.toggle('dark'); |
| const icon = themeToggle.querySelector('i'); |
| if (document.documentElement.classList.contains('dark')) { |
| feather.icons['moon'].replace(icon); |
| } else { |
| feather.icons['sun'].replace(icon); |
| } |
| }); |
| |
| |
| const generateBtn = document.getElementById('generate-btn'); |
| const previewContainer = document.getElementById('preview-container'); |
| const videoPlaceholder = document.getElementById('video-placeholder'); |
| const videoOutput = document.getElementById('video-output'); |
| |
| generateBtn.addEventListener('click', () => { |
| const textInput = document.getElementById('text-input').value; |
| if (!textInput.trim()) { |
| alert('Please enter some text to generate a video'); |
| return; |
| } |
| |
| |
| generateBtn.disabled = true; |
| generateBtn.innerHTML = '<i data-feather="loader" class="animate-spin mr-2"></i> Generating...'; |
| feather.replace(); |
| |
| |
| setTimeout(() => { |
| previewContainer.classList.remove('hidden'); |
| videoPlaceholder.classList.add('hidden'); |
| videoOutput.classList.remove('hidden'); |
| |
| |
| |
| |
| generateBtn.disabled = false; |
| generateBtn.innerHTML = '<i data-feather="play" class="mr-2"></i> Generate Video'; |
| feather.replace(); |
| |
| |
| previewContainer.scrollIntoView({ behavior: 'smooth' }); |
| }, 3000); |
| }); |
| </script> |
| </body> |
| </html> |
|
|