Skip to content

Commit

Permalink
css
Browse files Browse the repository at this point in the history
  • Loading branch information
scenaristeur committed Dec 15, 2023
1 parent 34babe0 commit 0bddc6c
Showing 1 changed file with 156 additions and 0 deletions.
156 changes: 156 additions & 0 deletions src/components/ChatBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default {
};
</script>


<style scoped>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');
Expand All @@ -83,4 +84,159 @@ export default {
overflow: hidden;
font-family: 'Roboto', sans-serif;
}
h1 {
font-size: 24px;
font-weight: 500;
text-align: center;
color: #222;
padding: 16px;
margin: 0;
background-color: #f7f7f7;
border-bottom: 1px solid #e7e7e7;
}
.messageBox {
padding: 16px;
flex-grow: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 12px;
}
.messageFromUser,
.messageFromChatGpt {
display: flex; }
.messageBox {
max-height: 400px;
overflow-y: auto;
padding: 0 16px;
border-top: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
flex-grow: 1;
}
.messageFromUser,
.messageFromChatGpt {
display: flex;
margin-bottom: 8px;
}
.userMessageWrapper,
.chatGptMessageWrapper {
display: flex;
flex-direction: column;
}
.userMessageWrapper {
align-self: flex-end;
}
.chatGptMessageWrapper {
align-self: flex-start;
}
.userMessageContent,
.chatGptMessageContent {
max-width: 60%;
padding: 8px 12px;
border-radius: 18px;
margin-bottom: 2px;
font-size: 14px;
line-height: 1.4;
}
.userMessageContent {
background-color: #1877F2;
color: white;
border-top-left-radius: 0;
}
.chatGptMessageContent {
background-color: #EDEDED;
color: #222;
border-top-right-radius: 0;
}
.userMessageTimestamp,
.chatGptMessageTimestamp {
font-size: 10px;
color: #999;
margin-top: 2px;
}
.userMessageTimestamp {
align-self: flex-end;
}
.chatGptMessageTimestamp {
align-self: flex-start;
}
.inputContainer {
display: flex;
align-items: center;
padding: 8px;
background-color: #f0f0f0;
}
.messageInput {
flex-grow: 1;
border: none;
outline: none;
padding: 12px;
font-size: 16px;
background-color: white;
border-radius: 24px;
margin-right: 8px;
}
.askButton {
background-color: #1877F2;
color: white;
font-size: 16px;
padding: 8px 16px;
border: none;
outline: none;
cursor: pointer;
border-radius: 24px;
transition: background-color 0.3s ease-in-out;
}
.askButton:hover {
background-color: #145CB3;
}
@media (max-width: 480px) {
.container {
width: 100%;
max-width: none;
border-radius: 0;
}
}
.chatbox-container {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 1000;
}
.messageBox {
padding: 16px;
flex-grow: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 12px;
}
.messageFromUser,
.messageFromChatGpt {
display: flex;
}
</style>

0 comments on commit 0bddc6c

Please sign in to comment.