| | <!DOCTYPE html> |
| | <html lang="en" class="h-full"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | <title>Chatty McChatFace</title> |
| | <link rel="stylesheet" href="style.css"> |
| | <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> |
| | <script> |
| | tailwind.config = { |
| | theme: { |
| | extend: { |
| | colors: { |
| | primary: { |
| | 50: '#f0f9ff', |
| | 100: '#e0f2fe', |
| | 200: '#bae6fd', |
| | 300: '#7dd3fc', |
| | 400: '#38bdf8', |
| | 500: '#0ea5e9', |
| | 600: '#0284c7', |
| | 700: '#0369a1', |
| | 800: '#075985', |
| | 900: '#0c4a6e', |
| | }, |
| | secondary: { |
| | 50: '#f5f3ff', |
| | 100: '#ede9fe', |
| | 200: '#ddd6fe', |
| | 300: '#c4b5fd', |
| | 400: '#a78bfa', |
| | 500: '#8b5cf6', |
| | 600: '#7c3aed', |
| | 700: '#6d28d9', |
| | 800: '#5b21b6', |
| | 900: '#4c1d95', |
| | } |
| | } |
| | } |
| | } |
| | } |
| | </script> |
| | </head> |
| | <body class="bg-gray-50 h-full flex flex-col"> |
| | <div class="flex flex-col h-full"> |
| | |
| | <div class="hidden md:flex md:w-64 md:flex-col fixed inset-y-0"> |
| | <div class="flex flex-col h-full bg-gray-900 text-white"> |
| | <div class="flex items-center justify-between p-4 border-b border-gray-700"> |
| | <button class="rounded-lg p-2 hover:bg-gray-700"> |
| | <i data-feather="plus"></i> |
| | </button> |
| | <button class="rounded-lg p-2 hover:bg-gray-700"> |
| | <i data-feather="menu"></i> |
| | </button> |
| | </div> |
| | <div class="flex-1 overflow-y-auto"> |
| | <div class="p-4 space-y-2"> |
| | <button class="w-full text-left p-2 rounded-md hover:bg-gray-700 flex items-center"> |
| | <i data-feather="message-square" class="mr-2 w-4 h-4"></i> |
| | <span class="truncate">New Conversation</span> |
| | </button> |
| | <div class="text-xs text-gray-400 mt-4 mb-2 px-2">Today</div> |
| | <button class="w-full text-left p-2 rounded-md hover:bg-gray-700 flex items-center"> |
| | <i data-feather="message-square" class="mr-2 w-4 h-4"></i> |
| | <span class="truncate">How to center a div?</span> |
| | </button> |
| | </div> |
| | </div> |
| | <div class="p-4 border-t border-gray-700"> |
| | <button class="w-full flex items-center p-2 rounded-md hover:bg-gray-700"> |
| | <div class="w-8 h-8 rounded-full bg-primary-500 flex items-center justify-center mr-2"> |
| | <i data-feather="user" class="w-4 h-4 text-white"></i> |
| | </div> |
| | <span class="truncate">User Account</span> |
| | </button> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | |
| | <div class="flex-1 md:ml-64"> |
| | |
| | <div class="flex flex-col h-full"> |
| | |
| | <div class="flex-1 overflow-y-auto p-4 space-y-6"> |
| | <div class="max-w-3xl mx-auto"> |
| | <div class="flex items-start space-x-4"> |
| | <div class="w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center"> |
| | <i data-feather="user" class="text-gray-600"></i> |
| | </div> |
| | <div class="flex-1"> |
| | <div class="bg-white p-4 rounded-lg shadow-sm"> |
| | <p>How can I center a div horizontally and vertically?</p> |
| | </div> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <div class="max-w-3xl mx-auto"> |
| | <div class="flex items-start space-x-4"> |
| | <div class="w-10 h-10 rounded-full bg-primary-500 flex items-center justify-center"> |
| | <i data-feather="cpu" class="text-white"></i> |
| | </div> |
| | <div class="flex-1"> |
| | <div class="bg-gray-50 p-4 rounded-lg shadow-sm"> |
| | <p>You can center a div using CSS Flexbox or CSS Grid. Here are examples for both methods:</p> |
| | <div class="mt-4 bg-gray-100 p-3 rounded-md"> |
| | <pre class="text-sm text-gray-800">/* Flexbox method */ |
| | .container { |
| | display: flex; |
| | justify-content: center; |
| | align-items: center; |
| | height: 100vh; |
| | }</pre> |
| | </div> |
| | <div class="mt-4 bg-gray-100 p-3 rounded-md"> |
| | <pre class="text-sm text-gray-800">/* Grid method */ |
| | .container { |
| | display: grid; |
| | place-items: center; |
| | height: 100vh; |
| | }</pre> |
| | </div> |
| | </div> |
| | </div> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | |
| | <div class="border-t border-gray-200 p-4"> |
| | <div class="max-w-3xl mx-auto"> |
| | <div class="relative"> |
| | <textarea |
| | class="w-full p-4 pr-16 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent resize-none" |
| | rows="1" |
| | placeholder="Message Chatty McChatFace..." |
| | style="min-height: 60px;"></textarea> |
| | <button class="absolute right-3 bottom-3 p-2 rounded-md bg-primary-500 text-white hover:bg-primary-600"> |
| | <i data-feather="send"></i> |
| | </button> |
| | </div> |
| | <p class="text-xs text-gray-500 mt-2 text-center"> |
| | Chatty McChatFace can make mistakes. Consider checking important information. |
| | </p> |
| | </div> |
| | </div> |
| | </div> |
| | </div> |
| | </div> |
| |
|
| | <script src="script.js"></script> |
| | <script> |
| | feather.replace(); |
| | </script> |
| | <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> |
| | </body> |
| | </html> |