Spaces:
Sleeping
Sleeping
none
Browse files- static/style.css +70 -1
- templates/chat.html +15 -7
static/style.css
CHANGED
@@ -34,11 +34,15 @@ body, html {
|
|
34 |
background-image: linear-gradient(to right, #74ebd5 0%, #9face6 100%)!important;
|
35 |
color: var(--text-color) !important;
|
36 |
}
|
|
|
|
|
|
|
37 |
/* Light Mode - Ensure theme toggle button is dark */
|
38 |
/* Theme Toggle Button */
|
39 |
#themeToggle {
|
40 |
position: absolute;
|
41 |
right: 15px;
|
|
|
42 |
top: 10px;
|
43 |
font-size: 14px;
|
44 |
padding: 5px 10px;
|
@@ -468,4 +472,69 @@ border-radius: 0 0 15px 15px !important;
|
|
468 |
|
469 |
.predefined-text a:hover {
|
470 |
text-decoration: underline;
|
471 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
background-image: linear-gradient(to right, #74ebd5 0%, #9face6 100%)!important;
|
35 |
color: var(--text-color) !important;
|
36 |
}
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
/* Light Mode - Ensure theme toggle button is dark */
|
41 |
/* Theme Toggle Button */
|
42 |
#themeToggle {
|
43 |
position: absolute;
|
44 |
right: 15px;
|
45 |
+
margin-right: 0.5rem;
|
46 |
top: 10px;
|
47 |
font-size: 14px;
|
48 |
padding: 5px 10px;
|
|
|
472 |
|
473 |
.predefined-text a:hover {
|
474 |
text-decoration: underline;
|
475 |
+
}
|
476 |
+
/* Mobile Adaptability Enhancements */
|
477 |
+
@media (max-width: 576px) {
|
478 |
+
/* Adjust overall card spacing and sizing */
|
479 |
+
.card {
|
480 |
+
margin: 10px;
|
481 |
+
border-radius: 10px;
|
482 |
+
}
|
483 |
+
.card-header,
|
484 |
+
.card-footer {
|
485 |
+
padding: 10px;
|
486 |
+
}
|
487 |
+
|
488 |
+
/* Stack header elements vertically and center them */
|
489 |
+
.card-header .d-flex {
|
490 |
+
flex-direction: column;
|
491 |
+
align-items: center;
|
492 |
+
}
|
493 |
+
.user_info {
|
494 |
+
margin-left: 0;
|
495 |
+
text-align: center;
|
496 |
+
margin-bottom: 10px;
|
497 |
+
}
|
498 |
+
/* Center the button container */
|
499 |
+
.d-flex.flex-column.align-items-end.ml-auto {
|
500 |
+
margin: 0 auto;
|
501 |
+
}
|
502 |
+
|
503 |
+
/* Adjust chat container height */
|
504 |
+
.chat {
|
505 |
+
height: 80vh;
|
506 |
+
}
|
507 |
+
.msg_card_body {
|
508 |
+
max-height: 50vh;
|
509 |
+
}
|
510 |
+
|
511 |
+
/* Reduce sizes of images for header and messages */
|
512 |
+
.img_cont,
|
513 |
+
.user_img {
|
514 |
+
height: 50px;
|
515 |
+
width: 50px;
|
516 |
+
}
|
517 |
+
.img_cont_msg,
|
518 |
+
.user_img_msg {
|
519 |
+
height: 30px;
|
520 |
+
width: 30px;
|
521 |
+
}
|
522 |
+
|
523 |
+
/* Adjust text sizes for header info */
|
524 |
+
.user_info span {
|
525 |
+
font-size: 16px;
|
526 |
+
}
|
527 |
+
.user_info p {
|
528 |
+
font-size: 8px;
|
529 |
+
}
|
530 |
+
|
531 |
+
/* Adjust input field and button sizes */
|
532 |
+
.type_msg {
|
533 |
+
height: 50px;
|
534 |
+
font-size: 14px;
|
535 |
+
}
|
536 |
+
.btn {
|
537 |
+
font-size: 12px;
|
538 |
+
padding: 5px 8px;
|
539 |
+
}
|
540 |
+
}
|
templates/chat.html
CHANGED
@@ -44,12 +44,16 @@
|
|
44 |
<span>JUIT AI Assist</span>
|
45 |
<p>Explore College and Beyond: Ask Anything! 🎓</p>
|
46 |
<!-- Add this inside the card-header (after user_info div) -->
|
47 |
-
|
48 |
-
|
49 |
</div>
|
|
|
|
|
|
|
|
|
|
|
50 |
</div>
|
51 |
</div>
|
52 |
-
|
53 |
<div id="messageFormeight" class="card-body msg_card_body">
|
54 |
<!-- Chat messages will be displayed here -->
|
55 |
</div>
|
@@ -68,7 +72,7 @@
|
|
68 |
</button>
|
69 |
</div>
|
70 |
</form>
|
71 |
-
|
72 |
|
73 |
<div class="card-footer text-center">
|
74 |
<div class="d-flex justify-content-center align-items-center">
|
@@ -278,9 +282,13 @@
|
|
278 |
});
|
279 |
|
280 |
function updateButton() {
|
281 |
-
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
|
|
284 |
}
|
285 |
});
|
286 |
|
|
|
44 |
<span>JUIT AI Assist</span>
|
45 |
<p>Explore College and Beyond: Ask Anything! 🎓</p>
|
46 |
<!-- Add this inside the card-header (after user_info div) -->
|
47 |
+
|
|
|
48 |
</div>
|
49 |
+
<div class="d-flex flex-column align-items-end ml-auto">
|
50 |
+
<button id="themeToggle" class="btn btn-sm btn-light" style="position: static;">Light Mode</button>
|
51 |
+
|
52 |
+
<button id="clearChat" class="btn btn-danger btn-sm mt-2">Clear Chat</button>
|
53 |
+
</div>
|
54 |
</div>
|
55 |
</div>
|
56 |
+
|
57 |
<div id="messageFormeight" class="card-body msg_card_body">
|
58 |
<!-- Chat messages will be displayed here -->
|
59 |
</div>
|
|
|
72 |
</button>
|
73 |
</div>
|
74 |
</form>
|
75 |
+
|
76 |
|
77 |
<div class="card-footer text-center">
|
78 |
<div class="d-flex justify-content-center align-items-center">
|
|
|
282 |
});
|
283 |
|
284 |
function updateButton() {
|
285 |
+
if (body.classList.contains("light-mode")) {
|
286 |
+
// Show sun icon when in light mode (indicating you can switch to dark)
|
287 |
+
themeToggle.innerHTML = '<i class="fas fa-sun"></i> Dark Mode';
|
288 |
+
} else {
|
289 |
+
// Show moon icon when in dark mode (indicating you can switch to light)
|
290 |
+
themeToggle.innerHTML = '<i class="fas fa-moon"></i> Light Mode';
|
291 |
+
}
|
292 |
}
|
293 |
});
|
294 |
|