forked from 0xvish/Learn-Smart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
htmlTemplates.py
53 lines (50 loc) · 1.35 KB
/
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
47
48
49
50
51
52
53
css = '''
<style>
.chat-message {
padding: 20px; border-radius: 0.5rem; margin-bottom: 1rem; display: flex; items-align: center;
}
.chat-message.user {
background-color: #262730
}
.chat-message.bot {
background-color: #262730
}
.chat-message .avatar {
width: 10%;
}
.chat-message .avatar img {
max-width: 78px;
max-height: 78px;
border-radius: 50%;
object-fit: cover;
}
.chat-message .message-user {
display: flex;
width: 90%;
justify-content: right;
item-align: center;
padding: 0 1.5rem;
color: #fff;
}
.chat-message .message-bot {
width: 90%;
padding: 0 1.5rem;
color: #fff;
}
'''
bot_template = '''
<div class="chat-message bot">
<div class="avatar">
<img src="https://cdn3d.iconscout.com/3d/premium/thumb/chatbot-3d-icon-download-in-png-blend-fbx-gltf-file-formats--communication-robotic-talk-online-blog-innovation-pack-appliances-icons-5627910.png?f=webp" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
</div>
<div class="message-bot">{{MSG}}</div>
</div>
'''
user_template = '''
<div class="chat-message user">
<div class="message-user">{{MSG}}</div>
<div class="avatar">
<img src="https://cdn3d.iconscout.com/3d/premium/thumb/user-3d-icon-download-in-png-blend-fbx-gltf-file-formats--avatar-profile-man-interface-pack-icons-5209354.png">
</div>
</div>
'''