multi-ai / ai-chat.html
aking96's picture
buat Multiple AI dengan tampilan :
05cceec verified
Raw History Blame Contribute Delete
7.98 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Chat - 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%);
}
.chat-container {
height: 60vh;
}
.message-bubble {
max-width: 80%;
}
</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 Chat Assistant</h1>
<p class="text-xl mb-8 max-w-2xl mx-auto" data-aos="fade-up" data-aos-delay="100">
Engage in natural conversations with our intelligent AI assistant
</p>
</div>
</div>
</header>
<section class="py-12 bg-white">
<div class="container mx-auto px-6">
<div class="max-w-4xl mx-auto bg-gray-50 rounded-xl shadow-md overflow-hidden chat-container flex flex-col">
<div class="p-6 flex-1 overflow-y-auto" id="chat-messages">
<div class="flex mb-4" data-aos="fade-right">
<div class="bg-purple-100 p-4 rounded-lg message-bubble">
<p>Hello! I'm your AI assistant. How can I help you today?</p>
<p class="text-xs text-gray-500 mt-2">AI Assistant • Just now</p>
</div>
</div>
</div>
<div class="border-t border-gray-200 p-4 bg-white">
<div class="flex items-center">
<input type="text" placeholder="Type your message..." class="flex-1 border border-gray-300 rounded-l-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500">
<button class="gradient-bg text-white px-6 py-3 rounded-r-lg hover:opacity-90 transition-all">
<i data-feather="send"></i>
</button>
</div>
</div>
</div>
<div class="mt-12 grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-gray-50 p-6 rounded-xl shadow-sm" data-aos="fade-up">
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
<i data-feather="zap" class="text-white"></i>
</div>
<h3 class="font-bold text-lg mb-2">Quick Responses</h3>
<p class="text-gray-600">Get instant answers to your questions with our lightning-fast AI.</p>
</div>
<div class="bg-gray-50 p-6 rounded-xl shadow-sm" data-aos="fade-up" data-aos-delay="100">
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
<i data-feather="book" class="text-white"></i>
</div>
<h3 class="font-bold text-lg mb-2">Knowledgeable</h3>
<p class="text-gray-600">Trained on vast amounts of data to provide accurate information.</p>
</div>
<div class="bg-gray-50 p-6 rounded-xl shadow-sm" data-aos="fade-up" data-aos-delay="200">
<div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
<i data-feather="clock" class="text-white"></i>
</div>
<h3 class="font-bold text-lg mb-2">24/7 Availability</h3>
<p class="text-gray-600">Always ready to help whenever you need assistance.</p>
</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();
// Simple chat functionality for demo
document.querySelector('button').addEventListener('click', function() {
const input = document.querySelector('input');
const message = input.value.trim();
if (message) {
const chatMessages = document.getElementById('chat-messages');
// User message
const userDiv = document.createElement('div');
userDiv.className = 'flex mb-4 justify-end';
userDiv.innerHTML = `
<div class="bg-purple-500 text-white p-4 rounded-lg message-bubble">
<p>${message}</p>
<p class="text-xs text-purple-200 mt-2">You • Just now</p>
</div>
`;
chatMessages.appendChild(userDiv);
// AI response (simulated)
setTimeout(() => {
const aiDiv = document.createElement('div');
aiDiv.className = 'flex mb-4';
aiDiv.innerHTML = `
<div class="bg-purple-100 p-4 rounded-lg message-bubble">
<p>I understand you're asking about "${message}". Here's what I can tell you about that topic.</p>
<p class="text-xs text-gray-500 mt-2">AI Assistant • Just now</p>
</div>
`;
chatMessages.appendChild(aiDiv);
chatMessages.scrollTop = chatMessages.scrollHeight;
}, 1000);
input.value = '';
chatMessages.scrollTop = chatMessages.scrollHeight;
}
});
</script>
</body>
</html>