-
Notifications
You must be signed in to change notification settings - Fork 0
/
htmlTemplates.py
44 lines (42 loc) · 1020 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
css = '''
<style>
.chat-message {
padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex
}
.chat-message.user {
background-color: #2b313e
}
.chat-message.bot {
background-color: #475063
}
.chat-message .avatar {
width: 12%;
}
.chat-message .avatar img {
max-width: 60px;
max-height: 60px;
border-radius: 50%;
object-fit: cover;
}
.chat-message .message {
width: 90%;
padding: 0 .35rem;
color: #fff;
}
'''
bot_template = '''
<div class="chat-message bot">
<div class="avatar">
<img src="https://www.sideshow.com/storage/product-images/2171/c-3po_star-wars_square.jpg">
</div>
<div class="message">{{MSG}}</div>
</div>
'''
user_template = '''
<div class="chat-message user">
<div class="avatar">
<img src="https://resizing.flixster.com/ocuc8yjm8Fu5UK5Ze8lbdp58m9Y=/300x300/v2/https://flxt.tmsimg.com/assets/p11759522_i_h9_aa.jpg">
</div>
<div class="message">{{MSG}}</div>
</div>
'''