<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Evangelion Wallpaper Generator</title> <script src="https://c...content-available-to-author-only...s.com"></script> <style> @import url('https://f...content-available-to-author-only...s.com/css2?family=Inter:wght@400;700&display=swap'); body { font-family: 'Inter', sans-serif; background-color: #1a1a1a; color: #f0f0f0; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; } .container { background-color: #2a2a2a; padding: 2rem; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); max-width: 90%; width: 500px; text-align: center; } .title { font-size: 1.75rem; font-weight: 700; color: #a3e635; /* Neon green */ margin-bottom: 1rem; } .subtitle { color: #94a3b8; margin-bottom: 1.5rem; } #promptInput { width: 100%; padding: 0.75rem; border-radius: 0.5rem; border: 1px solid #4a4a4a; background-color: #333; color: #f0f0f0; outline: none; transition: all 0.3s; } #promptInput:focus { border-color: #a3e635; box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.3); } #generateButton { width: 100%; padding: 0.75rem; margin-top: 1rem; background-color: #a3e635; color: #1a1a1a; font-weight: 700; border-radius: 0.5rem; cursor: pointer; border: none; transition: background-color 0.3s, transform 0.2s; } #generateButton:hover { background-color: #84cc16; transform: translateY(-2px); } #generateButton:disabled { background-color: #4b5563; cursor: not-allowed; } #imageContainer { margin-top: 2rem; min-height: 300px; display: flex; justify-content: center; align-items: center; background-color: #1f1f1f; border-radius: 0.75rem; overflow: hidden; border: 2px solid #333; position: relative; } #generatedImage { max-width: 100%; max-height: 100%; border-radius: 0.5rem; display: none; } #loadingSpinner { display: none; color: #a3e635; font-size: 1.5rem; } .footer { margin-top: 1.5rem; color: #6b7280; font-size: 0.875rem; } </style> </head> <body class="bg-gray-900 text-white flex flex-col items-center justify-center min-h-screen p-4"> <!-- Main Container --> <div class="bg-gray-800 p-8 rounded-xl shadow-lg w-full max-w-2xl"> <h1 class="text-3xl font-bold text-center text-green-400 mb-2">Evangelion Wallpaper Generator</h1> <p class="text-center text-gray-400 mb-6">Create your own custom Evangelion-themed wallpapers using AI.</p> <!-- Input and Button Section --> <div class="space-y-4"> <textarea id="promptInput" rows="3" class="w-full p-3 rounded-lg bg-gray-700 text-white border-2 border-gray-600 focus:ring-green-500 focus:border-green-500 transition-all duration-300" placeholder="Describe the wallpaper you want, e.g., 'EVA Unit-01 fighting an angel in a destroyed city, dramatic lighting, high detail.'">A wallpaper of EVA Unit-01 from Neon Genesis Evangelion in a dynamic pose, in front of a ruined Tokyo-3 city.</textarea> <button id="generateButton" class="w-full py-3 rounded-lg bg-green-500 text-gray-900 font-bold hover:bg-green-600 transition-colors duration-300"> Generate Wallpaper </button> </div> <!-- Image and Loading Section --> <div class="mt-8 flex justify-center items-center h-96 bg-gray-700 rounded-lg border-2 border-gray-600 overflow-hidden"> <div id="loadingSpinner" class="hidden text-green-400 animate-spin"> <svg class="w-10 h-10" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m15.356-2H15m12 2a8.001 8.001 0 01-15.356-2H12"></path> </svg> </div> <img id="generatedImage" class="object-cover w-full h-full hidden" alt="Generated Evangelion Wallpaper"> <p id="placeholderText" class="text-gray-400 text-sm">Your generated wallpaper will appear here.</p> </div> <p class="text-center text-gray-500 text-sm mt-4">Powered by AI image generation.</p> </div> <script> document.addEventListener('DOMContentLoaded', () => { const promptInput = document.getElementById('promptInput'); const generateButton = document.getElementById('generateButton'); const imageContainer = document.getElementById('imageContainer'); const generatedImage = document.getElementById('generatedImage'); const loadingSpinner = document.getElementById('loadingSpinner'); const placeholderText = document.getElementById('placeholderText'); // Function to handle the image generation process async function generateImage() { const prompt = promptInput.value.trim() + " Evangelion wallpaper, neon genesis, detailed, high resolution, anime style"; // Show loading state generateButton.disabled = true; loadingSpinner.classList.remove('hidden'); placeholderText.classList.add('hidden'); generatedImage.classList.add('hidden'); try { const apiKey = ""; const apiUrl = `https://g...content-available-to-author-only...s.com/v1beta/models/imagen-3.0-generate-002:predict?key=${apiKey}`; // Construct the payload for the API call const payload = { instances: [{ prompt: prompt }], parameters: { "sampleCount": 1 } }; const response = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); // Check for a successful response if (!response.ok) { const errorData = await response.json(); throw new Error(`API error: ${JSON.stringify(errorData)}`); } const result = await response.json(); if (result.predictions && result.predictions.length > 0 && result.predictions[0].bytesBase64Encoded) { const base64Data = result.predictions[0].bytesBase64Encoded; const imageUrl = `data:image/png;base64,${base64Data}`; generatedImage.src = imageUrl; generatedImage.classList.remove('hidden'); } else { throw new Error("Invalid response from API."); } } catch (error) { console.error('Error generating image:', error); placeholderText.textContent = "Failed to generate image. Please try again."; placeholderText.classList.remove('hidden'); } finally { // Hide loading state loadingSpinner.classList.add('hidden'); generateButton.disabled = false; } } // Attach event listener to the button generateButton.addEventListener('click', generateImage); }); </script> </body> </html>
Standard input is empty
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Evangelion Wallpaper Generator</title> <script src="https://c...content-available-to-author-only...s.com"></script> <style> @import url('https://f...content-available-to-author-only...s.com/css2?family=Inter:wght@400;700&display=swap'); body { font-family: 'Inter', sans-serif; background-color: #1a1a1a; color: #f0f0f0; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; } .container { background-color: #2a2a2a; padding: 2rem; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); max-width: 90%; width: 500px; text-align: center; } .title { font-size: 1.75rem; font-weight: 700; color: #a3e635; /* Neon green */ margin-bottom: 1rem; } .subtitle { color: #94a3b8; margin-bottom: 1.5rem; } #promptInput { width: 100%; padding: 0.75rem; border-radius: 0.5rem; border: 1px solid #4a4a4a; background-color: #333; color: #f0f0f0; outline: none; transition: all 0.3s; } #promptInput:focus { border-color: #a3e635; box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.3); } #generateButton { width: 100%; padding: 0.75rem; margin-top: 1rem; background-color: #a3e635; color: #1a1a1a; font-weight: 700; border-radius: 0.5rem; cursor: pointer; border: none; transition: background-color 0.3s, transform 0.2s; } #generateButton:hover { background-color: #84cc16; transform: translateY(-2px); } #generateButton:disabled { background-color: #4b5563; cursor: not-allowed; } #imageContainer { margin-top: 2rem; min-height: 300px; display: flex; justify-content: center; align-items: center; background-color: #1f1f1f; border-radius: 0.75rem; overflow: hidden; border: 2px solid #333; position: relative; } #generatedImage { max-width: 100%; max-height: 100%; border-radius: 0.5rem; display: none; } #loadingSpinner { display: none; color: #a3e635; font-size: 1.5rem; } .footer { margin-top: 1.5rem; color: #6b7280; font-size: 0.875rem; } </style> </head> <body class="bg-gray-900 text-white flex flex-col items-center justify-center min-h-screen p-4"> <!-- Main Container --> <div class="bg-gray-800 p-8 rounded-xl shadow-lg w-full max-w-2xl"> <h1 class="text-3xl font-bold text-center text-green-400 mb-2">Evangelion Wallpaper Generator</h1> <p class="text-center text-gray-400 mb-6">Create your own custom Evangelion-themed wallpapers using AI.</p> <!-- Input and Button Section --> <div class="space-y-4"> <textarea id="promptInput" rows="3" class="w-full p-3 rounded-lg bg-gray-700 text-white border-2 border-gray-600 focus:ring-green-500 focus:border-green-500 transition-all duration-300" placeholder="Describe the wallpaper you want, e.g., 'EVA Unit-01 fighting an angel in a destroyed city, dramatic lighting, high detail.'">A wallpaper of EVA Unit-01 from Neon Genesis Evangelion in a dynamic pose, in front of a ruined Tokyo-3 city.</textarea> <button id="generateButton" class="w-full py-3 rounded-lg bg-green-500 text-gray-900 font-bold hover:bg-green-600 transition-colors duration-300"> Generate Wallpaper </button> </div> <!-- Image and Loading Section --> <div class="mt-8 flex justify-center items-center h-96 bg-gray-700 rounded-lg border-2 border-gray-600 overflow-hidden"> <div id="loadingSpinner" class="hidden text-green-400 animate-spin"> <svg class="w-10 h-10" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m15.356-2H15m12 2a8.001 8.001 0 01-15.356-2H12"></path> </svg> </div> <img id="generatedImage" class="object-cover w-full h-full hidden" alt="Generated Evangelion Wallpaper"> <p id="placeholderText" class="text-gray-400 text-sm">Your generated wallpaper will appear here.</p> </div> <p class="text-center text-gray-500 text-sm mt-4">Powered by AI image generation.</p> </div> <script> document.addEventListener('DOMContentLoaded', () => { const promptInput = document.getElementById('promptInput'); const generateButton = document.getElementById('generateButton'); const imageContainer = document.getElementById('imageContainer'); const generatedImage = document.getElementById('generatedImage'); const loadingSpinner = document.getElementById('loadingSpinner'); const placeholderText = document.getElementById('placeholderText'); // Function to handle the image generation process async function generateImage() { const prompt = promptInput.value.trim() + " Evangelion wallpaper, neon genesis, detailed, high resolution, anime style"; // Show loading state generateButton.disabled = true; loadingSpinner.classList.remove('hidden'); placeholderText.classList.add('hidden'); generatedImage.classList.add('hidden'); try { const apiKey = ""; const apiUrl = `https://g...content-available-to-author-only...s.com/v1beta/models/imagen-3.0-generate-002:predict?key=${apiKey}`; // Construct the payload for the API call const payload = { instances: [{ prompt: prompt }], parameters: { "sampleCount": 1 } }; const response = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); // Check for a successful response if (!response.ok) { const errorData = await response.json(); throw new Error(`API error: ${JSON.stringify(errorData)}`); } const result = await response.json(); if (result.predictions && result.predictions.length > 0 && result.predictions[0].bytesBase64Encoded) { const base64Data = result.predictions[0].bytesBase64Encoded; const imageUrl = `data:image/png;base64,${base64Data}`; generatedImage.src = imageUrl; generatedImage.classList.remove('hidden'); } else { throw new Error("Invalid response from API."); } } catch (error) { console.error('Error generating image:', error); placeholderText.textContent = "Failed to generate image. Please try again."; placeholderText.classList.remove('hidden'); } finally { // Hide loading state loadingSpinner.classList.add('hidden'); generateButton.disabled = false; } } // Attach event listener to the button generateButton.addEventListener('click', generateImage); }); </script> </body> </html>