akashsinghthakur commited on
Commit
3f4bf0b
·
verified ·
1 Parent(s): 12a5c6e

Update httpTemplates.py

Browse files
Files changed (1) hide show
  1. httpTemplates.py +45 -0
httpTemplates.py CHANGED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ css = '''
2
+ <style>
3
+ .chat-message {
4
+ padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex
5
+ }
6
+ .chat-message.user {
7
+ align: right,
8
+ background-color: #2b313e
9
+ }
10
+ .chat-message.bot {
11
+ background-color: #475063
12
+ }
13
+ .chat-message .avatar {
14
+ width: 20%;
15
+ }
16
+ .chat-message .avatar img {
17
+ max-width: 78px;
18
+ max-height: 78px;
19
+ border-radius: 50%;
20
+ object-fit: cover;
21
+ }
22
+ .chat-message .message {
23
+ width: 80%;
24
+ padding: 0 1.5rem;
25
+ color: #fff;
26
+ }
27
+ '''
28
+ bot_template = '''
29
+ <div class="chat-message bot">
30
+ <div class="avatar">
31
+ <img src="https://cdn-icons-png.flaticon.com/512/6134/6134346.png" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
32
+ </div>
33
+ <div class="message">{{MSG}}</div>
34
+ </div>
35
+ '''
36
+
37
+ user_template = '''
38
+ <div class="chat-message user">
39
+ <div class="message" style="text-align:right">{{MSG}}</div>
40
+ <div class="avatar">
41
+ <img src="https://png.pngtree.com/png-vector/20190321/ourmid/pngtree-vector-users-icon-png-image_856952.jpg">
42
+ </div>
43
+
44
+ </div>
45
+ '''