Spaces:
Sleeping
Sleeping
Update application/templates/index.html
Browse files- application/templates/index.html +42 -20
application/templates/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
width: 12px;
|
| 14 |
}
|
| 15 |
::-webkit-scrollbar-track {
|
| 16 |
-
background: transparent;
|
| 17 |
}
|
| 18 |
::-webkit-scrollbar-thumb {
|
| 19 |
background: rgb(43, 43, 43);
|
|
@@ -29,7 +29,7 @@ html,body{
|
|
| 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 |
}
|
|
@@ -105,7 +105,7 @@ nav{
|
|
| 105 |
gap: 1vh;
|
| 106 |
position: relative;
|
| 107 |
font-size: medium;
|
| 108 |
-
|
| 109 |
}
|
| 110 |
.prevChat{
|
| 111 |
min-height: 5vh;
|
|
@@ -145,8 +145,8 @@ nav{
|
|
| 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 {
|
|
@@ -162,8 +162,8 @@ nav{
|
|
| 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{
|
|
@@ -185,11 +185,11 @@ nav{
|
|
| 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{
|
|
@@ -201,7 +201,7 @@ nav{
|
|
| 201 |
font-weight: 300;
|
| 202 |
border-radius: 10px;
|
| 203 |
line-height: 130%;
|
| 204 |
-
|
| 205 |
}
|
| 206 |
.user p{
|
| 207 |
color: #b4b4b4;
|
|
@@ -217,10 +217,10 @@ nav{
|
|
| 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;
|
|
@@ -284,7 +284,7 @@ code{
|
|
| 284 |
font-family: 'Inter';
|
| 285 |
font-weight: 300;
|
| 286 |
font-size: 15px;
|
| 287 |
-
color: #cfcfcf;
|
| 288 |
opacity: 0.9;
|
| 289 |
padding-left: 10px;
|
| 290 |
}
|
|
@@ -325,6 +325,24 @@ code{
|
|
| 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);
|
|
@@ -409,6 +427,10 @@ code{
|
|
| 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>
|
|
@@ -418,31 +440,31 @@ code{
|
|
| 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:
|
|
|
|
| 13 |
width: 12px;
|
| 14 |
}
|
| 15 |
::-webkit-scrollbar-track {
|
| 16 |
+
background: transparent;
|
| 17 |
}
|
| 18 |
::-webkit-scrollbar-thumb {
|
| 19 |
background: rgb(43, 43, 43);
|
|
|
|
| 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 |
}
|
|
|
|
| 105 |
gap: 1vh;
|
| 106 |
position: relative;
|
| 107 |
font-size: medium;
|
| 108 |
+
|
| 109 |
}
|
| 110 |
.prevChat{
|
| 111 |
min-height: 5vh;
|
|
|
|
| 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 {
|
|
|
|
| 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{
|
|
|
|
| 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{
|
|
|
|
| 201 |
font-weight: 300;
|
| 202 |
border-radius: 10px;
|
| 203 |
line-height: 130%;
|
| 204 |
+
|
| 205 |
}
|
| 206 |
.user p{
|
| 207 |
color: #b4b4b4;
|
|
|
|
| 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;
|
|
|
|
| 284 |
font-family: 'Inter';
|
| 285 |
font-weight: 300;
|
| 286 |
font-size: 15px;
|
| 287 |
+
color: #cfcfcf;
|
| 288 |
opacity: 0.9;
|
| 289 |
padding-left: 10px;
|
| 290 |
}
|
|
|
|
| 325 |
border: none;
|
| 326 |
font-size: x-large;
|
| 327 |
}
|
| 328 |
+
/*Image Button*/
|
| 329 |
+
.image-button {
|
| 330 |
+
background: transparent;
|
| 331 |
+
border: none;
|
| 332 |
+
color: rgb(233, 233, 233);
|
| 333 |
+
cursor: pointer;
|
| 334 |
+
font-size: x-large;
|
| 335 |
+
padding: 0; /* Remove padding to fit exactly the icon */
|
| 336 |
+
display: flex; /* Use flexbox for alignment */
|
| 337 |
+
align-items: center; /* Vertically center the icon */
|
| 338 |
+
justify-content: center; /* Horizontally center the icon */
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
.image-button i {
|
| 342 |
+
margin: 0;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
|
| 346 |
@media screen and (max-width: 780px){
|
| 347 |
.menu{
|
| 348 |
background-color: rgba(20, 20, 20);
|
|
|
|
| 427 |
</div>
|
| 428 |
<div class="inputs">
|
| 429 |
<button id="webSearch" class="webSearch"><i class="fa-solid fa-globe"></i></button>
|
| 430 |
+
<!-- Image Button -->
|
| 431 |
+
<a href="https://reality123b-iris.hf.space" target="_blank" rel="noopener noreferrer">
|
| 432 |
+
<button class="image-button"><i class="fa-solid fa-image"></i></button>
|
| 433 |
+
</a>
|
| 434 |
<textarea name="" id="textBox" class="textBox" placeholder="Enter your message..."></textarea>
|
| 435 |
<button id="sendBtn" class="sendBtn"><i class="fa-solid fa-arrow-up"></i></button>
|
| 436 |
</div>
|
|
|
|
| 440 |
function createThinkingElement(thinkingContent) {
|
| 441 |
const container = document.createElement('div');
|
| 442 |
container.className = 'thinking-container';
|
| 443 |
+
|
| 444 |
const header = document.createElement('div');
|
| 445 |
header.className = 'thinking-header';
|
| 446 |
+
|
| 447 |
const title = document.createElement('span');
|
| 448 |
title.className = 'thinking-title';
|
| 449 |
title.textContent = 'Reasoning about it';
|
| 450 |
+
|
| 451 |
const arrow = document.createElement('i');
|
| 452 |
arrow.className = 'fa-solid fa-chevron-down thinking-arrow';
|
| 453 |
+
|
| 454 |
const content = document.createElement('div');
|
| 455 |
content.className = 'thinking-content';
|
| 456 |
content.textContent = thinkingContent;
|
| 457 |
+
|
| 458 |
header.appendChild(title);
|
| 459 |
header.appendChild(arrow);
|
| 460 |
container.appendChild(header);
|
| 461 |
container.appendChild(content);
|
| 462 |
+
|
| 463 |
header.addEventListener('click', () => {
|
| 464 |
arrow.classList.toggle('open');
|
| 465 |
content.classList.toggle('open');
|
| 466 |
});
|
| 467 |
+
|
| 468 |
return container;
|
| 469 |
}
|
| 470 |
// Example usage in your message processing logic:
|