ParthSadaria commited on
Commit
12f5eb9
·
verified ·
1 Parent(s): 5e13b53

Update playground.html

Browse files
Files changed (1) hide show
  1. playground.html +300 -282
playground.html CHANGED
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html>
2
  <html lang="en">
3
 
4
  <head>
@@ -13,321 +13,339 @@
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
14
 
15
  <style>
16
- @import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Protest+Revolution&display=swap');
17
-
18
- :root {
19
- --bg-dark: #0a0a0f;
20
- --bg-darker: #040409;
21
- --bg-deepest: #020205;
22
- --primary-blue: #4a6cf7;
23
- --secondary-blue: #6678e3;
24
- --accent-color: #7e57c2;
25
- --text-light: #e0e0e8;
26
- --text-muted: #8a8a9b;
27
- --border-color: #1a1a2e;
28
- --hover-color: rgba(78, 108, 247, 0.1);
29
- --delete-red: #ff4d4d;
30
- }
 
31
 
32
- * {
33
- margin: 0;
34
- padding: 0;
35
- box-sizing: border-box;
36
- scrollbar-width: thin;
37
- scrollbar-color: var(--primary-blue) transparent;
38
- }
39
 
40
- *::-webkit-scrollbar {
41
- width: 8px;
42
- }
43
 
44
- *::-webkit-scrollbar-track {
45
- background: transparent;
46
- }
47
 
48
- *::-webkit-scrollbar-thumb {
49
- background-color: var(--primary-blue);
50
- border-radius: 20px;
51
- }
52
 
53
- body {
54
- font-family: 'Inter', sans-serif;
55
- background-color: var(--bg-dark);
56
- color: var(--text-light);
57
- display: flex;
58
- justify-content: center;
59
- align-items: center;
60
- height: 100vh;
61
- overflow: hidden;
62
- perspective: 2000px;
63
- }
64
 
65
- .chat-wrapper {
66
- position: relative;
67
- width: 100%;
68
- max-width: 800px;
69
- height: 90vh;
70
- background-color: var(--bg-darker);
71
- border-radius: 24px;
72
- overflow: hidden;
73
- box-shadow: 0 20px 50px rgba(5, 5, 10, 0.7);
74
- display: flex;
75
- flex-direction: column;
76
- opacity: 1;
77
- transform: scale(1);
78
- transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
79
- border: 1px solid var(--border-color);
80
- }
81
 
82
- .watermark {
83
- position: absolute;
84
- bottom: 10px;
85
- right: 15px;
86
- color: var(--text-muted);
87
- font-size: 10px;
88
- opacity: 0.5;
89
- transition: opacity 0.3s ease;
90
- }
 
91
 
92
- .watermark:hover {
93
- opacity: 0.8;
94
- }
 
 
 
95
 
96
- .chat-header {
97
- background-color: var(--bg-deepest);
98
- padding: 15px 20px;
99
- display: flex;
100
- justify-content: space-between;
101
- align-items: center;
102
- border-bottom: 1px solid var(--border-color);
103
- }
 
 
 
 
104
 
105
- .header-actions {
106
- display: flex;
107
- align-items: center;
108
- gap: 10px;
109
- }
 
 
 
 
 
 
 
 
 
110
 
111
- .model-select {
112
- background-color: black;
113
- color: var(--text-light);
114
- border: 1px solid var(--border-color);
115
- border-radius: 8px;
116
- padding: 10px 14px;
117
- font-family: 'JetBrains Mono', monospace;
118
- font-size: 14px;
119
- cursor: pointer;
120
- transition: all 0.3s ease;
121
- }
122
 
123
- .clear-chat {
124
- background-color: var(--delete-red);
125
- color: white;
126
- border: none;
127
- border-radius: 8px;
128
- padding: 10px 14px;
129
- font-family: 'JetBrains Mono', monospace;
130
- font-size: 14px;
131
- cursor: pointer;
132
- transition: all 0.3s ease;
133
- display: flex;
134
- align-items: center;
135
- gap: 5px;
136
- }
137
 
138
- .clear-chat:hover {
139
- background-color: #ff6666;
140
- }
 
141
 
142
- .initial-input {
143
- flex: 1;
144
- display: flex;
145
- flex-direction: column;
146
- justify-content: center;
147
- align-items: center;
148
- padding: 24px;
149
- text-align: center;
150
- background: linear-gradient(145deg, var(--bg-dark), var(--bg-darker));
151
- transition: all 0.5s ease;
152
- }
153
 
154
- .initial-input h2 {
155
- font-size: 24px;
156
- margin-bottom: 16px;
157
- color: var(--text-light);
158
- font-weight: 600;
159
- font-family: 'JetBrains Mono', monospace;
160
- }
161
 
162
- .input-container {
163
- width: 100%;
164
- max-width: 400px;
165
- position: relative;
166
- }
 
167
 
168
- .initial-input input,
169
- .chat-input input {
170
- width: 100%;
171
- padding: 16px 24px;
172
- background-color: rgba(30, 30, 50, 0.8);
173
- border: 1px solid var(--border-color);
174
- border-radius: 12px;
175
- color: var(--text-light);
176
- font-size: 16px;
177
- font-family: 'JetBrains Mono', monospace;
178
- outline: none;
179
- transition: all 0.3s ease;
180
- }
181
 
182
- .initial-input input:focus,
183
- .chat-input input:focus {
184
- border-color: var(--primary-blue);
185
- box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
186
- }
187
 
188
- .send-icon {
189
- position: absolute;
190
- right: 12px;
191
- top: 50%;
192
- transform: translateY(-50%);
193
- background-color: var(--primary-blue);
194
- border-radius: 8px;
195
- width: 40px;
196
- height: 40px;
197
- display: flex;
198
- justify-content: center;
199
- align-items: center;
200
- cursor: pointer;
201
- transition: all 0.3s ease;
202
- }
203
 
204
- .send-icon:hover {
205
- background-color: var(--accent-color);
206
- transform: translateY(-50%) scale(1.05);
207
- border-radius: 15px;
208
- }
 
 
209
 
210
- .chat-container {
211
- display: none;
212
- flex-direction: column;
213
- height: 100%;
214
- }
215
 
216
- .chat-messages {
217
- flex: 1;
218
- overflow-y: auto;
219
- padding: 20px;
220
- display: flex;
221
- flex-direction: column;
222
- gap: 16px;
223
- background-color: var(--bg-dark);
224
- font-family: 'JetBrains Mono', monospace;
225
- overscroll-behavior: contain;
226
- }
 
227
 
228
- .message {
229
- max-width: 80%;
230
- width: fit-content;
231
- padding: 12px 18px;
232
- border-radius: 12px;
233
- font-size: 14px;
234
- line-height: 1.5;
235
- opacity: 0;
236
- transform: translateY(20px);
237
- animation: fadeIn 0.4s forwards;
238
- position: relative;
239
- overflow: hidden;
240
- }
 
 
241
 
242
- .message::before {
243
- content: '';
244
- position: absolute;
245
- top: 0;
246
- left: 0;
247
- right: 0;
248
- bottom: 0;
249
- background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1));
250
- opacity: 0;
251
- transition: opacity 0.3s ease;
252
- }
253
 
254
- .message:hover::before {
255
- opacity: 1;
256
- }
 
 
 
 
 
 
 
257
 
258
- .message.user {
259
- align-self: flex-end;
260
- background-color: var(--primary-blue);
261
- color: white;
262
- }
 
263
 
264
- .message.bot {
265
- align-self: flex-start;
266
- background-color: rgba(40, 40, 70, 0.8);
267
- color: var(--text-light);
268
- border: 1px solid var(--border-color);
269
- }
 
 
 
 
 
270
 
271
- .chat-input {
272
- display: flex;
273
- gap: 12px;
274
- padding: 16px;
275
- background-color: var(--bg-darker);
276
- border-top: 1px solid var(--border-color);
277
- }
 
 
 
 
 
 
 
278
 
279
- .chat-input button {
280
- background-color: var(--accent-color);
281
- color: white;
282
- border: none;
283
- border-radius: 12px;
284
- padding: 12px 24px;
285
- cursor: pointer;
286
- font-family: 'JetBrains Mono', monospace;
287
- transition: all 0.3s ease;
288
- }
289
 
290
- .chat-input button:hover {
291
- background-color: var(--primary-blue);
292
- transform: scale(1.02);
293
- }
 
 
 
 
 
 
294
 
295
- @keyframes fadeIn {
296
- to {
297
- opacity: 1;
298
- transform: translateY(0);
299
- }
300
- }
301
- /* Dark theme customization for Select2 */
302
- .select2-container--default .select2-selection--single {
303
- background-color: #333; /* Dark background */
304
- color: white; /* White text */
305
- border: 1px solid #555; /* Dark border */
306
- font-size: 14px;
307
- }
308
 
309
- /* Customize selected item background */
310
- .select2-container--default .select2-selection--single .select2-selection__rendered {
311
- background-color: #333; /* Dark background */
312
- color: white; /* White text */
313
- }
 
 
314
 
315
- .select2-dropdown {
316
- background-color: #333; /* Dark dropdown background */
317
- color: white; /* White text in dropdown */
318
- max-height: 300px; /* Limit dropdown height */
319
- overflow-y: auto; /* Add scrollbar */
320
- }
321
 
322
- .select2-container--default .select2-results__option {
323
- background-color: #333; /* Dark background for options */
324
- color: white; /* White text for options */
325
- }
 
 
 
 
 
 
 
 
 
 
 
 
326
 
327
- .select2-container--default .select2-results__option--highlighted {
328
- background-color: #555; /* Highlighted option color */
329
- color: white; /* White text on hover */
330
- }
331
  </style>
332
  </head>
333
 
@@ -381,7 +399,7 @@
381
  <div class="chat-messages" id="chatMessages"></div>
382
  <div class="chat-input">
383
  <input type="text" id="chatInput" placeholder="Type your message...">
384
- <button id="sendButton">Send</button>
385
  </div>
386
  </div>
387
  </div>
 
1
+ <!DOCTYPE html>
2
  <html lang="en">
3
 
4
  <head>
 
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
14
 
15
  <style>
16
+ @import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Protest+Revolution&display=swap');
17
+ :root {
18
+ --bg-dark: #0a0a0f;
19
+ --bg-darker: #040409;
20
+ --bg-deepest: #020205;
21
+ --primary-blue: #4a6cf7;
22
+ --secondary-blue: #6678e3;
23
+ --accent-color: #7e57c2;
24
+ --text-light: #e0e0e8;
25
+ --text-muted: #8a8a9b;
26
+ --border-color: #1a1a2e;
27
+ --hover-color: rgba(78, 108, 247, 0.1);
28
+ --delete-red: #ff4d4d;
29
+ --header-height: 60px;
30
+ --input-height: 80px;
31
+ }
32
 
33
+ * {
34
+ margin: 0;
35
+ padding: 0;
36
+ box-sizing: border-box;
37
+ scrollbar-width: thin;
38
+ scrollbar-color: var(--primary-blue) transparent;
39
+ }
40
 
41
+ *::-webkit-scrollbar {
42
+ width: 8px;
43
+ }
44
 
45
+ *::-webkit-scrollbar-track {
46
+ background: transparent;
47
+ }
48
 
49
+ *::-webkit-scrollbar-thumb {
50
+ background-color: var(--primary-blue);
51
+ border-radius: 20px;
52
+ }
53
 
54
+ body {
55
+ font-family: 'Inter', sans-serif;
56
+ background-color: var(--bg-dark);
57
+ color: var(--text-light);
58
+ display: flex;
59
+ justify-content: center;
60
+ align-items: center;
61
+ height: 100vh;
62
+ overflow: hidden;
63
+ perspective: 2000px;
64
+ }
65
 
66
+ .chat-wrapper {
67
+ position: relative;
68
+ width: 100%;
69
+ max-width: 800px;
70
+ height: 90vh;
71
+ background-color: var(--bg-darker);
72
+ border-radius: 24px;
73
+ overflow: hidden;
74
+ box-shadow: 0 20px 50px rgba(5, 5, 10, 0.7);
75
+ display: flex;
76
+ flex-direction: column;
77
+ opacity: 1;
78
+ transform: scale(1);
79
+ transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
80
+ border: 1px solid var(--border-color);
81
+ }
82
 
83
+ .chat-header {
84
+ background-color: var(--bg-deepest);
85
+ padding: 15px 20px;
86
+ display: flex;
87
+ justify-content: space-between;
88
+ align-items: center;
89
+ border-bottom: 1px solid var(--border-color);
90
+ flex-shrink: 0;
91
+ height: var(--header-height);
92
+ }
93
 
94
+ .chat-container {
95
+ display: none;
96
+ flex-direction: column;
97
+ height: calc(100% - var(--header-height));
98
+ position: relative;
99
+ }
100
 
101
+ .chat-messages {
102
+ flex: 1;
103
+ overflow-y: auto;
104
+ padding: 20px;
105
+ display: flex;
106
+ flex-direction: column;
107
+ gap: 16px;
108
+ background-color: var(--bg-dark);
109
+ font-family: 'JetBrains Mono', monospace;
110
+ height: calc(100% - var(--input-height));
111
+ margin-bottom: var(--input-height);
112
+ }
113
 
114
+ .chat-input {
115
+ position: absolute;
116
+ bottom: 0;
117
+ left: 0;
118
+ right: 0;
119
+ background-color: var(--bg-darker);
120
+ border-top: 1px solid var(--border-color);
121
+ padding: 16px;
122
+ height: var(--input-height);
123
+ display: flex;
124
+ gap: 12px;
125
+ z-index: 10;
126
+ align-items: center;
127
+ }
128
 
129
+ .chat-input-container {
130
+ position: relative;
131
+ flex: 1;
132
+ display: flex;
133
+ align-items: center;
134
+ }
 
 
 
 
 
135
 
136
+ .chat-input input {
137
+ width: 100%;
138
+ padding: 12px 16px;
139
+ padding-right: 50px; /* Space for send icon */
140
+ background-color: rgba(30, 30, 50, 0.8);
141
+ border: 1px solid var(--border-color);
142
+ border-radius: 12px;
143
+ color: var(--text-light);
144
+ font-size: 14px;
145
+ font-family: 'JetBrains Mono', monospace;
146
+ outline: none;
147
+ }
 
 
148
 
149
+ .chat-input input:focus {
150
+ border-color: var(--primary-blue);
151
+ box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
152
+ }
153
 
154
+ .message {
155
+ max-width: 80%;
156
+ width: fit-content;
157
+ padding: 12px 18px;
158
+ border-radius: 12px;
159
+ font-size: 14px;
160
+ line-height: 1.5;
161
+ position: relative;
162
+ animation: fadeIn 0.4s forwards;
163
+ margin-bottom: 8px;
164
+ }
165
 
166
+ .message.user {
167
+ align-self: flex-end;
168
+ background-color: var(--primary-blue);
169
+ color: white;
170
+ }
 
 
171
 
172
+ .message.bot {
173
+ align-self: flex-start;
174
+ background-color: rgba(40, 40, 70, 0.8);
175
+ color: var(--text-light);
176
+ border: 1px solid var(--border-color);
177
+ }
178
 
179
+ .message::before {
180
+ content: '';
181
+ position: absolute;
182
+ top: 0;
183
+ left: 0;
184
+ right: 0;
185
+ bottom: 0;
186
+ background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1));
187
+ opacity: 0;
188
+ transition: opacity 0.3s ease;
189
+ }
 
 
190
 
191
+ .message:hover::before {
192
+ opacity: 1;
193
+ }
 
 
194
 
195
+ .initial-input {
196
+ flex: 1;
197
+ display: flex;
198
+ flex-direction: column;
199
+ justify-content: center;
200
+ align-items: center;
201
+ padding: 24px;
202
+ text-align: center;
203
+ background: linear-gradient(145deg, var(--bg-dark), var(--bg-darker));
204
+ }
 
 
 
 
 
205
 
206
+ .initial-input h2 {
207
+ font-size: 24px;
208
+ margin-bottom: 16px;
209
+ color: var(--text-light);
210
+ font-weight: 600;
211
+ font-family: 'JetBrains Mono', monospace;
212
+ }
213
 
214
+ .input-container {
215
+ width: 100%;
216
+ max-width: 400px;
217
+ position: relative;
218
+ }
219
 
220
+ .initial-input input {
221
+ width: 100%;
222
+ padding: 16px 24px;
223
+ background-color: rgba(30, 30, 50, 0.8);
224
+ border: 1px solid var(--border-color);
225
+ border-radius: 12px;
226
+ color: var(--text-light);
227
+ font-size: 16px;
228
+ font-family: 'JetBrains Mono', monospace;
229
+ outline: none;
230
+ transition: all 0.3s ease;
231
+ }
232
 
233
+ .send-icon {
234
+ position: absolute;
235
+ right: 12px;
236
+ top: 50%;
237
+ transform: translateY(-50%);
238
+ background-color: var(--primary-blue);
239
+ border-radius: 8px;
240
+ width: 40px;
241
+ height: 40px;
242
+ display: flex;
243
+ justify-content: center;
244
+ align-items: center;
245
+ cursor: pointer;
246
+ transition: all 0.3s ease;
247
+ }
248
 
249
+ .send-icon:hover {
250
+ background-color: var(--accent-color);
251
+ transform: translateY(-50%) scale(1.05);
252
+ border-radius: 15px;
253
+ }
 
 
 
 
 
 
254
 
255
+ @keyframes fadeIn {
256
+ from {
257
+ opacity: 0;
258
+ transform: translateY(20px);
259
+ }
260
+ to {
261
+ opacity: 1;
262
+ transform: translateY(0);
263
+ }
264
+ }
265
 
266
+ /* Header actions */
267
+ .header-actions {
268
+ display: flex;
269
+ align-items: center;
270
+ gap: 10px;
271
+ }
272
 
273
+ .model-select {
274
+ background-color: black;
275
+ color: var(--text-light);
276
+ border: 1px solid var(--border-color);
277
+ border-radius: 8px;
278
+ padding: 10px 14px;
279
+ font-family: 'JetBrains Mono', monospace;
280
+ font-size: 14px;
281
+ cursor: pointer;
282
+ transition: all 0.3s ease;
283
+ }
284
 
285
+ .clear-chat {
286
+ background-color: var(--delete-red);
287
+ color: white;
288
+ border: none;
289
+ border-radius: 8px;
290
+ padding: 10px 14px;
291
+ font-family: 'JetBrains Mono', monospace;
292
+ font-size: 14px;
293
+ cursor: pointer;
294
+ transition: all 0.3s ease;
295
+ display: flex;
296
+ align-items: center;
297
+ gap: 5px;
298
+ }
299
 
300
+ .clear-chat:hover {
301
+ background-color: #ff6666;
302
+ }
 
 
 
 
 
 
 
303
 
304
+ .watermark {
305
+ position: absolute;
306
+ bottom: 10px;
307
+ right: 15px;
308
+ color: var(--text-muted);
309
+ font-size: 10px;
310
+ opacity: 0.5;
311
+ transition: opacity 0.3s ease;
312
+ z-index: 11;
313
+ }
314
 
315
+ .watermark:hover {
316
+ opacity: 0.8;
317
+ }
 
 
 
 
 
 
 
 
 
 
318
 
319
+ /* Select2 customization */
320
+ .select2-container--default .select2-selection--single {
321
+ background-color: #333;
322
+ color: white;
323
+ border: 1px solid #555;
324
+ font-size: 14px;
325
+ }
326
 
327
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
328
+ background-color: #333;
329
+ color: white;
330
+ }
 
 
331
 
332
+ .select2-dropdown {
333
+ background-color: #333;
334
+ color: white;
335
+ max-height: 300px;
336
+ overflow-y: auto;
337
+ }
338
+
339
+ .select2-container--default .select2-results__option {
340
+ background-color: #333;
341
+ color: white;
342
+ }
343
+
344
+ .select2-container--default .select2-results__option--highlighted {
345
+ background-color: #555;
346
+ color: white;
347
+ }
348
 
 
 
 
 
349
  </style>
350
  </head>
351
 
 
399
  <div class="chat-messages" id="chatMessages"></div>
400
  <div class="chat-input">
401
  <input type="text" id="chatInput" placeholder="Type your message...">
402
+ <button id="sendButton" style="padding: 10px 10px; background-color: black;color: #e0e0e8; font-family: 'JetBrains Mono'; border: solid #1a1a2e 2px; border-radius: 15px;">Send</button>
403
  </div>
404
  </div>
405
  </div>