PRIYANSHUDHAKED commited on
Commit
20d7b69
·
verified ·
1 Parent(s): de863a2

Update htmlTemplates.py

Browse files
Files changed (1) hide show
  1. htmlTemplates.py +42 -0
htmlTemplates.py CHANGED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ background-color: #2b313e
8
+ }
9
+ .chat-message.bot {
10
+ background-color: #475063
11
+ }
12
+ .chat-message .avatar {
13
+ width: 20%;
14
+ }
15
+ .chat-message .avatar img {
16
+ max-width: 78px;
17
+ max-height: 78px;
18
+ border-radius: 50%;
19
+ object-fit: cover;
20
+ }
21
+ .chat-message .message {
22
+ width: 80%;
23
+ padding: 0 1.5rem;
24
+ color: #fff;
25
+ }
26
+ '''
27
+ bot_template = '''
28
+ <div class="chat-message bot">
29
+ <div class="avatar">
30
+ <img src="https://i.ibb.co/cN0nmSj/Screenshot-2023-05-28-at-02-37-21.png" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
31
+ </div>
32
+ <div class="message">{{MSG}}</div>
33
+ </div>
34
+ '''
35
+ user_template = '''
36
+ <div class="chat-message user">
37
+ <div class="avatar">
38
+ <img src="https://cdn-icons-png.flaticon.com/512/5231/5231019.png">
39
+ </div>
40
+ <div class="message">{{MSG}}</div>
41
+ </div>
42
+ '''