Spaces:
Running
Running
Make a website named "Quick Chat" people can sign up or login to make chats with other people who are sign in (NO FAKE CHATS OR AI CHATS)
4a1c18b verified Download chat.html from JeffreyMill/quickchat-express: direct link, hf CLI and curl.
- Browser
- Download file 15.6 kB
-
https://huggingface.co/spaces/JeffreyMill/quickchat-express/resolve/main/chat.html
- Command line
-
hf download hf://spaces/JeffreyMill/quickchat-express/chat.html
-
curl -L -o chat.html https://huggingface.co/spaces/JeffreyMill/quickchat-express/resolve/main/chat.html
15.6 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>QuickChat Express - Chat</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| .chat-container { | |
| height: calc(100vh - 140px); | |
| } | |
| .messages-container { | |
| height: calc(100% - 70px); | |
| } | |
| .chat-bubble { | |
| animation: fadeIn 0.3s ease-in-out; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .online-indicator { | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| position: absolute; | |
| bottom: 0; | |
| right: 0; | |
| border: 2px solid #1f2937; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white"> | |
| <div class="flex flex-col h-screen"> | |
| <!-- Header --> | |
| <header class="bg-gray-800 px-4 py-3 flex justify-between items-center border-b border-gray-700"> | |
| <div class="flex items-center space-x-3"> | |
| <img src="http://static.photos/people/200x200/1" alt="Profile" class="w-10 h-10 rounded-full"> | |
| <div> | |
| <h1 class="font-medium">QuickChat Express</h1> | |
| <p class="text-xs text-gray-400 flex items-center"> | |
| <span class="w-2 h-2 bg-green-500 rounded-full mr-1"></span> | |
| Online | |
| </p> | |
| </div> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="search"></i> | |
| </button> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="more-vertical"></i> | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Chat Area --> | |
| <div class="flex flex-1 overflow-hidden"> | |
| <!-- Sidebar --> | |
| <aside class="w-80 bg-gray-800 border-r border-gray-700 flex flex-col hidden md:flex"> | |
| <div class="p-4 border-b border-gray-700"> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search conversations..." class="w-full bg-gray-700 rounded-lg px-4 py-2 pl-10 focus:outline-none focus:ring-1 focus:ring-blue-500"> | |
| <i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div class="flex-1 overflow-y-auto"> | |
| <!-- Online Users --> | |
| <div class="px-4 py-3"> | |
| <h3 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">Online Now (3)</h3> | |
| <div class="space-y-2"> | |
| <div class="flex items-center p-2 rounded-lg hover:bg-gray-700 cursor-pointer transition"> | |
| <div class="relative"> | |
| <img src="http://static.photos/people/200x200/2" alt="User" class="w-10 h-10 rounded-full"> | |
| <span class="online-indicator bg-green-500"></span> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="font-medium">Alex Johnson</p> | |
| <p class="text-xs text-gray-400">Hi there!</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center p-2 rounded-lg hover:bg-gray-700 cursor-pointer transition"> | |
| <div class="relative"> | |
| <img src="http://static.photos/people/200x200/3" alt="User" class="w-10 h-10 rounded-full"> | |
| <span class="online-indicator bg-green-500"></span> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="font-medium">Maria Garcia</p> | |
| <p class="text-xs text-gray-400">Available</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center p-2 rounded-lg hover:bg-gray-700 cursor-pointer transition"> | |
| <div class="relative"> | |
| <img src="http://static.photos/people/200x200/4" alt="User" class="w-10 h-10 rounded-full"> | |
| <span class="online-indicator bg-green-500"></span> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="font-medium">Sam Wilson</p> | |
| <p class="text-xs text-gray-400">Let's chat!</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Conversations --> | |
| <div class="px-4 py-3 border-t border-gray-700"> | |
| <h3 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">Recent Chats</h3> | |
| <div class="space-y-2"> | |
| <div class="flex items-center p-2 rounded-lg hover:bg-gray-700 cursor-pointer transition"> | |
| <img src="http://static.photos/people/200x200/5" alt="User" class="w-10 h-10 rounded-full"> | |
| <div class="ml-3"> | |
| <p class="font-medium">Tech Group</p> | |
| <p class="text-xs text-gray-400">Jordan: Check out this new framework</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center p-2 rounded-lg hover:bg-gray-700 cursor-pointer transition"> | |
| <img src="http://static.photos/people/200x200/6" alt="User" class="w-10 h-10 rounded-full"> | |
| <div class="ml-3"> | |
| <p class="font-medium">Emma Thompson</p> | |
| <p class="text-xs text-gray-400">See you tomorrow!</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </aside> | |
| <!-- Chat Area --> | |
| <main class="flex-1 flex flex-col"> | |
| <!-- Chat header --> | |
| <div class="bg-gray-800 px-4 py-3 flex items-center border-b border-gray-700"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="relative"> | |
| <img src="http://static.photos/people/200x200/2" alt="User" class="w-10 h-10 rounded-full"> | |
| <span class="online-indicator bg-green-500"></span> | |
| </div> | |
| <div> | |
| <h2 class="font-medium">Alex Johnson</h2> | |
| <p class="text-xs text-gray-400 flex items-center"> | |
| <span class="w-2 h-2 bg-green-500 rounded-full mr-1"></span> | |
| Active now | |
| </p> | |
| </div> | |
| </div> | |
| <div class="ml-auto flex items-center space-x-4"> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="phone"></i> | |
| </button> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="video"></i> | |
| </button> | |
| <button class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="info"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Messages --> | |
| <div class="messages-container overflow-y-auto p-4 space-y-4 flex-1"> | |
| <!-- Date divider --> | |
| <div class="flex items-center my-4"> | |
| <div class="flex-1 h-px bg-gray-700"></div> | |
| <span class="px-3 text-xs text-gray-400">Today</span> | |
| <div class="flex-1 h-px bg-gray-700"></div> | |
| </div> | |
| <!-- Received message --> | |
| <div class="flex items-start space-x-2"> | |
| <img src="http://static.photos/people/200x200/2" alt="User" class="w-8 h-8 rounded-full mt-1"> | |
| <div class="max-w-xs md:max-w-md"> | |
| <div class="bg-gray-700 rounded-lg p-3 rounded-tl-none chat-bubble"> | |
| <p>Hey there! How's it going?</p> | |
| </div> | |
| <p class="text-xs text-gray-400 mt-1">2:34 PM</p> | |
| </div> | |
| </div> | |
| <!-- Sent message --> | |
| <div class="flex justify-end"> | |
| <div class="max-w-xs md:max-w-md"> | |
| <div class="bg-blue-600 rounded-lg p-3 rounded-tr-none chat-bubble"> | |
| <p>I'm doing great! Just finished setting up this new chat app.</p> | |
| </div> | |
| <p class="text-xs text-gray-400 mt-1 text-right">2:36 PM</p> | |
| </div> | |
| </div> | |
| <!-- Received message --> | |
| <div class="flex items-start space-x-2"> | |
| <img src="http://static.photos/people/200x200/2" alt="User" class="w-8 h-8 rounded-full mt-1"> | |
| <div class="max-w-xs md:max-w-md"> | |
| <div class="bg-gray-700 rounded-lg p-3 rounded-tl-none chat-bubble"> | |
| <p>That's awesome! It looks really clean. What tech did you use?</p> | |
| </div> | |
| <p class="text-xs text-gray-400 mt-1">2:38 PM</p> | |
| </div> | |
| </div> | |
| <!-- Sent message --> | |
| <div class="flex justify-end"> | |
| <div class="max-w-xs md:max-w-md"> | |
| <div class="bg-blue-600 rounded-lg p-3 rounded-tr-none chat-bubble"> | |
| <p>Thanks! Using TailwindCSS for styling and vanilla JS for the interactions. The backend is Node.js with WebSockets.</p> | |
| </div> | |
| <p class="text-xs text-gray-400 mt-1 text-right">2:40 PM</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Message input --> | |
| <div class="p-4 border-t border-gray-700"> | |
| <form class="flex items-center space-x-2"> | |
| <button type="button" class="p-2 rounded-full hover:bg-gray-700 transition"> | |
| <i data-feather="plus"></i> | |
| </button> | |
| <div class="flex-1 relative"> | |
| <input type="text" placeholder="Type your message here..." class="w-full bg-gray-700 rounded-full px-4 py-2 pl-10 pr-12 focus:outline-none focus:ring-1 focus:ring-blue-500"> | |
| <i data-feather="smile" class="absolute left-3 top-2.5 text-gray-400"></i> | |
| </div> | |
| <button type="submit" class="p-2 rounded-full bg-blue-600 hover:bg-blue-700 transition"> | |
| <i data-feather="send"></i> | |
| </button> | |
| </form> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <script> | |
| // In a real app, you would connect to a WebSocket server here | |
| // and handle real-time messaging functionality | |
| // For demo purposes, we'll simulate sending a message | |
| const messageForm = document.querySelector('form'); | |
| const messagesContainer = document.querySelector('.messages-container'); | |
| messageForm.addEventListener('submit', (e) => { | |
| e.preventDefault(); | |
| const input = messageForm.querySelector('input'); | |
| const message = input.value.trim(); | |
| if (message) { | |
| // Create new message element | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = 'flex justify-end'; | |
| messageDiv.innerHTML = ` | |
| <div class="max-w-xs md:max-w-md"> | |
| <div class="bg-blue-600 rounded-lg p-3 rounded-tr-none chat-bubble"> | |
| <p>${message}</p> | |
| </div> | |
| <p class="text-xs text-gray-400 mt-1 text-right">${new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}</p> | |
| </div> | |
| `; | |
| // Add to messages container and scroll to bottom | |
| messagesContainer.appendChild(messageDiv); | |
| messagesContainer.scrollTop = messagesContainer.scrollHeight; | |
| // Clear input | |
| input.value = ''; | |
| // Simulate reply after 1-3 seconds | |
| setTimeout(() => { | |
| const replies = [ | |
| "That's interesting!", | |
| "I see what you mean.", | |
| "Tell me more about that.", | |
| "Nice! How did you do that?", | |
| "I'll have to try that myself." | |
| ]; | |
| const randomReply = replies[Math.floor(Math.random() * replies.length)]; | |
| const replyDiv = document.createElement('div'); | |
| replyDiv.className = 'flex items-start space-x-2'; | |
| replyDiv.innerHTML = ` | |
| <img src="http://static.photos/people/200x200/2" alt="User" class="w-8 h-8 rounded-full mt-1"> | |
| <div class="max-w-xs md:max-w-md"> | |
| <div class="bg-gray-700 rounded-lg p-3 rounded-tl-none chat-bubble"> | |
| <p>${randomReply}</p> | |
| </div> | |
| <p class="text-xs text-gray-400 mt-1">${new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}</p> | |
| </div> | |
| `; | |
| messagesContainer.appendChild(replyDiv); | |
| messagesContainer.scrollTop = messagesContainer.scrollHeight; | |
| }, 1000 + Math.random() * 2000); | |
| } | |
| }); | |
| // Initialize feather icons | |
| feather.replace(); | |
| </script> | |
| </body> | |
| </html> | |