dprat0821's picture
add pop up and logic for the chat button, raise a AI chat flow
3973817 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daniel's IT Consulting</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#fb923c',
dark: '#431407',
}
}
}
}
</script>
</head>
<body class="bg-gray-50">
<!-- Hero Section -->
<section class="bg-gradient-to-r from-orange-500 to-orange-700 text-white py-20">
<div class="container mx-auto px-4">
<div class="max-w-3xl mx-auto text-center">
<h1 class="text-4xl md:text-5xl font-bold mb-6">Transform Your Digital Infrastructure</h1>
<p class="text-xl mb-8">Expert IT consulting services tailored to accelerate your business growth and optimize your technology stack.</p>
<a href="#contact" class="bg-white text-orange-500 px-8 py-3 rounded-lg font-semibold hover:bg-orange-50 transition duration-300">Get Started</a>
</div>
</div>
</section>
<!-- Services Section -->
<section class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12 text-dark">Our Services</h2>
<div class="grid md:grid-cols-3 gap-8">
<!-- Service 1 -->
<div class="bg-gray-50 p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="text-orange-500 mb-4">
<i class="fas fa-server text-4xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">DevOps Solutions</h3>
<p class="text-gray-600">Streamline your development and operations with our cutting-edge DevOps strategies and tools implementation.</p>
</div>
<!-- Service 2 -->
<div class="bg-gray-50 p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="text-blue-600 mb-4">
<i class="fas fa-code text-4xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Full Stack Development</h3>
<p class="text-gray-600">End-to-end web and application development services to bring your ideas to life with modern technologies.</p>
</div>
<!-- Service 3 -->
<div class="bg-gray-50 p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="text-blue-600 mb-4">
<i class="fas fa-bug text-4xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Quality Assurance</h3>
<p class="text-gray-600">Comprehensive testing solutions to ensure your applications are reliable, secure, and perform at their best.</p>
</div>
</div>
</div>
</section>
<!-- Testimonials Section -->
<section class="py-16 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12 text-dark">What Our Clients Say</h2>
<div class="grid md:grid-cols-2 gap-8 max-w-6xl mx-auto">
<!-- Testimonial 1 -->
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="flex items-center mb-4">
<img src="http://static.photos/people/200x200/1" alt="Client" class="w-12 h-12 rounded-full mr-4">
<div>
<h4 class="font-semibold">John Smith</h4>
<p class="text-gray-500 text-sm">CEO, TechStart Inc.</p>
</div>
</div>
<p class="text-gray-700">"Daniel's team transformed our deployment pipeline, reducing our release cycle from weeks to days. Their DevOps expertise is unmatched."</p>
<div class="text-yellow-400 mt-3">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
</div>
<!-- Testimonial 2 -->
<div class="bg-white p-6 rounded-lg shadow-md">
<div class="flex items-center mb-4">
<img src="http://static.photos/people/200x200/2" alt="Client" class="w-12 h-12 rounded-full mr-4">
<div>
<h4 class="font-semibold">Sarah Johnson</h4>
<p class="text-gray-500 text-sm">CTO, Enterprise Solutions</p>
</div>
</div>
<p class="text-gray-700">"The application developed by Daniel exceeded our expectations. Their full stack developers delivered a robust solution ahead of schedule."</p>
<div class="text-yellow-400 mt-3">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star-half-alt"></i>
</div>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="py-16 bg-dark text-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Get In Touch</h2>
<div class="grid md:grid-cols-2 gap-8 max-w-6xl mx-auto">
<div>
<h3 class="text-xl font-semibold mb-4">Contact Information</h3>
<p class="mb-4"><i class="fas fa-map-marker-alt mr-3"></i> 123 Tech Street, Silicon Valley, CA 94025</p>
<p class="mb-4"><i class="fas fa-phone mr-3"></i> (555) 123-4567</p>
<p class="mb-6"><i class="fas fa-envelope mr-3"></i> contact@danielsitconsulting.com</p>
<div class="flex space-x-4">
<a href="#" class="text-white hover:text-orange-300"><i class="fab fa-twitter text-2xl"></i></a>
<a href="#" class="text-white hover:text-orange-700"><i class="fab fa-linkedin text-2xl"></i></a>
<a href="#" class="text-white hover:text-gray-400"><i class="fab fa-github text-2xl"></i></a>
</div>
</div>
<div>
<form class="bg-gray-800 p-6 rounded-lg">
<div class="mb-4">
<label for="name" class="block mb-2">Name</label>
<input type="text" id="name" class="w-full px-4 py-2 rounded bg-gray-700 border border-gray-600 focus:outline-none focus:border-blue-500">
</div>
<div class="mb-4">
<label for="email" class="block mb-2">Email</label>
<input type="email" id="email" class="w-full px-4 py-2 rounded bg-gray-700 border border-gray-600 focus:outline-none focus:border-blue-500">
</div>
<div class="mb-4">
<label for="message" class="block mb-2">Message</label>
<textarea id="message" rows="4" class="w-full px-4 py-2 rounded bg-gray-700 border border-gray-600 focus:outline-none focus:border-blue-500"></textarea>
</div>
<button type="submit" class="bg-orange-500 hover:bg-orange-600 text-white px-6 py-2 rounded-lg font-semibold transition duration-300">Send Message</button>
</form>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-gray-400 py-8">
<div class="container mx-auto px-4 text-center">
<p>&copy; 2023 Daniel's IT Consulting. All rights reserved.</p>
</div>
</footer>
<!-- AI Chat Button and Modal -->
<div class="fixed bottom-6 right-6">
<button id="chatButton" class="bg-orange-500 hover:bg-orange-600 text-white rounded-full p-4 shadow-lg transition duration-300">
<i data-feather="message-circle" class="w-6 h-6"></i>
</button>
</div>
<!-- Chat Modal -->
<div id="chatModal" class="fixed bottom-24 right-6 w-80 bg-white rounded-lg shadow-xl hidden flex flex-col" style="height: 500px;">
<div class="bg-orange-500 text-white p-3 rounded-t-lg flex justify-between items-center">
<h3 class="font-semibold">AI Assistant</h3>
<button id="closeChat" class="text-white hover:text-orange-200">
<i data-feather="x"></i>
</button>
</div>
<div id="chatMessages" class="flex-1 p-4 overflow-y-auto">
<div class="mb-4">
<div class="bg-gray-100 p-3 rounded-lg max-w-xs">
<p>Hello! I'm your AI assistant. How can I help you with your IT consulting needs today?</p>
</div>
</div>
</div>
<div class="p-3 border-t">
<div class="flex">
<input id="chatInput" type="text" placeholder="Type your message..."
class="flex-1 px-3 py-2 border rounded-l-lg focus:outline-none focus:ring-1 focus:ring-orange-500">
<button id="sendMessage" class="bg-orange-500 text-white px-4 py-2 rounded-r-lg hover:bg-orange-600">
<i data-feather="send"></i>
</button>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
feather.replace();
const chatButton = document.getElementById('chatButton');
const chatModal = document.getElementById('chatModal');
const closeChat = document.getElementById('closeChat');
const chatInput = document.getElementById('chatInput');
const sendMessage = document.getElementById('sendMessage');
const chatMessages = document.getElementById('chatMessages');
// Toggle chat modal
chatButton.addEventListener('click', function() {
chatModal.classList.toggle('hidden');
});
// Close chat
closeChat.addEventListener('click', function() {
chatModal.classList.add('hidden');
});
// Send message
sendMessage.addEventListener('click', sendChatMessage);
chatInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
sendChatMessage();
}
});
function sendChatMessage() {
const message = chatInput.value.trim();
if (message) {
// Add user message
addMessage(message, 'user');
chatInput.value = '';
// Simulate AI response after delay
setTimeout(() => {
const responses = [
"I understand you're asking about " + message + ". Can you provide more details?",
"For " + message + ", we offer several solutions depending on your needs.",
"That's an interesting question about " + message + ". Let me check our knowledge base.",
"Many clients ask about " + message + ". Here's what we typically recommend..."
];
const randomResponse = responses[Math.floor(Math.random() * responses.length)];
addMessage(randomResponse, 'ai');
}, 1000);
}
}
function addMessage(text, sender) {
const messageDiv = document.createElement('div');
messageDiv.className = 'mb-4 flex';
if (sender === 'user') {
messageDiv.classList.add('justify-end');
messageDiv.innerHTML = `
<div class="bg-orange-500 text-white p-3 rounded-lg max-w-xs">
<p>${text}</p>
</div>
`;
} else {
messageDiv.innerHTML = `
<div class="bg-gray-100 p-3 rounded-lg max-w-xs">
<p>${text}</p>
</div>
`;
}
chatMessages.appendChild(messageDiv);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
</script>
</body>
</html>