Spaces:
Running
Running
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>RaznetSolutionsAI</title> <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet"> <link rel="stylesheet" href="styles.css"> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> </head> <body class="gradient-bg text-gray-800 min-h-screen flex flex-col"> <header class="bg-white shadow p-4 flex justify-between items-center"> <div class="flex items-center space-x-4"> <img src="https://via.placeholder.com/40" alt="Logo" class="h-10 w-10"> <h1 class="text-2xl font-bold">RaznetSolutionsAI</h1> </div> <div class="relative"> <button id="menuButton" class="text-gray-600 hover:text-gray-800"> <svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/> </svg> </button> <ul id="menu" class="menu"> <li class="px-4 py-2 hover:bg-gray-100 cursor-pointer">Home</li> <li class="px-4 py-2 hover:bg-gray-100 cursor-pointer">Profile</li> <li class="px-4 py-2 hover:bg-gray-100 cursor-pointer">Weather</li> <li class="px-4 py-2 hover:bg-gray-100 cursor-pointer">Logout</li> </ul> </div> </header> <main class="flex-grow p-4"> <section class="max-w-2xl mx-auto"> <h2 class="text-3xl font-semibold mb-4">What do you want to know?</h2> <p class="mb-6">Ask RaznetSolutionsAI anything - from tech tips to life advice, I'm here to help!</p> <div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6"> <button class="chat-bubble fade-in bg-white p-4 rounded-lg shadow hover:bg-gray-100" data-question="Explain quantum computing">Explain quantum computing<br><span class="text-sm text-gray-600">in simple terms</span></button> <button class="chat-bubble fade-in bg-white p-4 rounded-lg shadow hover:bg-gray-100" data-question="Creative dinner recipe">Creative dinner recipe<br><span class="text-sm text-gray-600">for tonight</span></button> <button class="chat-bubble fade-in bg-white p-4 rounded-lg shadow hover:bg-gray-100" data-question="Productivity tips">Productivity tips<br><span class="text-sm text-gray-600">to work smarter</span></button> <button class="chat-bubble fade-in bg-white p-4 rounded-lg shadow hover:bg-gray-100" data-question="Teach photosynthesis">Teach photosynthesis<br><span class="text-sm text-gray-600">like I'm 5</span></button> </div> <div class="bg-white p-4 rounded-lg shadow"> <div id="chatArea" class="h-64 overflow-y-auto mb-4 p-4 bg-gray-100 rounded"></div> <div class="flex space-x-2"> <input id="userInput" type="text" class="flex-grow p-2 border rounded" placeholder="Type your message..."> <button id="sendButton" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">Send</button> </div> <input type="file" id="fileUpload" class="mt-2" accept=".csv,.json"> <canvas id="dataChart" class="mt-2 hidden"></canvas> <div class="mt-2 flex items-center"> <input id="agreeCheck" type="checkbox" class="mr-2"> <label for="agreeCheck" class="text-sm">By messaging RaznetSolutionsAI, you agree to our <a href="#" class="text-blue-500">Terms</a> and <a href="#" class="text-blue-500">Privacy Policy</a></label> </div> </div> </section> </main> <footer class="bg-white p-4 text-center"> <p>© 2025 RaznetSolutionsAI. All rights reserved.</p> </footer> <div id="settingsModal" class="modal"> <div class="modal-content"> <h2 class="text-xl font-semibold mb-4">Settings</h2> <label class="block mb-2"><input id="darkMode" type="checkbox" class="mr-2">Enable Dark Mode</label> <label class="block mb-4"><input id="notifications" type="checkbox" class="mr-2">Enable Notifications</label> <button id="closeSettings" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">Save & Close</button> </div> </div> <div id="profileModal" class="profile-modal"> <div class="profile-content"> <h2 class="text-xl font-semibold mb-4">User Profile</h2> <p><strong>Name:</strong> John Doe</p> <p><strong>Email:</strong> john.doe@example.com</p> <p><strong>Joined:</strong> August 15, 2025</p> <button id="closeProfile" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 mt-4">Close</button> </div> </div> <div id="weatherModal" class="modal"> <div class="modal-content"> <h2 class="text-xl font-semibold mb-4">Current Weather</h2> <p id="weatherInfo">Loading...</p> <button id="closeWeather" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 mt-4">Close</button> </div> </div> <script src="script.js"></script> </body> </html> - Initial Deployment
9aa70eb verified | <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>RaznetSolutionsAI</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> | |
| <style> | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #f6f7f9 0%, #e7e9ee 100%); | |
| min-height: 100vh; | |
| } | |
| .custom-shadow { | |
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); | |
| } | |
| .fade-in { | |
| animation: fadeIn 0.3s ease-in-out; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .bubble-left { | |
| border-radius: 1rem 1rem 1rem 0; | |
| } | |
| .bubble-right { | |
| border-radius: 1rem 1rem 0 1rem; | |
| } | |
| .modal { | |
| display: none; | |
| position: fixed; | |
| z-index: 100; | |
| left: 0; | |
| top: 0; | |
| width: 100%; | |
| height: 100%; | |
| background-color: rgba(0,0,0,0.4); | |
| } | |
| .modal-content { | |
| background-color: #fff; | |
| margin: 12% auto; | |
| padding: 2rem; | |
| border-radius: 0.75rem; | |
| box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2); | |
| width: 90%; | |
| max-width: 500px; | |
| max-height: 80vh; | |
| overflow-y: auto; | |
| animation: modalopen 0.3s; | |
| } | |
| @keyframes modalopen { | |
| from { opacity: 0; transform: translateY(-50px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| #chatArea::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| #chatArea::-webkit-scrollbar-track { | |
| background: #f1f1f1; | |
| } | |
| #chatArea::-webkit-scrollbar-thumb { | |
| background: #c1c1c1; | |
| border-radius: 10px; | |
| } | |
| .typing-indicator { | |
| display: flex; | |
| padding: 0.5rem 1rem; | |
| margin: 1rem 0; | |
| background: #e9e9eb; | |
| border-radius: 1rem; | |
| width: fit-content; | |
| } | |
| .typing-indicator span { | |
| display: inline-block; | |
| width: 8px; | |
| height: 8px; | |
| background: #666; | |
| border-radius: 50%; | |
| margin: 0 2px; | |
| animation: typingAnimation 1.5s infinite ease-in-out; | |
| } | |
| .typing-indicator span:nth-child(2) { | |
| animation-delay: 0.2s; | |
| } | |
| .typing-indicator span:nth-child(3) { | |
| animation-delay: 0.4s; | |
| } | |
| @keyframes typingAnimation { | |
| 0%, 100% { transform: translateY(0); } | |
| 50% { transform: translateY(-5px); } | |
| } | |
| </style> | |
| </head> | |
| <body class="gradient-bg text-gray-800 flex flex-col min-h-screen"> | |
| <header class="bg-white shadow-sm p-4 flex justify-between items-center sticky top-0 z-50"> | |
| <div class="flex items-center space-x-4"> | |
| <div class="h-10 w-10 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold">RS</div> | |
| <h1 class="text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">RaznetSolutionsAI</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button id="weatherBtn" class="hidden sm:flex items-center text-gray-600 hover:text-blue-600 transition-colors"> | |
| <i class="fas fa-cloud-sun mr-2"></i> | |
| <span>Weather</span> | |
| </button> | |
| <button id="profileBtn" class="hidden sm:flex items-center text-gray-600 hover:text-blue-600 transition-colors"> | |
| <i class="fas fa-user-circle mr-2"></i> | |
| <span>Profile</span> | |
| </button> | |
| <button id="settingsBtn" class="hidden sm:flex items-center text-gray-600 hover:text-blue-600 transition-colors"> | |
| <i class="fas fa-cog mr-2"></i> | |
| <span>Settings</span> | |
| </button> | |
| <div class="relative sm:hidden"> | |
| <button id="menuButton" class="text-gray-600 hover:text-gray-800"> | |
| <i class="fas fa-bars text-xl"></i> | |
| </button> | |
| <ul id="menu" class="menu absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 hidden"> | |
| <li class="px-4 py-2 hover:bg-gray-100 cursor-pointer flex items-center"><i class="fas fa-home mr-2"></i>Home</li> | |
| <li id="profileBtnMobile" class="px-4 py-2 hover:bg-gray-100 cursor-pointer flex items-center"><i class="fas fa-user-circle mr-2"></i>Profile</li> | |
| <li id="weatherBtnMobile" class="px-4 py-2 hover:bg-gray-100 cursor-pointer flex items-center"><i class="fas fa-cloud-sun mr-2"></i>Weather</li> | |
| <li id="settingsBtnMobile" class="px-4 py-2 hover:bg-gray-100 cursor-pointer flex items-center"><i class="fas fa-cog mr-2"></i>Settings</li> | |
| <li class="px-4 py-2 hover:bg-gray-100 cursor-pointer flex items-center"><i class="fas fa-sign-out-alt mr-2"></i>Logout</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="flex-grow p-4 md:p-6"> | |
| <section class="max-w-4xl mx-auto"> | |
| <div class="mb-8 text-center"> | |
| <h2 class="text-3xl md:text-4xl font-bold mb-3">How can I assist you today?</h2> | |
| <p class="text-gray-600 max-w-2xl mx-auto">Ask RaznetSolutionsAI anything - from tech advice to creative ideas, I'm here to help you!</p> | |
| </div> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-8"> | |
| <button class="chat-bubble fade-in bg-white p-4 rounded-xl custom-shadow hover:bg-gray-50 transition-all transform hover:-translate-y-1 flex flex-col items-start" data-question="Explain quantum computing"> | |
| <h3 class="font-semibold text-blue-600 mb-1"><i class="fas fa-atom mr-2"></i>Quantum Computing</h3> | |
| <p class="text-sm text-gray-600">in simple terms</p> | |
| </button> | |
| <button class="chat-bubble fade-in bg-white p-4 rounded-xl custom-shadow hover:bg-gray-50 transition-all transform hover:-translate-y-1 flex flex-col items-start" data-question="Creative dinner recipe"> | |
| <h3 class="font-semibold text-green-600 mb-1"><i class="fas fa-utensils mr-2"></i>Dinner Recipe Idea</h3> | |
| <p class="text-sm text-gray-600">for tonight</p> | |
| </button> | |
| <button class="chat-bubble fade-in bg-white p-4 rounded-xl custom-shadow hover:bg-gray-50 transition-all transform hover:-translate-y-1 flex flex-col items-start" data-question="Productivity tips"> | |
| <h3 class="font-semibold text-purple-600 mb-1"><i class="fas fa-tasks mr-2"></i>Productivity Hacks</h3> | |
| <p class="text-sm text-gray-600">to work smarter</p> | |
| </button> | |
| <button class="chat-bubble fade-in bg-white p-4 rounded-xl custom-shadow hover:bg-gray-50 transition-all transform hover:-translate-y-1 flex flex-col items-start" data-question="Teach photosynthesis"> | |
| <h3 class="font-semibold text-yellow-600 mb-1"><i class="fas fa-leaf mr-2"></i>Photosynthesis</h3> | |
| <p class="text-sm text-gray-600">like I'm 5</p> | |
| </button> | |
| </div> | |
| <div class="bg-white p-6 rounded-2xl custom-shadow"> | |
| <div id="chatArea" class="h-80 overflow-y-auto mb-6 p-4 bg-gray-50 rounded-xl"></div> | |
| <div class="flex space-x-2"> | |
| <input id="userInput" type="text" class="flex-grow p-3 border border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all" placeholder="Type your message..."> | |
| <button id="sendButton" class="bg-blue-600 text-white px-5 py-3 rounded-xl hover:bg-blue-700 transition-colors flex items-center"> | |
| <i class="fas fa-paper-plane mr-2"></i> Send | |
| </button> | |
| </div> | |
| <div class="flex justify-between items-center mt-3"> | |
| <label class="inline-flex items-center cursor-pointer"> | |
| <input type="file" id="fileUpload" class="hidden" accept=".csv,.json,.xlsx"> | |
| <button id="uploadBtn" class="text-blue-600 hover:text-blue-800 transition-colors flex items-center"> | |
| <i class="fas fa-file-upload mr-2"></i> Upload File | |
| </button> | |
| </label> | |
| <div class="flex items-center"> | |
| <input id="agreeCheck" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded mr-2"> | |
| <label for="agreeCheck" class="text-sm text-gray-600">I agree to <a href="#" class="text-blue-600 hover:underline">Terms</a></label> | |
| </div> | |
| </div> | |
| <canvas id="dataChart" class="mt-6 hidden"></canvas> | |
| </div> | |
| <div class="mt-8 grid grid-cols-1 sm:grid-cols-3 gap-4"> | |
| <div class="bg-white p-5 rounded-xl custom-shadow hover:shadow-md transition-shadow"> | |
| <div class="text-blue-500 mb-3"><i class="fas fa-bolt text-2xl"></i></div> | |
| <h3 class="font-semibold mb-2">Quick Responses</h3> | |
| <p class="text-gray-600 text-sm">Get instant answers to your questions 24/7.</p> | |
| </div> | |
| <div class="bg-white p-5 rounded-xl custom-shadow hover:shadow-md transition-shadow"> | |
| <div class="text-green-500 mb-3"><i class="fas fa-lock text-2xl"></i></div> | |
| <h3 class="font-semibold mb-2">Secure & Private</h3> | |
| <p class="text-gray-600 text-sm">Your data is encrypted and never stored.</p> | |
| </div> | |
| <div class="bg-white p-5 rounded-xl custom-shadow hover:shadow-md transition-shadow"> | |
| <div class="text-purple-500 mb-3"><i class="fas fa-brain text-2xl"></i></div> | |
| <h3 class="font-semibold mb-2">Always Learning</h3> | |
| <p class="text-gray-600 text-sm">Continuously updated with new knowledge.</p> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <footer class="bg-gray-50 py-6"> | |
| <div class="max-w-4xl mx-auto px-4"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="flex items-center mb-4 md:mb-0"> | |
| <div class="h-8 w-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold mr-2">RS</div> | |
| <span class="font-semibold">RaznetSolutionsAI</span> | |
| </div> | |
| <div class="flex space-x-4"> | |
| <a href="#" class="text-gray-600 hover:text-blue-600 transition-colors"><i class="fab fa-twitter"></i></a> | |
| <a href="#" class="text-gray-600 hover:text-blue-600 transition-colors"><i class="fab fa-github"></i></a> | |
| <a href="#" class="text-gray-600 hover:text-blue-600 transition-colors"><i class="fab fa-linkedin"></i></a> | |
| </div> | |
| </div> | |
| <div class="mt-4 text-center md:text-left text-sm text-gray-500"> | |
| <p>© 2025 RaznetSolutionsAI. All rights reserved. <a href="#" class="text-blue-600 hover:underline">Privacy Policy</a> | <a href="#" class="text-blue-600 hover:underline">Terms of Service</a></p> | |
| </div> | |
| </div> | |
| </footer> | |
| <!-- Modal Windows --> | |
| <div id="settingsModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-2xl font-bold">Settings</h2> | |
| <button id="closeSettings" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg"> | |
| <div> | |
| <h3 class="font-medium">Dark Mode</h3> | |
| <p class="text-sm text-gray-600">Change the appearance</p> | |
| </div> | |
| <label class="switch"> | |
| <input id="darkMode" type="checkbox"> | |
| <span class="slider round"></span> | |
| </label> | |
| </div> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg"> | |
| <div> | |
| <h3 class="font-medium">Notifications</h3> | |
| <p class="text-sm text-gray-600">Enable alerts and sounds</p> | |
| </div> | |
| <label class="switch"> | |
| <input id="notifications" type="checkbox" checked> | |
| <span class="slider round"></span> | |
| </label> | |
| </div> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg"> | |
| <div> | |
| <h3 class="font-medium">History</h3> | |
| <p class="text-sm text-gray-600">Save conversation history</p> | |
| </div> | |
| <label class="switch"> | |
| <input id="saveHistory" type="checkbox" checked> | |
| <span class="slider round"></span> | |
| </label> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="profileModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-2xl font-bold">User Profile</h2> | |
| <button id="closeProfile" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button> | |
| </div> | |
| <div class="flex flex-col items-center mb-6"> | |
| <div class="h-24 w-24 bg-blue-100 rounded-full flex items-center justify-center text-blue-600 mb-4"> | |
| <i class="fas fa-user text-4xl"></i> | |
| </div> | |
| <h3 class="text-xl font-semibold">John Doe</h3> | |
| <p class="text-gray-600">Premium Member</p> | |
| </div> | |
| <div class="space-y-3"> | |
| <div class="flex items-center p-3 bg-gray-50 rounded-lg"> | |
| <i class="fas fa-envelope text-gray-500 mr-3"></i> | |
| <p>john.doe@example.com</p> | |
| </div> | |
| <div class="flex items-center p-3 bg-gray-50 rounded-lg"> | |
| <i class="fas fa-calendar-alt text-gray-500 mr-3"></i> | |
| <p>Member since August 15, 2025</p> | |
| </div> | |
| <div class="flex items-center p-3 bg-gray-50 rounded-lg"> | |
| <i class="fas fa-clock text-gray-500 mr-3"></i> | |
| <p>Last active: Just now</p> | |
| </div> | |
| </div> | |
| <button class="w-full mt-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors">Edit Profile</button> | |
| </div> | |
| </div> | |
| <div id="weatherModal" class="modal"> | |
| <div class="modal-content"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-2xl font-bold">Current Weather</h2> | |
| <button id="closeWeather" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button> | |
| </div> | |
| <div id="weatherInfo" class="flex flex-col items-center"> | |
| <div class="flex items-center justify-center mb-6"> | |
| <i class="fas fa-cloud-sun text-5xl text-yellow-500 mr-4"></i> | |
| <div> | |
| <h3 class="text-3xl font-bold">72°F</h3> | |
| <p class="text-gray-600">San Francisco, CA</p> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-2 gap-4 w-full"> | |
| <div class="bg-blue-50 p-4 rounded-lg"> | |
| <p class="text-sm text-gray-600">Humidity</p> | |
| <p class="text-xl font-semibold">65%</p> | |
| </div> | |
| <div class="bg-blue-50 p-4 rounded-lg"> | |
| <p class="text-sm text-gray-600">Wind</p> | |
| <p class="text-xl font-semibold">8 mph</p> | |
| </div> | |
| <div class="bg-blue-50 p-4 rounded-lg"> | |
| <p class="text-sm text-gray-600">Sunrise</p> | |
| <p class="text-xl font-semibold">6:42 AM</p> | |
| </div> | |
| <div class="bg-blue-50 p-4 rounded-lg"> | |
| <p class="text-sm text-gray-600">Sunset</p> | |
| <p class="text-xl font-semibold">7:58 PM</p> | |
| </div> | |
| </div> | |
| <div class="mt-6 pt-6 border-t w-full"> | |
| <h4 class="font-semibold mb-3">3-Day Forecast</h4> | |
| <div class="flex justify-between"> | |
| <div class="text-center"> | |
| <p class="font-medium">Today</p> | |
| <i class="fas fa-sun text-2xl text-yellow-400 my-2"></i> | |
| <p>72° / 58°</p> | |
| </div> | |
| <div class="text-center"> | |
| <p class="font-medium">Tomorrow</p> | |
| <i class="fas fa-cloud-sun text-2xl text-gray-400 my-2"></i> | |
| <p>70° / 57°</p> | |
| </div> | |
| <div class="text-center"> | |
| <p class="font-medium">Sat</p> | |
| <i class="fas fa-cloud text-2xl text-gray-500 my-2"></i> | |
| <p>68° / 56°</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Chat interaction | |
| const chatArea = document.getElementById('chatArea'); | |
| const userInput = document.getElementById('userInput'); | |
| const sendButton = document.getElementById('sendButton'); | |
| const quickButtons = document.querySelectorAll('.chat-bubble'); | |
| // Add sample welcome message | |
| setTimeout(() => { | |
| addMessage('bot', 'Hello! I\'m RaznetSolutionsAI. How can I assist you today? Feel free to ask me anything or try one of the quick questions above!'); | |
| }, 500); | |
| // Send message on button click or Enter key | |
| sendButton.addEventListener('click', sendMessage); | |
| userInput.addEventListener('keypress', function(e) { | |
| if (e.key === 'Enter') sendMessage(); | |
| }); | |
| // Quick question buttons | |
| quickButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| const question = this.getAttribute('data-question'); | |
| userInput.value = question; | |
| sendMessage(); | |
| }); | |
| }); | |
| // Modal interactions | |
| document.getElementById('settingsBtn').addEventListener('click', () => toggleModal('settingsModal')); | |
| document.getElementById('profileBtn').addEventListener('click', () => toggleModal('profileModal')); | |
| document.getElementById('weatherBtn').addEventListener('click', () => toggleModal('weatherModal')); | |
| document.getElementById('settingsBtnMobile').addEventListener('click', () => toggleModal('settingsModal')); | |
| document.getElementById('profileBtnMobile').addEventListener('click', () => toggleModal('profileModal')); | |
| document.getElementById('weatherBtnMobile').addEventListener('click', () => toggleModal('weatherModal')); | |
| document.getElementById('closeSettings').addEventListener('click', () => toggleModal('settingsModal')); | |
| document.getElementById('closeProfile').addEventListener('click', () => toggleModal('profileModal')); | |
| document.getElementById('closeWeather').addEventListener('click', () => toggleModal('weatherModal')); | |
| // Mobile menu toggle | |
| document.getElementById('menuButton').addEventListener('click', function() { | |
| const menu = document.getElementById('menu'); | |
| menu.classList.toggle('hidden'); | |
| }); | |
| // Close modals when clicking outside | |
| document.querySelectorAll('.modal').forEach(modal => { | |
| modal.addEventListener('click', function(e) { | |
| if (e.target === this) toggleModal(this.id); | |
| }); | |
| }); | |
| // File upload button styling | |
| document.getElementById('uploadBtn').addEventListener('click', function() { | |
| document.getElementById('fileUpload').click(); | |
| }); | |
| // Functions | |
| function sendMessage() { | |
| const message = userInput.value.trim(); | |
| if (message) { | |
| addMessage('user', message); | |
| userInput.value = ''; | |
| // Show typing indicator | |
| const typingDiv = document.createElement('div'); | |
| typingDiv.className = 'typing-indicator'; | |
| typingDiv.innerHTML = '<span></span><span></span><span></span>'; | |
| chatArea.appendChild(typingDiv); | |
| chatArea.scrollTop = chatArea.scrollHeight; | |
| // Simulate bot response after delay | |
| setTimeout(() => { | |
| chatArea.removeChild(typingDiv); | |
| const botResponses = [ | |
| "That's an interesting question! I'd be happy to help with that.", | |
| "Let me think about that for a moment... Here's what I can tell you.", | |
| "I've analyzed your question and here's my response.", | |
| "Great question! Here's some information that might help." | |
| ]; | |
| const randomResponse = botResponses[Math.floor(Math.random() * botResponses.length)]; | |
| addMessage('bot', randomResponse + " (This is a simulated response. In a real application, this would be powered by AI.)"); | |
| }, 1500 + Math.random() * 2000); | |
| } | |
| } | |
| function addMessage(sender, text) { | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = `flex mb-3 ${sender === 'user' ? 'justify-end' : 'justify-start'}`; | |
| const bubbleDiv = document.createElement('div'); | |
| bubbleDiv.className = sender === 'user' | |
| ? 'bg-blue-600 text-white p-3 max-w-xs md:max-w-md bubble-right' | |
| : 'bg-gray-200 text-gray-800 p-3 max-w-xs md:max-w-md bubble-left'; | |
| bubbleDiv.textContent = text; | |
| messageDiv.appendChild(bubbleDiv); | |
| chatArea.appendChild(messageDiv); | |
| chatArea.scrollTop = chatArea.scrollHeight; | |
| } | |
| function toggleModal(modalId) { | |
| const modal = document.getElementById(modalId); | |
| modal.style.display = modal.style.display === 'block' ? 'none' : 'block'; | |
| // Close mobile menu if open | |
| document.getElementById('menu').classList.add('hidden'); | |
| } | |
| // Initialize chart (hidden by default) | |
| const ctx = document.getElementById('dataChart').getContext('2d'); | |
| const myChart = new Chart(ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Data 1', 'Data 2', 'Data 3', 'Data 4'], | |
| datasets: [{ | |
| label: 'Sample Data', | |
| data: [12, 19, 3, 5], | |
| backgroundColor: [ | |
| 'rgba(59, 130, 246, 0.7)', | |
| 'rgba(99, 102, 241, 0.7)', | |
| 'rgba(168, 85, 247, 0.7)', | |
| 'rgba(236, 72, 153, 0.7)' | |
| ], | |
| borderColor: [ | |
| 'rgba(59, 130, 246, 1)', | |
| 'rgba(99, 102, 241, 1)', | |
| 'rgba(168, 85, 247, 1)', | |
| 'rgba(236, 72, 153, 1)' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| scales: { | |
| y: { | |
| beginAtZero: true | |
| } | |
| }, | |
| responsive: true | |
| } | |
| }); | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=RazNT/raznetsolutionsai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |