multi-ai / ai-image.html
aking96's picture
buat Multiple AI dengan tampilan :
05cceec verified
Raw History Blame Contribute Delete
11.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Image Generator - AI Hub</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.image-preview {
height: 400px;
background-color: #f3f4f6;
background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e7eb 75%), linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.prompt-input:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.3);
}
</style>
</head>
<body class="bg-gray-50">
<header class="gradient-bg text-white">
<div class="container mx-auto px-6 py-8">
<nav class="flex justify-between items-center">
<a href="index.html" class="text-2xl font-bold">AI Hub</a>
<div class="hidden md:flex space-x-8">
<a href="index.html" class="hover:text-gray-200 transition-all">Home</a>
<a href="index.html#features" class="hover:text-gray-200 transition-all">Features</a>
<a href="index.html#about" class="hover:text-gray-200 transition-all">About</a>
</div>
<button class="md:hidden">
<i data-feather="menu"></i>
</button>
</nav>
<div class="mt-12 text-center pb-12">
<h1 class="text-3xl md:text-5xl font-bold mb-6" data-aos="fade-down">AI Image Generator</h1>
<p class="text-xl mb-8 max-w-2xl mx-auto" data-aos="fade-up" data-aos-delay="100">
Transform your ideas into stunning visuals with our powerful AI
</p>
</div>
</div>
</header>
<section class="py-12 bg-white">
<div class="container mx-auto px-6">
<div class="max-w-4xl mx-auto">
<div class="image-preview rounded-xl mb-6 flex items-center justify-center" id="image-preview">
<div class="text-center p-8" id="placeholder-text">
<i data-feather="image" class="w-12 h-12 mx-auto text-gray-400 mb-4"></i>
<p class="text-gray-500">Your generated image will appear here</p>
</div>
</div>
<div class="bg-gray-50 p-6 rounded-xl shadow-sm">
<h3 class="font-bold text-lg mb-4">Describe what you want to generate</h3>
<textarea class="w-full border border-gray-300 rounded-lg px-4 py-3 prompt-input focus:outline-none focus:ring-2 focus:ring-purple-500 mb-4" rows="4" placeholder="A futuristic cityscape at sunset with flying cars and neon lights..."></textarea>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Style</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>Realistic</option>
<option>Digital Art</option>
<option>Painting</option>
<option>3D Render</option>
<option>Cartoon</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Aspect Ratio</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>Square (1:1)</option>
<option>Landscape (16:9)</option>
<option>Portrait (9:16)</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Quality</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>Standard</option>
<option>High</option>
<option>Ultra HD</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Lighting</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2">
<option>Natural</option>
<option>Studio</option>
<option>Dramatic</option>
<option>Neon</option>
</select>
</div>
</div>
<button class="gradient-bg text-white px-8 py-3 rounded-lg font-bold hover:opacity-90 transition-all w-full" id="generate-btn">
Generate Image
</button>
</div>
</div>
<div class="mt-16">
<h2 class="text-2xl font-bold text-center mb-8">Gallery of AI Creations</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
<div class="bg-gray-100 rounded-xl overflow-hidden shadow-sm" data-aos="fade-up">
<img src="http://static.photos/futuristic/640x360/1" alt="AI Generated Image" class="w-full h-48 object-cover">
<div class="p-4">
<p class="text-sm text-gray-600">"Cyberpunk city at night"</p>
</div>
</div>
<div class="bg-gray-100 rounded-xl overflow-hidden shadow-sm" data-aos="fade-up" data-aos-delay="100">
<img src="http://static.photos/fantasy/640x360/2" alt="AI Generated Image" class="w-full h-48 object-cover">
<div class="p-4">
<p class="text-sm text-gray-600">"Magical forest with glowing plants"</p>
</div>
</div>
<div class="bg-gray-100 rounded-xl overflow-hidden shadow-sm" data-aos="fade-up" data-aos-delay="200">
<img src="http://static.photos/portrait/640x360/3" alt="AI Generated Image" class="w-full h-48 object-cover">
<div class="p-4">
<p class="text-sm text-gray-600">"Renaissance style portrait"</p>
</div>
</div>
<div class="bg-gray-100 rounded-xl overflow-hidden shadow-sm" data-aos="fade-up" data-aos-delay="300">
<img src="http://static.photos/abstract/640x360/4" alt="AI Generated Image" class="w-full h-48 object-cover">
<div class="p-4">
<p class="text-sm text-gray-600">"Abstract geometric shapes"</p>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-6 md:mb-0">
<h3 class="text-xl font-bold">AI Hub</h3>
<p class="text-gray-400 mt-2">Empowering creativity through artificial intelligence.</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="facebook"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="instagram"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition-all"><i data-feather="linkedin"></i></a>
</div>
</div>
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 AI Hub. All rights reserved.</p>
</div>
</div>
</footer>
<script>
AOS.init();
feather.replace();
// Demo image generation functionality
document.getElementById('generate-btn').addEventListener('click', function() {
const preview = document.getElementById('image-preview');
const placeholder = document.getElementById('placeholder-text');
// Show loading state
placeholder.innerHTML = `
<div class="animate-pulse flex flex-col items-center">
<div class="w-12 h-12 bg-gray-300 rounded-full mb-4"></div>
<div class="h-4 bg-gray-300 rounded w-32"></div>
<div class="h-4 bg-gray-300 rounded w-48 mt-2"></div>
</div>
`;
// Simulate generation delay
setTimeout(() => {
preview.style.backgroundImage = 'url(http://static.photos/abstract/640x360/' + Math.floor(Math.random() * 20) + ')';
preview.style.backgroundSize = 'cover';
preview.style.backgroundPosition = 'center';
placeholder.style.display = 'none';
// Add download button
const downloadBtn = document.createElement('button');
downloadBtn.className = 'bg-white text-purple-600 px-6 py-2 rounded-lg font-medium shadow-md hover:bg-gray-100 transition-all';
downloadBtn.innerHTML = '<i data-feather="download" class="mr-2"></i> Download Image';
downloadBtn.onclick = function() {
alert('Image downloaded! (demo)');
};
const btnContainer = document.createElement('div');
btnContainer.className = 'mt-4';
btnContainer.appendChild(downloadBtn);
preview.appendChild(btnContainer);
feather.replace();
}, 2000);
});
</script>
</body>
</html>