-
Notifications
You must be signed in to change notification settings - Fork 0
/
htmlTemplates.py
46 lines (44 loc) · 992 Bytes
/
htmlTemplates.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
css = """
<style>
.chat-message {
padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1.5rem; display: flex
}
.chat-message.user {
background-color: #f0ead6; /* light yellow */
}
.chat-message.bot {
background-color: #e6e9f0; /* light blue */
}
.chat-message .avatar {
width: 20%;
flex-shrink: 0; /* Prevents shrinking of the avatar, keeping it at its set width */
}
.chat-message .avatar img {
max-width: 50px;
max-height: 50px;
border-radius: 50%;
object-fit: cover;
}
.chat-message .message {
width: 80%;
padding: 0 1.5rem;
color: #333333; /* dark gray */
}
</style>
"""
bot_template = """
<div class="chat-message bot">
<div class="avatar">
<img src="./app/static/snoopy.png">
</div>
<div class="message">{{MSG}}</div>
</div>
"""
user_template = """
<div class="chat-message user">
<div class="avatar">
<img src="./app/static/woodstock.png">
</div>
<div class="message">{{MSG}}</div>
</div>
"""