Reality123b commited on
Commit
3c9310d
·
verified ·
1 Parent(s): f92e36b

Update application/templates/index.html

Browse files
Files changed (1) hide show
  1. application/templates/index.html +389 -429
application/templates/index.html CHANGED
@@ -1,502 +1,462 @@
1
- <!-- templates/index.html -->
2
  <!DOCTYPE html>
3
  <html lang="en">
4
  <head>
 
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Xylaria Chat</title>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
 
 
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/atom-one-dark.min.css">
10
- <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
11
- <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
12
  <style>
13
- /* --- static/css/style.css --- */
14
-
15
- /* Reset and basic styles */
16
- * {
17
- box-sizing: border-box;
18
- margin: 0;
 
 
 
 
 
 
 
 
19
  padding: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
-
22
- body {
23
- font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
24
- background-color: #1c1c1e; /* Dark background */
25
- color: #ececf1; /* Light text */
26
  display: flex;
27
  flex-direction: column;
28
- height: 100vh;
29
- overflow: hidden; /* Prevent scrolling on the body itself */
 
 
 
 
 
 
30
  }
31
-
32
- /* Top Bar */
33
- .top-bar {
34
- display: flex;
35
- justify-content: space-between;
36
- align-items: center;
37
- padding: 0.5rem 1rem;
38
- background-color: #28282a; /* Slightly lighter than main background */
39
- border-bottom: 1px solid #444654;
40
- height: 35px; /* Fixed height */
41
  }
42
-
43
- .memory-status {
44
- color: #f4c35e; /* Yellowish for "Memory Full" */
 
45
  }
46
-
47
- .share-button {
48
- background: none;
49
- border: none;
50
- color: #ececf1;
51
- cursor: pointer;
52
- padding: 0.5rem;
53
- border-radius: 0.375rem; /* Rounded corners */
54
  }
55
- .share-button:hover{
56
- background-color: #3f3f46;
 
57
  }
58
- /* Sidebar */
59
- .sidebar {
60
- width: 0px; /*Initially hidden*/
61
- background-color: #202123;
62
- overflow-y: auto;
63
- transition: width 0.5s ease; /* Smooth transition */
64
- position: fixed; /* Fixed position */
65
- top: 35px; /* Below the top bar */
66
- height: calc(100vh - 35px); /* Fill the remaining height */
67
- z-index: 100; /* Make sure it's above other content */
68
-
69
- }
70
-
71
- .new-chat-button {
72
  display: flex;
73
- align-items: center;
74
- padding: 1rem;
75
- color: #ececf1;
76
- cursor: pointer;
77
- border-bottom: 1px solid #444654;
78
- }
79
-
80
- .new-chat-button i {
81
- margin-right: 0.75rem;
82
  }
83
- .new-chat-button:hover{
84
- background-color: #3f3f46;
 
 
 
 
 
 
 
85
  }
86
-
87
- .chat-history {
88
- padding: 0.5rem;
89
  }
90
-
91
- .chat-history > div { /* Style for individual chat history items */
92
- padding: 0.75rem;
93
- cursor: pointer;
94
- border-radius: 0.375rem; /* Match input box rounding */
95
- transition: background-color 0.2s ease;
96
- white-space: nowrap; /* Prevent text wrapping */
97
- overflow: hidden; /* Hide overflowing text */
98
- text-overflow: ellipsis; /* Add ellipsis for long titles */
99
-
100
- }
101
- .chat-history > div:hover{
102
- background-color: #3f3f46;
103
- }
104
-
105
-
106
- /* Main Container */
107
- .main-container {
108
  display: flex;
109
  flex-direction: column;
110
- flex: 1;
111
- overflow: hidden; /* Hide scrollbars, scrolling handled within children */
112
- position: relative; /* For absolute positioning of elements inside */
113
- width: 99%;
114
- height: calc(100vh - 35px); /*takes the full height except topbar*/
115
- top: 35px; /*pushes the container down from top bar.*/
116
-
117
- }
118
-
119
- /* Messages Area */
120
- .messages {
121
- flex: 1; /* Take up all available space */
122
- overflow-y: auto; /* Enable vertical scrolling */
123
- padding: 1rem;
124
- display: flex;
125
- flex-direction: column; /* Stack messages vertically */
126
-
127
- }
128
-
129
- /* Individual message styles (User and AI) */
130
- .user {
131
- background-color: rgba(51, 51, 51, 0.4); /* Darker background */
132
- color: #b4b4b4; /* Lighter text */
133
- padding: 15px;
134
- margin: 10px 10px 5px auto; /* Push to the right */
135
- border-radius: 10px; /* Rounded corners */
136
- line-height: 1.4; /* Comfortable line spacing */
137
- max-width: 70%; /* Limit width */
138
- word-wrap: break-word; /* Handles long words/links */
139
- align-self: flex-end; /* Align to the right */
140
- }
141
-
142
- .ai {
143
- background-color: rgba(28, 28, 28, 0.5); /* Slightly lighter background */
144
- color: #c5c5c5; /* Lighter text */
145
- padding: 20px;
146
- border-radius: 10px; /* Rounded corners */
147
- border: 1px solid rgba(255,255,255,0.1);
148
- margin: 10px auto 5px 5px; /* Push to the left */
149
- line-height: 1.4; /* Comfortable line spacing */
150
- max-width: 70%; /* Limit width */
151
- word-wrap: break-word; /* Handles long words/links */
152
- align-self: flex-start; /* Align to the left */
153
-
154
- }
155
-
156
- .ai p {
157
- margin: 0; /* Remove default paragraph margins */
158
- }
159
-
160
- /* Input Area */
161
- .input-area {
162
- position: relative;
163
- padding: 1rem;
164
- border-top: 1px solid #444654;
165
- display: flex;
166
- flex-direction: column; /* Stack elements vertically */
167
- align-items: center; /* Center horizontally */
168
- justify-content: center;
169
  }
170
-
171
- .input-box {
 
 
172
  display: flex;
173
- width: 70%;
 
 
 
 
 
174
  position: relative;
175
- margin-bottom: 0.75rem;
176
-
177
  }
178
-
179
- .input-box textarea {
180
- flex: 1; /* Let textarea take up available space */
181
- resize: none; /* Disable manual resizing */
182
- border: none;
183
- border-radius: 20px; /* Rounded corners */
184
- padding: 0.75rem 3rem 0.75rem 1rem; /* Padding, with extra space on the right */
185
- background-color: #40414f;
186
- color: #ececf1;
187
- outline: none; /* Remove focus outline */
188
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow */
189
-
190
- }
191
-
192
- .input-box button {
 
 
 
 
 
 
193
  position: absolute;
194
- right: 0.5rem; /* Position inside the input box */
195
- top: 50%;
196
- transform: translateY(-50%);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  background: none;
 
198
  border: none;
199
- color: #9f9fa5;
 
 
 
 
 
 
 
200
  cursor: pointer;
201
- padding: 0.5rem;
202
- font-size: 1.25rem;
203
- border-radius: 5px;
204
- z-index: 1000; /* Ensure it's above the textarea */
205
- }
206
-
207
- .input-box button:hover{
208
- background-color: #555;
209
- }
210
-
211
- /* Disclaimer */
212
- .disclaimer {
213
- color: #9f9fa5;
214
- font-size: 0.75rem;
215
- text-align: center;
216
- margin-top: 0.5rem;
217
-
218
  }
219
- /* Custom Scrollbar */
220
- /* (This works in WebKit-based browsers like Chrome and Safari) */
221
- ::-webkit-scrollbar {
222
- width: 8px; /* Width of the scrollbar */
 
 
 
223
  }
224
-
225
- ::-webkit-scrollbar-track {
226
- background: transparent; /* Transparent track */
 
 
 
 
 
 
 
227
  }
228
-
229
- ::-webkit-scrollbar-thumb {
230
- background-color: #444654; /* Darker thumb */
231
- border-radius: 4px; /* Rounded corners */
232
  }
233
-
234
- ::-webkit-scrollbar-thumb:hover {
235
- background-color: #585a6d; /* Slightly lighter on hover */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  }
237
-
238
- /* Progress Bar Container */
239
- .progress-container {
240
- display: none; /* Initially hidden */
241
- align-items: center;
242
- justify-content: center;
243
- margin-bottom: 10px;
244
- padding-top: 10px;
245
- }
246
-
247
- .progress-bar{
248
- width: 45px;
249
- height: 45px;
250
- border-radius: 50%;
251
- border: 5px solid #3f3f46; /* Consistent with other borders */
252
- position: relative;
253
- margin-right: 10px;
254
-
255
- }
256
- .progress-bar-inner {
257
- position: absolute;
258
- top: -5px;
259
- left: -5px;
260
- width: 45px;
261
- height: 45px;
262
- border-radius: 50%;
263
- border: 5px solid transparent;
264
- border-top-color: #7710ee; /* color */
265
- animation: rotate 2s linear infinite;
266
-
267
- }
268
- @keyframes rotate {
269
- 0% { transform: rotate(0deg); }
270
- 100% { transform: rotate(360deg); }
271
- }
272
- /* Style for progress update text */
273
- .progress-update {
274
- font-size: 0.9em;
275
- color: #aaa;
276
- margin-bottom: 5px;
277
- font-style: italic;
278
- }
279
- /* Style for <think> tag box */
280
- .think-box {
281
- border: 1px solid #555;
282
- background-color: rgba(55, 55, 55, 0.7);
283
- padding: 10px;
284
- margin-top: 10px;
285
- margin-bottom: 15px;
286
- border-radius: 5px;
287
- box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
288
-
289
- }
290
-
291
- .think-header {
292
- font-weight: bold;
293
- color: #eee;
294
- margin-bottom: 5px;
295
- display: flex;
296
- align-items: center;
297
-
298
- }
299
-
300
- .think-icon {
301
- margin-left: 5px;
302
- font-size: 1.2em;
303
-
304
- }
305
-
306
- .think-content {
307
- color: #ccc;
308
- font-style: italic;
309
- white-space: pre-wrap; /* Preserve line breaks and spacing */
310
-
311
- }
312
- #progressText{
313
- color: #a3a3a3;
314
- font-size: small;
315
- }
316
-
317
- /* Style for the select element */
318
  .models{
319
- position: absolute;
320
  margin: auto;
321
  padding: 10px ;
322
  outline: none;
323
- background-color: #2e2e35; /* Dark background */
324
  color: rgb(177, 177, 177);
325
  border: none;
326
  border-radius: 10px;
327
- top: -60px; /* Position above the input area */
328
- left: 10px; /* Align with the left side */
329
-
330
  }
331
  .models:hover{
332
- background-color: #383838; /* Slightly lighter on hover */
333
  }
334
  .models option{
335
- background-color: rgb(34, 34, 34); /* Dark background for options */
336
  color: #afafaf;
337
  padding: 10px;
338
  }
339
-
340
- /*Hamburger*/
341
- .hamburger{
 
 
 
 
342
  display: flex;
343
  flex-direction: column;
344
- gap: 7px;
345
- width: 20vh;
346
- color: white;
347
- margin: 1vw;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  cursor: pointer;
349
- position: absolute;
350
- margin: 10px;
351
- z-index: 101;
352
- }
353
- .line1{
354
- background-color: rgb(122, 122, 122);
355
- width: 6vh;
356
- height: 0.5vh;
357
- }
358
- .line2{
359
- background-color: rgb(104, 104, 104);
360
- width: 3vh;
361
- height: 0.5vh;
362
- }
363
- .hamburger:hover .line1{
364
- transform: translateX(-30px);
365
- transition: transform 1s ease;
366
  }
367
- .hamburger:hover .line2{
368
- transform: translateX(30px);
369
- transition: transform 1s ease;
 
 
 
 
 
 
 
 
370
  }
371
-
372
- /* Style the "Upgrade plan" section */
373
- .upgrade-plan {
374
- padding: 30px;
375
- border-radius: 5px; /* Rounded corners */
376
- border: 1px solid #3f3f46; /* A subtle border */
377
- background-color: rgba(30, 30, 30, 0.5); /* Semi-transparent background */
378
- margin: 30px;
379
- }
380
-
381
- /* Styling the button container */
382
- .buttons {
383
- width: 70%; /* Same width as the input box */
384
- display: flex;
385
- flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
386
- margin-top: 15px; /* Space above the buttons */
387
- margin-bottom: 15px;
388
- gap: 5px; /* Space between buttons */
389
- justify-content: center; /* Center the buttons horizontally */
390
-
391
- }
392
-
393
- /* Styling for the individual buttons */
394
- .features {
395
- border-radius: 5px; /* Rounded corners */
396
- background: none; /* No background */
397
- border: none; /* No border */
398
- color: #9f9fa5; /* Text color */
399
  padding: 10px;
400
  }
401
-
402
- .features:hover{
403
- background-color: #3f3f46;
404
- }
405
-
406
- /* Responsive adjustments */
407
- /* Adjustments for smaller screens */
408
- /* General layout adjustments */
409
- @media (max-width: 768px) {
410
- .sidebar {
411
- width: 0px; /* Initially hidden */
412
- }
413
- .hamburger{
414
- display: flex; /* Show hamburger */
415
- }
416
-
417
-
418
- .main-container {
419
- width: 100vw; /* Full width on smaller screens */
420
- left: 0; /* Reset left positioning */
421
- margin-left: 0;
422
  }
423
-
424
- .input-box, .buttons {
425
- width: 95%; /* Wider on smaller screens */
426
  }
427
- .messages{
428
- width: 100%;
429
  }
430
-
431
- .user, .ai {
432
- max-width: 90%; /* Allow messages to take up more width */
433
  }
434
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
  </style>
 
 
 
436
  </head>
437
  <body>
438
- <div class="top-bar">
439
- <div class="memory-status">Memory Full <i class="fas fa-exclamation-circle"></i></div>
440
- <button class="share-button">
441
- <i class="fas fa-share-alt"></i> Share
442
- </button>
443
- </div>
444
-
445
- <div class="sidebar" id="sidebar">
446
- <div class="new-chat-button" id="newChat">
447
- <i class="fas fa-plus"></i> New Chat
448
- </div>
449
- <div class="chat-history" id="prevChatsCont">
450
- <!-- Chat history items will be added here -->
451
- </div>
452
- <div class="upgrade-plan">
453
- <p>Upgrade plan</p>
454
- <p style="font-size: small;">More access to the best models</p>
455
- </div>
456
- </div>
457
-
458
-
459
- <div class="main-container">
460
- <div class="hamburger" id="hamburger">
461
  <div class="line1"></div>
462
  <div class="line2"></div>
463
  </div>
464
- <div class="messages" id="messages">
465
- <!-- Messages will be added here -->
 
 
 
466
  </div>
467
- <div class="progress-container" id="progressContainer">
468
- <div class="progress-bar" id="progressBar">
469
- <div class="progress-bar-inner"></div>
 
470
  </div>
471
- <p id="progressText"></p>
472
- </div>
473
- <div class="input-area">
474
-
475
- <select name="" id="models" class="models">
476
- </select>
477
-
478
- <div class="input-box">
479
-
480
- <textarea id="textBox" placeholder="What can I help with?"></textarea>
481
- <button id="sendBtn"><i class="fas fa-arrow-up"></i></button>
482
- </div>
483
-
484
- <div class = "buttons">
485
- <button id="webSearch" class="features webSearch"><i class="fa-solid fa-globe"></i></button>
486
- <button id="deepReason" class="features webSearch"><i class="fa-solid fa-brain"></i></button>
487
- <button id="createImage" class="features"><i class="fas fa-image"></i> Create image</button>
488
- <button id="brainstorm" class="features"><i class="fas fa-lightbulb"></i> Brainstorm</button>
489
- <button id="getAdvice" class="features"><i class="fas fa-handshake"></i> Get advice</button>
490
- <button id="analyzeImages" class="features"><i class="fas fa-chart-bar"></i> Analyze images</button>
491
- <button id="code" class="features"><i class="fas fa-code"></i> Code</button>
492
- <button id="more" class="features">More</button>
493
- </div>
494
- <p class="disclaimer">
495
- Xylaria can make mistakes. Check important info.
496
- </p>
497
  </div>
498
  </div>
499
- <script src="{{ url_for('static', filename='js/script.js') }}" type="module"></script>
500
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
501
  </body>
502
- </html>
 
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
7
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
8
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap" rel="stylesheet">
9
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap" rel="stylesheet">
10
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/atom-one-dark.min.css">
 
 
11
  <style>
12
+ ::-webkit-scrollbar {
13
+ width: 12px;
14
+ }
15
+ ::-webkit-scrollbar-track {
16
+ background: transparent;
17
+ }
18
+ ::-webkit-scrollbar-thumb {
19
+ background: rgb(43, 43, 43);
20
+ border-radius: 6px;
21
+ }
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: rgb(119, 119, 119);
24
+ }
25
+ html,body{
26
  padding: 0;
27
+ margin: 0;
28
+ background-color: rgb(2,2,8);
29
+ width: 100vw;
30
+ height: 100vh;
31
+ overflow: hidden;
32
+ scrollbar-width: thin;
33
+ scrollbar-color: rgb(41, 41, 41) transparent;
34
+ font-family: 'Inter';
35
+ }
36
+ nav{
37
+ position: fixed;
38
+ width: 100vw;
39
+ height: 8vh;
40
+ z-index: 100;
41
+ display: flex;
42
  }
43
+ .hamburger{
 
 
 
 
44
  display: flex;
45
  flex-direction: column;
46
+ gap: 1.5vh;
47
+ width: 20vh;
48
+ color: white;
49
+ margin: 1vw;
50
+ cursor: pointer;
51
+ position: absolute;
52
+ z-index: 101;
53
+ margin: 10px;
54
  }
55
+ .line1{
56
+ background-color: rgb(122, 122, 122);
57
+ width: 6vh;
58
+ height: 0.5vh;
 
 
 
 
 
 
59
  }
60
+ .line2{
61
+ background-color: rgb(104, 104, 104);
62
+ width: 3vh;
63
+ height: 0.5vh;
64
  }
65
+ .hamburger:hover .line1{
66
+ transform: translateX(-30px);
67
+ transition: transform 1s ease;
 
 
 
 
 
68
  }
69
+ .hamburger:hover .line2{
70
+ transform: translateX(30px);
71
+ transition: transform 1s ease;
72
  }
73
+ .menu{
74
+ height: 100vh;
75
+ width: 0px;
76
+ background-color: rgba(20, 20, 20,0.5);
77
+ border-radius: 10px;
78
+ position: fixed;
79
+ top: 0;
80
+ left: 0;
 
 
 
 
 
 
81
  display: flex;
82
+ flex-direction: column;
83
+ overflow-y: auto;
 
 
 
 
 
 
 
84
  }
85
+ .newChat{
86
+ margin-top: 8vh;
87
+ margin-left: 1vw;
88
+ color: gray;
89
+ font-size: large;
90
+ cursor: pointer;
91
+ font-weight: 400;
92
+ position: relative;
93
+ font-size: large;
94
  }
95
+ .newChat:hover{
96
+ transform: scale(0.95);
97
+ transition: transform 0.7s ease;
98
  }
99
+ .prevChatsCont{
100
+ color: rgb(172, 171, 171);
101
+ margin-left: 1vw;
102
+ font-weight: 300;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  display: flex;
104
  flex-direction: column;
105
+ gap: 1vh;
106
+ position: relative;
107
+ font-size: medium;
108
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
+ .prevChat{
111
+ min-height: 5vh;
112
+ cursor: pointer;
113
+ width: 90%;
114
  display: flex;
115
+ align-items: center;
116
+ padding-left: 5%;
117
+ border-radius: 10px;
118
+ overflow: hidden;
119
+ padding-top: 1%;
120
+ padding-bottom: 1%;
121
  position: relative;
 
 
122
  }
123
+ .prevChat:hover{
124
+ background-color: rgba(70,70, 70,1);
125
+ transform: translateY(5px);
126
+ transition: transform 0.8s ease;
127
+ }
128
+ .chatsTxt{
129
+ color: #fdffdf;
130
+ margin-left: 1vw;
131
+ font-size: 14px;
132
+ margin-top: 4vh;
133
+ margin-bottom: 3vh;
134
+ z-index: 100;
135
+ overflow: hidden;
136
+ min-height: 5vh;
137
+ display: flex;
138
+ align-items: center;
139
+ }
140
+ .container {
141
+ width: 99.5%;
142
+ max-width: 99.5%;
143
+ height: 90%;
144
  position: absolute;
145
+ z-index: 50;
146
+ top: 8vh;
147
+ display: flex;
148
+ flex-direction: column;
149
+ justify-content: flex-end;
150
+ z-index: 1;
151
+ }
152
+ .inputs {
153
+ width: 70%;
154
+ display: flex;
155
+ flex-direction: row;
156
+ justify-content: space-between;
157
+ align-items: center;
158
+ background-color: rgba(51, 51, 51, 0.4);
159
+ padding: 10px;
160
+ border-top-right-radius: 50px;
161
+ border-bottom-left-radius: 20px;
162
+ border-top-left-radius: 20px;
163
+ border-bottom-right-radius: 50px;
164
+ font-size: large;
165
+ position: relative;
166
+ margin-top: auto;
167
+ align-self: center;
168
+ }
169
+ .textBox{
170
+ width: 90%;
171
  background: none;
172
+ outline: none;
173
  border: none;
174
+ color: rgb(161, 161, 161);
175
+ padding: 7px;
176
+ }
177
+ .sendBtn{
178
+ background-color: white;
179
+ border: none;
180
+ color: black;
181
+ font-size: x-large;
182
  cursor: pointer;
183
+ border-radius: 50%;
184
+ width: 6vh;
185
+ height: 6vh;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
+ .messages {
188
+ overflow-y: auto;
189
+ color: white;
190
+ padding: 10px;
191
+ display: flex;
192
+ flex-direction: column;
193
+ position: relative;
194
  }
195
+ .user{
196
+ margin-left: auto;
197
+ max-width: 60%;
198
+ background-color: rgba(51, 51, 51, 0.4);
199
+ padding: 0.5vh 1.5vh 0.5vh 1.5vh;
200
+ text-align: left;
201
+ font-weight: 300;
202
+ border-radius: 10px;
203
+ line-height: 130%;
204
+
205
  }
206
+ .user p{
207
+ color: #b4b4b4;
208
+ padding: 0;
209
+ opacity: 0.9;
210
  }
211
+ .ai{
212
+ text-align: left;
213
+ width: 70%;
214
+ margin-left: auto;
215
+ margin-right: auto;
216
+ margin-top: 2vh;
217
+ }
218
+ .ai p {
219
+ opacity: 0.9;
220
+ font-weight: 300;
221
+ font-size: medium;
222
+ line-height: 1.6;
223
+ color: #c5c5c5;
224
+ background-color: rgba(28, 28, 28, 0.5);
225
+ padding: 20px;
226
+ border-radius: 10px;
227
+ border: 2px solid rgba(255,255,255,0.1);
228
+ font-family: 'Inter';
229
+ }
230
+ .subHeading,.heading{
231
+ padding: 1vh;
232
+ border-radius: 10px;
233
+ display: inline-block;
234
+ margin-bottom: 2vh;
235
+ margin-top: 2vh;
236
+ }
237
+ .subHeading{
238
+ background-color: rgba(59, 59, 59, 0.5);
239
+ border: 1px solid rgba(255,255,255,0.1)
240
+ }
241
+ .heading{
242
+ background-color: rgba(119, 16, 238, 0.55);
243
+ box-shadow: 6px 6px rgba(0, 0, 0, 0.5) ;
244
+ }
245
+ code{
246
+ border-radius: 15px;
247
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  .models{
249
+ position: relative;
250
  margin: auto;
251
  padding: 10px ;
252
  outline: none;
253
+ background-color: rgb(43, 43, 43);
254
  color: rgb(177, 177, 177);
255
  border: none;
256
  border-radius: 10px;
 
 
 
257
  }
258
  .models:hover{
259
+ background-color: #383838;
260
  }
261
  .models option{
262
+ background-color: rgb(34, 34, 34);
263
  color: #afafaf;
264
  padding: 10px;
265
  }
266
+ .alert{
267
+ position: absolute;
268
+ top: 50%;
269
+ left: 50%;
270
+ transform: translate(-50%,-50%);
271
+ width: 320px;
272
+ height: 320px;
273
  display: flex;
274
  flex-direction: column;
275
+ gap: 0px;
276
+ color: #d8d8d8;
277
+ background-color: #222222;
278
+ box-shadow: 6px 6px rgb(41, 41, 41) ;
279
+ justify-content: center;
280
+ z-index: 100;
281
+ }
282
+ .alert p{
283
+ float: left;
284
+ font-family: 'Inter';
285
+ font-weight: 300;
286
+ font-size: 15px;
287
+ color: #cfcfcf;
288
+ opacity: 0.9;
289
+ padding-left: 10px;
290
+ }
291
+ .closeAlert{
292
+ margin-left: auto;
293
+ margin-right: 10px;
294
+ margin-top: 10px;
295
+ background-color: rgb(247, 102, 102);
296
+ padding: 10px;
297
  cursor: pointer;
298
+ border-radius: 10px;
299
+ color: #ffffff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
+ .discord {
302
+ margin: 10px;
303
+ text-decoration: none;
304
+ color: rgb(211, 211, 211);
305
+ padding: 7.5px;
306
+ border-radius: 10px;
307
+ background: linear-gradient(to right, #4A148C, #9c18e3);
308
+ cursor: pointer;
309
+ display: inline-block;
310
+ font-size: 13px;
311
+ max-width: 77px;
312
  }
313
+ .note{
314
+ text-align: center;
315
+ background-color: rgba(119, 16, 238, 0.55);
316
+ box-shadow: 6px 6px rgb(32, 32, 32) ;
317
+ margin: auto;
318
+ width: 70px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  padding: 10px;
320
  }
321
+ .webSearch{
322
+ color: rgb(233, 233, 233);
323
+ background: transparent;
324
+ cursor: pointer;
325
+ border: none;
326
+ font-size: x-large;
327
+ }
328
+ @media screen and (max-width: 780px){
329
+ .menu{
330
+ background-color: rgba(20, 20, 20);
 
 
 
 
 
 
 
 
 
 
 
331
  }
332
+ .inputs{
333
+ width: 85%;
 
334
  }
335
+ .ai{
336
+ width: 90%;
337
  }
338
+ .user{
339
+ max-width: 90%;
 
340
  }
341
  }
342
+ /* New styles for thinking section */
343
+ .thinking-container {
344
+ background: rgba(30, 30, 30, 0.7);
345
+ border-radius: 8px;
346
+ margin: 10px 0;
347
+ overflow: hidden;
348
+ border: 1px solid rgba(255, 255, 255, 0.1);
349
+ }
350
+ .thinking-header {
351
+ display: flex;
352
+ align-items: center;
353
+ padding: 10px 15px;
354
+ cursor: pointer;
355
+ background: rgba(119, 16, 238, 0.2);
356
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
357
+ }
358
+ .thinking-header:hover {
359
+ background: rgba(119, 16, 238, 0.3);
360
+ }
361
+ .thinking-title {
362
+ color: #fdffdf;
363
+ font-size: 14px;
364
+ margin-right: 10px;
365
+ }
366
+ .thinking-arrow {
367
+ margin-left: auto;
368
+ transition: transform 0.3s ease;
369
+ }
370
+ .thinking-arrow.open {
371
+ transform: rotate(180deg);
372
+ }
373
+ .thinking-content {
374
+ padding: 15px;
375
+ color: #c5c5c5;
376
+ font-size: 14px;
377
+ line-height: 1.5;
378
+ max-height: 0;
379
+ overflow: hidden;
380
+ transition: max-height 0.3s ease-out;
381
+ }
382
+ .thinking-content.open {
383
+ max-height: 500px;
384
+ transition: max-height 0.5s ease-in;
385
+ }
386
  </style>
387
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
388
+ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
389
+ <title>Chat Completion Demo</title>
390
  </head>
391
  <body>
392
+ <nav>
393
+ <select name="" id="models" class="models">
394
+ </select>
395
+ <div class="hamburger" id="hamburger">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
396
  <div class="line1"></div>
397
  <div class="line2"></div>
398
  </div>
399
+ <div class="menu" id="menu">
400
+ <div class="newChat" id="newChat">+ New Chat</div>
401
+ <p class="chatsTxt">chats</p>
402
+ <div class="prevChatsCont" id="prevChatsCont">
403
+ </div>
404
  </div>
405
+ </nav>
406
+ <div class="container" id="container">
407
+ <div class="messages" id="messages">
408
+ <!-- Messages will be inserted here -->
409
  </div>
410
+ <div class="inputs">
411
+ <button id="webSearch" class="webSearch"><i class="fa-solid fa-globe"></i></button>
412
+ <textarea name="" id="textBox" class="textBox" placeholder="Enter your message..."></textarea>
413
+ <button id="sendBtn" class="sendBtn"><i class="fa-solid fa-arrow-up"></i></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  </div>
415
  </div>
416
+ <script>
417
+ // Add this to your existing JavaScript or create a new script
418
+ function createThinkingElement(thinkingContent) {
419
+ const container = document.createElement('div');
420
+ container.className = 'thinking-container';
421
+
422
+ const header = document.createElement('div');
423
+ header.className = 'thinking-header';
424
+
425
+ const title = document.createElement('span');
426
+ title.className = 'thinking-title';
427
+ title.textContent = 'Reasoning about it';
428
+
429
+ const arrow = document.createElement('i');
430
+ arrow.className = 'fa-solid fa-chevron-down thinking-arrow';
431
+
432
+ const content = document.createElement('div');
433
+ content.className = 'thinking-content';
434
+ content.textContent = thinkingContent;
435
+
436
+ header.appendChild(title);
437
+ header.appendChild(arrow);
438
+ container.appendChild(header);
439
+ container.appendChild(content);
440
+
441
+ header.addEventListener('click', () => {
442
+ arrow.classList.toggle('open');
443
+ content.classList.toggle('open');
444
+ });
445
+
446
+ return container;
447
+ }
448
+ // Example usage in your message processing logic:
449
+ function processMessage(message) {
450
+ const thinkMatch = message.match(/<think>(.*?)<\/think>/s);
451
+ if (thinkMatch) {
452
+ const thinkingContent = thinkMatch[1].trim();
453
+ const thinkingElement = createThinkingElement(thinkingContent);
454
+ // Insert the thinking element into your message container
455
+ document.getElementById('messages').appendChild(thinkingElement);
456
+ }
457
+ }
458
+ </script>
459
+ <script src="{{ url_for('static', filename='js/script.js') }}" type="module"></script>
460
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
461
  </body>
462
+ </html>