-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6155e87
commit b379994
Showing
8 changed files
with
328 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build | ||
sdkconfig | ||
dist | ||
web/secrets.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
#chatbot-toggler { | ||
position: fixed; | ||
bottom: 18px; | ||
right: 18px; | ||
outline: none; | ||
border: none; | ||
height: 64px; | ||
width: 64px; | ||
display: flex; | ||
cursor: pointer; | ||
align-items: center; | ||
justify-content: center; | ||
border-radius: 50%; | ||
background: #724ae8; | ||
transition: all 0.2s ease; | ||
|
||
} | ||
|
||
#chatbot-toggler:hover { | ||
transform: scale(1.1); | ||
background: red; | ||
} | ||
|
||
#chatbot-toggler span { | ||
color: #fff; | ||
position: absolute; | ||
font-size: 20pt; | ||
} | ||
|
||
#chatbot-toggler span:last-child, | ||
body.show-chatbot #chatbot-toggler span:first-child { | ||
opacity: 0; | ||
} | ||
|
||
body.show-chatbot #chatbot-toggler span:last-child { | ||
opacity: 1; | ||
} | ||
|
||
#chatbot { | ||
position: fixed; | ||
right: 35px; | ||
bottom: 90px; | ||
width: 800px; | ||
z-index: 1000; | ||
background: #fff; | ||
border-radius: 15px; | ||
overflow: hidden; | ||
opacity: 0; | ||
pointer-events: none; | ||
transform: scale(0.5); | ||
transform-origin: bottom right; | ||
box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), | ||
0 32px 64px -48px rgba(0, 0, 0, 0.5); | ||
transition: all 0.1s ease; | ||
} | ||
|
||
body.show-chatbot #chatbot { | ||
opacity: 1; | ||
pointer-events: auto; | ||
transform: scale(1); | ||
} | ||
|
||
#chatbot header { | ||
padding: 16px 0; | ||
position: relative; | ||
text-align: center; | ||
color: #fff; | ||
background: #724ae8; | ||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
#chatbot header span { | ||
position: absolute; | ||
right: 15px; | ||
top: 50%; | ||
display: none; | ||
cursor: pointer; | ||
transform: translateY(-50%); | ||
} | ||
|
||
#chatbot>ul { | ||
overflow-y: auto; | ||
height: 510px; | ||
padding: 30px 20px 100px; | ||
} | ||
|
||
#chatbot>ul .chat { | ||
display: flex; | ||
list-style: none; | ||
} | ||
|
||
#chatbot>ul .outgoing { | ||
margin: 20px 0; | ||
justify-content: flex-end; | ||
} | ||
|
||
#chatbot>ul .incoming span { | ||
width: 32px; | ||
height: 32px; | ||
color: #fff; | ||
cursor: default; | ||
text-align: center; | ||
line-height: 32px; | ||
align-self: flex-end; | ||
background: #724ae8; | ||
border-radius: 4px; | ||
margin: 0 10px 7px 0; | ||
} | ||
|
||
#chatbot>ul .chat p { | ||
white-space: pre-wrap; | ||
padding: 12px 16px; | ||
border-radius: 10px 10px 0 10px; | ||
max-width: 75%; | ||
color: #fff; | ||
font-size: 0.95rem; | ||
background: #724ae8; | ||
} | ||
|
||
#chatbot>ul .incoming p { | ||
border-radius: 10px 10px 10px 0; | ||
} | ||
|
||
#chatbot>ul .chat p.error { | ||
color: #721c24; | ||
background: #f8d7da; | ||
} | ||
|
||
#chatbot>ul .incoming p { | ||
color: #000; | ||
background: #f2f2f2; | ||
} | ||
|
||
#chatbot>footer { | ||
display: flex; | ||
gap: 5px; | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
background: #fff; | ||
padding: 3px 20px; | ||
border-top: 1px solid #ddd; | ||
} | ||
|
||
#chatbot>footer>textarea { | ||
height: 55px; | ||
width: 100%; | ||
border: none; | ||
outline: none; | ||
resize: none; | ||
max-height: 180px; | ||
padding: 15px 15px 15px 0; | ||
font-size: 0.95rem; | ||
} | ||
|
||
#chatbot>footer>button { | ||
align-self: flex-end; | ||
color: #724ae8; | ||
cursor: pointer; | ||
height: 55px; | ||
display: flex; | ||
align-items: center; | ||
visibility: hidden; | ||
font-size: 1.35rem; | ||
} | ||
|
||
#chatbot>footer>textarea:valid~button { | ||
visibility: visible; | ||
} | ||
|
||
@media (max-width: 490px) { | ||
#chatbot-toggler { | ||
right: 20px; | ||
bottom: 20px; | ||
} | ||
|
||
#chatbot { | ||
right: 0; | ||
bottom: 0; | ||
height: 100%; | ||
border-radius: 0; | ||
width: 100%; | ||
} | ||
|
||
#chatbox { | ||
height: 90%; | ||
padding: 25px 15px 100px; | ||
} | ||
|
||
#chatbot .chat-input { | ||
padding: 5px 15px; | ||
} | ||
|
||
#chatbot header span { | ||
display: block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.