-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatic.py
157 lines (131 loc) · 4.38 KB
/
static.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
css_styles = '''
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
}
.centered {
position: absolute; /* Position absolutely */
top: 50%; /* Position the top edge of the element in the middle of the container */
left: 50%; /* Position the left edge of the element in the middle of the container */
transform: translate(-50%, -50%); /* Offset the element by half its width and height */
}
.avatar {
padding-left: 18%;
}
.chat-container {
align-items: flex-start; /* Align items to the start of the flex container */
width: 100%;
max-width: 800px;
height: calc(100vh - 40px); /* Adjust height based on your UI */
margin-top: 10px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 10px;
margin-left: 25px;
margin-right: 10px;
position: relative;
overflow-y: auto;
margin-bottom: 10px; /* Space before the chat input */
box-shadow:
-8px -8px 12px 0 rgba(0, 0, 0, 0.3),
12px 12px 16px rgba(255, 255, 255, 0.25);
}
.message {
background-color: #f9f9f9;
padding: 10px;
margin-bottom: 10px;
border-radius: 6px;
}
.message.sender {
background-color: #e6f7ff;
text-align: right;
}
.message.sender .message-text {
color: #007bff;
}
.message.sender .message-sender {
font-weight: bold;
}
.container {
display: flex; /* Use flexbox layout */
align-items: flex-start; /* Align items to the start of the flex container */
max-width: 100%; /* Maximum width of the container */
width: 100%;
margin: auto; /* Center the container */
position: absolute;
left: 0;
box-shadow:
12px 12px 16px 0 rgba(0, 0, 0, 0.25),
-8px -8px 12px 0 rgba(255, 255, 255, 0.3);
}
.form-container {
width: 99%;
display: flex;
flex-direction: column;
background-color: #f0f0f0;
height: 95vh; /* Make the chat container take up the full viewport height */
border-radius: 8px;
justify-content: space-between;
flex: 1; /* Take up the other half of the container space */
margin-left: 10px; /* Add some space between the form and the chat container */
margin-top: 10px;
}
.chat-input {
margin-top: 30px;
margin-bottom: 0px;
}
.submit {
background: linear-gradient(-45deg, rgba(0,0,0,0.1), rgba(200,200,200,0.05));
border-radius: 8px;
background-color: #f9f9f9;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
border: none;
width: 101%;
margin-top: 10px;
}
#messageInput {
width: 97%; /* Take up the full width of the form container */
border: none;
}
.custom-select {
padding: 5px 4px 5px 4px; /* Adjust padding to your preference */
}
textarea {
height: 30vh;
border-radius: 10px;
border: none;
padding: 8px;
box-shadow:
-8px -8px 12px 0 rgba(0, 0, 0, 0.3),
12px 12px 16px rgba(255, 255, 255, 0.25);
}
select {
border-radius: 10px;
border: none;
padding: 8px;
}
.input-element {
box-shadow:
-8px 8px 12px 0 rgba(0, 0, 0, 0.3),
12px -12px 16px rgba(255, 255, 255, 0.25);
}
.avatar-button {
max-width: 49%;
margin-bottom: 8px;
}
.chat-button {
margin-right: 0px;
}
.message-datetime {
font-size: 0.8em;
color: #888;
margin-top: 5px;
}
'''
chat_js = '''
<script>
</script>
'''