o1-preview-2024-09-12· OpenAI
WildChat-4.8M (AI2)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Chatbot</title>…
- User
<!-- Include Google Fonts --> <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> <!-- Include Prism.js CSS for syntax highlighting --> <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet" /> <style> /* Reset and base styles */ * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #1e1e1e; font-family: 'Roboto', sans-serif; color: #e0e0e0; overflow: hidden; } /* Flex container to hold chat history and chat area */ .main-container { display: flex; height: 100vh; overflow: hidden; } /* Chat history styles (design only) */ .chat-history { width: 250px; background: #2a2a2a; border-right: 1px solid #3c3c3c; padding: 20px; } .chat-history h2 { margin-bottom: 20px; color: #fff; font-weight: normal; font-size: 18px; } .chat-history ul { list-style: none; } .chat-history li { padding: 10px; margin-bottom: 10px; background: #333; border-radius: 5px; cursor: pointer; color: #ccc; transition: background-color 0.3s; } .chat-history li:hover { background: #444; } /* Chat container styles */ .chat-container { flex: 1; display: flex; flex-direction: column; background: #1e1e1e; overflow: hidden; } /* Chat window styles */ #chat-window { flex: 1; padding: 20px; overflow-y: auto; scrollbar-width: thin; } #chat-window::-webkit-scrollbar { width: 8px; } #chat-window::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.1); border-radius: 4px; } .message { margin: 10px 0; padding: 15px; border-radius: 15px; max-width: 70%; word-wrap: break-word; word-break: break-word; position: relative; opacity: 0; animation: fadeInUp 0.5s forwards; } .user-message { align-self: flex-end; background: #3a3a3a; color: #ffffff; } .bot-message { align-self: flex-start; background: #2a2a2a; color: #ffffff; } .message-content { white-space: pre-wrap; } /* Code block styling */ .code-block { background-color: #121212; color: #ffffff; font-family: 'Courier New', monospace; padding: 15px; border-radius: 10px; overflow-x: auto; margin-top: 10px; position: relative; } /* Copy button styling */ .copy-button { background-color: rgba(255, 255, 255, 0.1); color: #ffffff; border: none; border-radius: 5px; padding: 5px 10px; font-size: 12px; cursor: pointer; transition: background-color 0.3s ease; position: absolute; top: 10px; right: 10px; } .copy-button:hover { background-color: rgba(255, 255, 255, 0.2); } /* Input area styling */ .input-container { display: flex; padding: 15px 20px; background: #1e1e1e; border-top: 1px solid #3c3c3c; align-items: center; } .input-container textarea { flex: 1; padding: 12px 20px; background: #2a2a2a; color: #ffffff; border: none; border-radius: 25px; font-size: 16px; outline: none; margin-right: 10px; resize: none; max-height: 150px; overflow-y: auto; line-height: 1.5; font-family: 'Roboto', sans-serif; } .input-container textarea::placeholder { color: rgba(255, 255, 255, 0.5); } .send-button { background: #2a2a2a; color: #ffffff; border: none; border-radius: 50%; cursor: pointer; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease, transform 0.1s ease; } .send-button:hover { background: #3a3a3a; } .send-button:active { transform: scale(0.95); } /* Send icon */ .send-icon { width: 24px; height: 24px; fill: #ffffff; } /* Animations */ @keyframes fadeInUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } } /* Typing indicator */ .typing-indicator { font-style: italic; color: #ffffff; margin: 10px 0; display: flex; align-items: center; } .typing-indicator span { margin-left: 5px; display: inline-block; width: 8px; height: 8px; background-color: #ffffff; border-radius: 50%; opacity: 0.5; animation: typingDots 1s infinite; } .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; } @keyframes typingDots { 0% { opacity: 0.2; transform: scale(1); } 20% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0.2; transform: scale(1); } } /* Responsive design */ @media (max-width: 600px) { .message { max-width: 85%; } .chat-history { display: none; } } /* Prism.js code block adjustments */ pre[class*="language-"] { background: none; padding: 0; margin: 0; overflow: auto; } code[class*="language-"] { background: none; padding: 0; margin: 0; font-family: 'Courier New', monospace; font-size: 14px; } </style> - Assistant
To style the
New Chatbutton so that it matches the design of your website, you can add the following CSS to your stylesheet:/* Styles for the New Chat button */ #new-chat-button { background-color: #333; color: #ccc; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; width: 100%; margin-bottom: 20px; transition: background-color 0.3s ease; } #new-chat-button:hover { background-color: #444; }This CSS will give the
New Chatbutton a dark background with light text, rounded corners, and a hover effect that lightens the background color, making it consistent with the rest of your site's design.