Upload htmlTemplates.py

#3
Files changed (1) hide show
  1. htmlTemplates.py +44 -0
htmlTemplates.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: #D0E0E3
8
+ }
9
+ .chat-message.bot {
10
+ background-color: #B6D7A8
11
+ }
12
+ .chat-message .avatar {
13
+ width: 100%;
14
+ }
15
+ .chat-message .avatar img {
16
+ max-width: 38px;
17
+ max-height: 38px;
18
+ border-radius: 30%;
19
+ object-fit: cover;
20
+ }
21
+ .chat-message .message {
22
+ width: 100%;
23
+ padding: 0 1.5rem;
24
+ color: #000;
25
+ }
26
+ '''
27
+
28
+ bot_template = '''
29
+ <div class="chat-message bot">
30
+ <div class="avatar">
31
+ <img src="Designer.png" alt="AI Avatar">
32
+ </div>
33
+ <div class="message">{{MSG}}</div>
34
+ </div>
35
+ '''
36
+
37
+ user_template = '''
38
+ <div class="chat-message user">
39
+ <div class="avatar">
40
+ <img src="renga_profile.jpg" alt="User Avatar">
41
+ </div>
42
+ <div class="message">{{MSG}}</div>
43
+ </div>
44
+ '''