Version 1 of chatbot frontend

This commit is contained in:
2025-04-02 02:11:58 +01:00
commit e9894b7fa7
5 changed files with 398 additions and 0 deletions

136
styles.css Normal file
View File

@@ -0,0 +1,136 @@
body {
font-family: Arial, sans-serif;
margin: 0;
background-color: #f4f4f9;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.chat-container {
width: 100%;
max-width: 600px; /* Maximum width for larger screens */
border: 1px solid #ccc;
border-radius: 8px;
overflow: hidden;
display: flex;
flex-direction: column;
height: 100vh;
}
.avatar-container {
display: flex;
align-items: center;
/*padding: 10px;*/
/*background-color: #f4f4f9;*/
}
.avatar-container img {
margin-right: 0; /* Remove space between the avatar and text */
}
#chat-messages {
flex-grow: 1;
padding: 10px;
overflow-y: auto;
background-color: white;
}
.user-message {
background-color: #d4edda; /* Green background for user messages */
margin-bottom: 10px;
padding: 8px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: flex-end;
margin-left: 100px;
}
.bot-message {
background-color: #cce5ff; /* Blue background for bot messages */
margin-bottom: 10px;
padding: 8px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: flex-start;
margin-right: 100px;
}
input[type="text"] {
width: calc(100% - 22px);
padding: 10px;
border: none;
border-top: 1px solid #ccc;
}
button {
padding: 10px;
border: none;
background-color: #004085; /* Deep blue background for the send button */
color: white;
cursor: pointer;
border-radius: 0 0 8px 8px;
}
button:hover {
background-color: #002a5c; /* Darker deep blue on hover */
}
#chat-messages {
flex-grow: 1;
padding: 10px;
overflow-y: auto;
background-color: white;
}
.avatar-container {
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
}
.bot-avatar {
width: 50px;
height: 50px;
border-radius: 50%; /* Make the avatar circular */
background-color: #cce5ff; /* Match the bot message background color */
}
.user-message {
background-color: #d4edda; /* Green background for user messages */
margin-bottom: 10px;
padding: 8px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: flex-end;
margin-left: 100px;
}
.bot-message {
background-color: #cce5ff; /* Blue background for bot messages */
margin-bottom: 10px;
padding: 8px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: flex-start;
margin-right: 100px;
}
button {
padding: 10px;
border: none;
background-color: #004085; /* Deep blue background for the send button */
color: white;
cursor: pointer;
border-radius: 0 0 8px 8px;
}
button:hover {
background-color: #002a5c; /* Darker deep blue on hover */
}