-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtmlTemplates.py
More file actions
56 lines (53 loc) · 1.21 KB
/
htmlTemplates.py
File metadata and controls
56 lines (53 loc) · 1.21 KB
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
47
48
49
50
51
52
53
54
55
56
css = '''
<style>
.chat-message {
padding: 1.5rem;
border-radius: 0.5rem;
margin-bottom: 1rem;
display: flex;
flex-direction: row;
align-items: flex-start;
color: #00008B; /* Dark blue font color */
}
.chat-message.user {
background-color: #f5f5f5;
border: 1px solid #e0e0e0;
}
.chat-message.bot {
background-color: #e6f7ff;
border: 1px solid #c8e1ff;
}
.chat-message .avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
margin-right: 1rem;
}
.chat-message .message {
flex-grow: 1;
padding: 0;
margin: 0;
}
.chat-message .message p {
margin: 0;
padding: 0;
}
</style>
'''
bot_template = '''
<div class="chat-message bot">
<div class="avatar">
<img src="cb-robot.png" style="max-width: 40px; max-height: 40px;">
</div>
<div class="message">{{MSG}}</div>
</div>
'''
user_template = '''
<div class="chat-message user">
<div class="avatar">
<img src="user.jpeg" style="max-width: 40px; max-height: 40px;">
</div>
<div class="message">{{MSG}}</div>
</div>
'''