Spaces:
Running
Running
Upload 12 files
Browse files- advanced.math.css +9 -7
- advanced.math.js +1 -1
- coder.css +194 -125
- coder.js +9 -7
- digital.human.audio.css +24 -26
- digital.human.audio.js +1 -1
- digital.human.video.css +706 -140
- digital.human.video.js +348 -0
- finalwork4.html +149 -87
- interdisciplinary.css +16 -4
advanced.math.css
CHANGED
|
@@ -9,6 +9,7 @@
|
|
| 9 |
/* Card Styling */
|
| 10 |
.advanced-math-card {
|
| 11 |
display: flex;
|
|
|
|
| 12 |
gap: 20px;
|
| 13 |
background: linear-gradient(135deg, #ffffff, #f1f8e9);
|
| 14 |
border-radius: 16px;
|
|
@@ -25,17 +26,13 @@
|
|
| 25 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 26 |
}
|
| 27 |
|
| 28 |
-
/* Flex Layout for Math
|
| 29 |
.math-options {
|
| 30 |
flex: 1;
|
| 31 |
display: flex;
|
| 32 |
-
flex-direction: column
|
| 33 |
gap: 20px;
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
/* Ensure Math Options takes up available vertical space */
|
| 37 |
-
.math-options {
|
| 38 |
-
height: 100%;
|
| 39 |
}
|
| 40 |
|
| 41 |
/* Chat Window Styling */
|
|
@@ -53,6 +50,7 @@
|
|
| 53 |
border-radius: 12px;
|
| 54 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 55 |
transition: background 0.3s, box-shadow 0.3s;
|
|
|
|
| 56 |
}
|
| 57 |
|
| 58 |
.option-section:hover {
|
|
@@ -419,4 +417,8 @@
|
|
| 419 |
#math-logs {
|
| 420 |
max-height: 150px;
|
| 421 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
}
|
|
|
|
| 9 |
/* Card Styling */
|
| 10 |
.advanced-math-card {
|
| 11 |
display: flex;
|
| 12 |
+
flex-direction: column; /* Changed from row to column */
|
| 13 |
gap: 20px;
|
| 14 |
background: linear-gradient(135deg, #ffffff, #f1f8e9);
|
| 15 |
border-radius: 16px;
|
|
|
|
| 26 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 27 |
}
|
| 28 |
|
| 29 |
+
/* Flex Layout for Math Controls and Chat Window */
|
| 30 |
.math-options {
|
| 31 |
flex: 1;
|
| 32 |
display: flex;
|
| 33 |
+
flex-direction: row; /* Changed from column to row */
|
| 34 |
gap: 20px;
|
| 35 |
+
/* Removed height: 100%; to allow natural height based on content */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
/* Chat Window Styling */
|
|
|
|
| 50 |
border-radius: 12px;
|
| 51 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 52 |
transition: background 0.3s, box-shadow 0.3s;
|
| 53 |
+
flex: 1; /* Ensure equal width for all option sections */
|
| 54 |
}
|
| 55 |
|
| 56 |
.option-section:hover {
|
|
|
|
| 417 |
#math-logs {
|
| 418 |
max-height: 150px;
|
| 419 |
}
|
| 420 |
+
|
| 421 |
+
.math-options {
|
| 422 |
+
flex-direction: column; /* Stack controls vertically on small screens */
|
| 423 |
+
}
|
| 424 |
}
|
advanced.math.js
CHANGED
|
@@ -223,7 +223,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 223 |
|
| 224 |
if (!('webkitSpeechRecognition' in window)) {
|
| 225 |
alert("Web Speech API is not supported by this browser.");
|
| 226 |
-
logMessage("Web Speech API
|
| 227 |
} else {
|
| 228 |
mathRecognition = new webkitSpeechRecognition();
|
| 229 |
mathRecognition.continuous = false; // Non-continuous recognition
|
|
|
|
| 223 |
|
| 224 |
if (!('webkitSpeechRecognition' in window)) {
|
| 225 |
alert("Web Speech API is not supported by this browser.");
|
| 226 |
+
logMessage("Web Speech API not supported by this browser.", "error");
|
| 227 |
} else {
|
| 228 |
mathRecognition = new webkitSpeechRecognition();
|
| 229 |
mathRecognition.continuous = false; // Non-continuous recognition
|
coder.css
CHANGED
|
@@ -1,5 +1,43 @@
|
|
| 1 |
/* coder.css */
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
/* Reset and Base Styles */
|
| 4 |
#coder * {
|
| 5 |
box-sizing: border-box;
|
|
@@ -9,11 +47,12 @@
|
|
| 9 |
/* Card Styling */
|
| 10 |
.coder-card {
|
| 11 |
display: flex;
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 17 |
margin: 25px auto;
|
| 18 |
|
| 19 |
transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
|
|
@@ -25,124 +64,127 @@
|
|
| 25 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 26 |
}
|
| 27 |
|
| 28 |
-
/* Flex Layout for Coder Options
|
| 29 |
.coder-options {
|
| 30 |
-
|
| 31 |
display: flex;
|
| 32 |
-
flex-direction:
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
/* Ensure Coder Options takes up available vertical space */
|
| 37 |
-
.coder-options {
|
| 38 |
-
height: 100%;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
/* Chat Window Styling */
|
| 42 |
-
.chat-window {
|
| 43 |
-
flex: 2;
|
| 44 |
-
display: flex;
|
| 45 |
-
flex-direction: column;
|
| 46 |
-
gap: 20px;
|
| 47 |
}
|
| 48 |
|
| 49 |
/* Option Sections Styling */
|
| 50 |
.option-section {
|
| 51 |
-
background-color:
|
| 52 |
-
padding:
|
| 53 |
-
border-radius:
|
| 54 |
-
box-shadow:
|
| 55 |
transition: background 0.3s, box-shadow 0.3s;
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
.option-section:hover {
|
| 59 |
-
background-color: #f9f9f9;
|
| 60 |
-
}
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
border: none;
|
| 66 |
-
color: white;
|
| 67 |
-
padding: 12px 20px;
|
| 68 |
-
font-size: 1em;
|
| 69 |
-
border-radius: 8px;
|
| 70 |
-
cursor: pointer;
|
| 71 |
-
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 72 |
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 73 |
}
|
| 74 |
|
| 75 |
-
|
| 76 |
-
background:
|
| 77 |
-
transform: translateY(-2px);
|
| 78 |
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 79 |
}
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
|
|
|
|
|
| 85 |
}
|
| 86 |
|
| 87 |
-
/* Select Dropdown Styling
|
| 88 |
-
|
| 89 |
width: 100%;
|
| 90 |
-
padding:
|
| 91 |
-
border: 1px solid
|
| 92 |
border-radius: 8px;
|
| 93 |
-
font-size:
|
| 94 |
-
background-color:
|
| 95 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 96 |
-
margin-bottom: 15px;
|
| 97 |
}
|
| 98 |
|
| 99 |
-
|
| 100 |
-
border-color:
|
| 101 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 102 |
outline: none;
|
| 103 |
}
|
| 104 |
|
| 105 |
-
/*
|
| 106 |
-
|
| 107 |
-
display:
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
}
|
| 112 |
|
| 113 |
-
|
|
|
|
| 114 |
width: 100%;
|
| 115 |
-
margin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
/* Logs Container Styling */
|
| 119 |
#coder-logs-container {
|
| 120 |
display: flex;
|
| 121 |
flex-direction: column;
|
| 122 |
-
gap:
|
| 123 |
-
max-height:
|
| 124 |
-
overflow: hidden; /* Hide
|
| 125 |
}
|
| 126 |
|
|
|
|
| 127 |
#coder-logs {
|
| 128 |
flex: 1;
|
| 129 |
-
max-height: 200px; /* Adjust
|
| 130 |
border: 1px solid #e0e0e0;
|
| 131 |
-
border-radius:
|
| 132 |
overflow-y: auto; /* Enable vertical scrolling */
|
| 133 |
padding: 10px;
|
| 134 |
background-color: #f9f9f9;
|
| 135 |
-
font-size:
|
| 136 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 137 |
}
|
| 138 |
|
|
|
|
| 139 |
#coder-clear-logs {
|
| 140 |
align-self: flex-end;
|
| 141 |
-
background:
|
| 142 |
border: none;
|
| 143 |
color: white;
|
| 144 |
-
padding:
|
| 145 |
-
font-size: 0.
|
| 146 |
cursor: pointer;
|
| 147 |
border-radius: 8px;
|
| 148 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
@@ -150,38 +192,38 @@
|
|
| 150 |
}
|
| 151 |
|
| 152 |
#coder-clear-logs:hover {
|
| 153 |
-
background:
|
| 154 |
-
transform: scale(1.
|
| 155 |
-
box-shadow: 0
|
| 156 |
}
|
| 157 |
|
| 158 |
/* Chat Box Styling */
|
| 159 |
#coder-chat-box {
|
| 160 |
height: 500px;
|
| 161 |
border: 1px solid #e0e0e0;
|
| 162 |
-
border-radius:
|
| 163 |
overflow-y: auto;
|
| 164 |
-
padding:
|
| 165 |
-
background-color:
|
| 166 |
position: relative;
|
| 167 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 168 |
-
margin-bottom:
|
| 169 |
}
|
| 170 |
|
| 171 |
/* Message Styling */
|
| 172 |
#coder .message-container {
|
| 173 |
-
margin-bottom:
|
| 174 |
display: flex;
|
| 175 |
}
|
| 176 |
|
| 177 |
#coder .message {
|
| 178 |
-
padding:
|
| 179 |
-
border-radius:
|
| 180 |
max-width: 75%;
|
| 181 |
position: relative;
|
| 182 |
word-wrap: break-word;
|
| 183 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 184 |
-
font-size:
|
| 185 |
line-height: 1.4;
|
| 186 |
background-color: #f1f8e9;
|
| 187 |
transition: background-color 0.3s, box-shadow 0.3s;
|
|
@@ -200,31 +242,31 @@
|
|
| 200 |
/* Chat Input Container Styling */
|
| 201 |
#coder-text-input-container {
|
| 202 |
display: flex;
|
| 203 |
-
gap:
|
| 204 |
}
|
| 205 |
|
| 206 |
#coder-text-input {
|
| 207 |
flex: 1;
|
| 208 |
-
padding:
|
| 209 |
-
border: 1px solid
|
| 210 |
border-radius: 8px;
|
| 211 |
-
font-size:
|
| 212 |
-
background-color:
|
| 213 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 214 |
}
|
| 215 |
|
| 216 |
#coder-text-input:focus {
|
| 217 |
-
border-color:
|
| 218 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 219 |
outline: none;
|
| 220 |
}
|
| 221 |
|
| 222 |
#coder-submit-button {
|
| 223 |
-
background:
|
| 224 |
border: none;
|
| 225 |
color: white;
|
| 226 |
-
padding:
|
| 227 |
-
font-size:
|
| 228 |
border-radius: 8px;
|
| 229 |
cursor: pointer;
|
| 230 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
@@ -232,13 +274,13 @@
|
|
| 232 |
}
|
| 233 |
|
| 234 |
#coder-submit-button:hover:not(:disabled) {
|
| 235 |
-
background:
|
| 236 |
-
transform: translateY(-
|
| 237 |
-
box-shadow:
|
| 238 |
}
|
| 239 |
|
| 240 |
#coder-submit-button:disabled {
|
| 241 |
-
background:
|
| 242 |
cursor: not-allowed;
|
| 243 |
box-shadow: none;
|
| 244 |
}
|
|
@@ -247,21 +289,21 @@
|
|
| 247 |
#coder-mic-container {
|
| 248 |
display: flex;
|
| 249 |
justify-content: center;
|
| 250 |
-
gap:
|
| 251 |
-
margin-top:
|
| 252 |
}
|
| 253 |
|
| 254 |
#coder-start_button,
|
| 255 |
#coder-stop_button {
|
| 256 |
-
background:
|
| 257 |
border: none;
|
| 258 |
color: white;
|
| 259 |
-
padding:
|
| 260 |
border-radius: 50%;
|
| 261 |
cursor: pointer;
|
| 262 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 263 |
-
width:
|
| 264 |
-
height:
|
| 265 |
display: flex;
|
| 266 |
justify-content: center;
|
| 267 |
align-items: center;
|
|
@@ -271,7 +313,7 @@
|
|
| 271 |
}
|
| 272 |
|
| 273 |
#coder-stop_button {
|
| 274 |
-
background:
|
| 275 |
}
|
| 276 |
|
| 277 |
#coder-start_button::before,
|
|
@@ -295,26 +337,26 @@
|
|
| 295 |
|
| 296 |
#coder-start_button:disabled,
|
| 297 |
#coder-stop_button:disabled {
|
| 298 |
-
background:
|
| 299 |
cursor: not-allowed;
|
| 300 |
box-shadow: none;
|
| 301 |
}
|
| 302 |
|
| 303 |
#coder-start_button:hover:not(:disabled),
|
| 304 |
#coder-stop_button:hover:not(:disabled) {
|
| 305 |
-
transform: scale(1.
|
| 306 |
-
box-shadow: 0
|
| 307 |
}
|
| 308 |
|
| 309 |
#coder-stop_button:hover:not(:disabled) {
|
| 310 |
-
background:
|
| 311 |
}
|
| 312 |
|
| 313 |
/* Icon Styling */
|
| 314 |
#coder .mic-icon,
|
| 315 |
#coder .stop-icon {
|
| 316 |
-
width:
|
| 317 |
-
height:
|
| 318 |
transition: transform 0.3s;
|
| 319 |
fill: #ffffff;
|
| 320 |
}
|
|
@@ -338,7 +380,7 @@
|
|
| 338 |
|
| 339 |
/* Chat Stats */
|
| 340 |
#coder-chat-stats {
|
| 341 |
-
font-size:
|
| 342 |
color: #555555;
|
| 343 |
text-align: center;
|
| 344 |
margin-top: 10px;
|
|
@@ -349,7 +391,7 @@
|
|
| 349 |
display: none;
|
| 350 |
}
|
| 351 |
|
| 352 |
-
/* Scrollbar Styling */
|
| 353 |
#coder-chat-box::-webkit-scrollbar,
|
| 354 |
#coder-logs::-webkit-scrollbar {
|
| 355 |
width: 8px;
|
|
@@ -372,14 +414,13 @@
|
|
| 372 |
background: #a8a8a8;
|
| 373 |
}
|
| 374 |
|
| 375 |
-
/* Initialize Button Styling
|
| 376 |
#coder-download {
|
| 377 |
-
|
| 378 |
-
background: linear-gradient(135deg, #00796B, #004D40);
|
| 379 |
border: none;
|
| 380 |
color: white;
|
| 381 |
-
padding:
|
| 382 |
-
font-size:
|
| 383 |
border-radius: 8px;
|
| 384 |
cursor: pointer;
|
| 385 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
@@ -387,13 +428,13 @@
|
|
| 387 |
}
|
| 388 |
|
| 389 |
#coder-download:hover:not(:disabled) {
|
| 390 |
-
background:
|
| 391 |
-
transform: translateY(-
|
| 392 |
-
box-shadow:
|
| 393 |
}
|
| 394 |
|
| 395 |
#coder-download:disabled {
|
| 396 |
-
background:
|
| 397 |
cursor: not-allowed;
|
| 398 |
box-shadow: none;
|
| 399 |
}
|
|
@@ -401,14 +442,31 @@
|
|
| 401 |
/* Configuration Info Styling */
|
| 402 |
#coder-configuration {
|
| 403 |
margin-top: 15px;
|
| 404 |
-
font-size:
|
| 405 |
color: #555555;
|
| 406 |
}
|
| 407 |
|
| 408 |
/* Responsive Grid Adjustments */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
@media (max-width: 800px) {
|
| 410 |
.coder-card {
|
| 411 |
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
}
|
| 413 |
|
| 414 |
/* Adjust Logs Container Height for Smaller Screens */
|
|
@@ -419,4 +477,15 @@
|
|
| 419 |
#coder-logs {
|
| 420 |
max-height: 150px;
|
| 421 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
}
|
|
|
|
| 1 |
/* coder.css */
|
| 2 |
|
| 3 |
+
/* Define CSS Variables at the Root */
|
| 4 |
+
:root {
|
| 5 |
+
/* Colors */
|
| 6 |
+
--primary-color: #00796B;
|
| 7 |
+
--primary-gradient: linear-gradient(135deg, #00796B, #004D40);
|
| 8 |
+
--primary-hover-gradient: linear-gradient(135deg, #005D56, #00332E);
|
| 9 |
+
--secondary-color: #E53935;
|
| 10 |
+
--secondary-gradient: linear-gradient(135deg, #FF5252, #E53935);
|
| 11 |
+
--secondary-hover-gradient: linear-gradient(135deg, #E53935, #D32F2F);
|
| 12 |
+
--disabled-gradient: linear-gradient(135deg, #A5D6A7, #81C784);
|
| 13 |
+
--background-color: #ffffff;
|
| 14 |
+
--hover-background-color: #f9f9f9;
|
| 15 |
+
--text-color: #333333;
|
| 16 |
+
--border-color: #cccccc;
|
| 17 |
+
|
| 18 |
+
/* Existing Spacing Variables */
|
| 19 |
+
--padding: 20px;
|
| 20 |
+
--padding-small: 15px;
|
| 21 |
+
--gap: 15px;
|
| 22 |
+
--gap-large: 25px;
|
| 23 |
+
|
| 24 |
+
/* New Reduced Spacing Variables */
|
| 25 |
+
--padding-compact: 10px;
|
| 26 |
+
--gap-compact: 10px;
|
| 27 |
+
|
| 28 |
+
/* Font Sizes */
|
| 29 |
+
--font-size-base: 1em;
|
| 30 |
+
--font-size-small: 0.85em;
|
| 31 |
+
--font-size-large: 1.2em;
|
| 32 |
+
|
| 33 |
+
/* Border Radius */
|
| 34 |
+
--border-radius: 12px;
|
| 35 |
+
|
| 36 |
+
/* Box Shadows */
|
| 37 |
+
--box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 38 |
+
--box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
/* Reset and Base Styles */
|
| 42 |
#coder * {
|
| 43 |
box-sizing: border-box;
|
|
|
|
| 47 |
/* Card Styling */
|
| 48 |
.coder-card {
|
| 49 |
display: flex;
|
| 50 |
+
flex-direction: column; /* Stack options and main content vertically */
|
| 51 |
+
gap: var(--gap-large); /* Large gap between sections */
|
| 52 |
+
background: var(--background-color);
|
| 53 |
+
border-radius: var(--border-radius);
|
| 54 |
+
box-shadow: var(--box-shadow-base);
|
| 55 |
+
padding: var(--padding);
|
| 56 |
margin: 25px auto;
|
| 57 |
|
| 58 |
transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
|
|
|
|
| 64 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 65 |
}
|
| 66 |
|
| 67 |
+
/* Flex Layout for Coder Options */
|
| 68 |
.coder-options {
|
| 69 |
+
width: 100%; /* Full width */
|
| 70 |
display: flex;
|
| 71 |
+
flex-direction: row; /* Arrange options side by side */
|
| 72 |
+
flex-wrap: wrap; /* Allow wrapping on smaller screens */
|
| 73 |
+
gap: var(--gap-compact); /* Reduced gap for compactness */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
/* Option Sections Styling */
|
| 77 |
.option-section {
|
| 78 |
+
background-color: var(--background-color);
|
| 79 |
+
padding: var(--padding-compact); /* Reduced padding */
|
| 80 |
+
border-radius: var(--border-radius);
|
| 81 |
+
box-shadow: var(--box-shadow-base);
|
| 82 |
transition: background 0.3s, box-shadow 0.3s;
|
| 83 |
+
flex: 1 1 200px; /* Flexible basis */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
display: flex;
|
| 86 |
+
flex-direction: column; /* Stack labels and inputs vertically */
|
| 87 |
+
gap: var(--gap-compact); /* Reduced gap */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
|
| 90 |
+
.option-section:hover {
|
| 91 |
+
background-color: var(--hover-background-color);
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
+
/* Labels Styling */
|
| 95 |
+
.option-section label {
|
| 96 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 97 |
+
color: var(--text-color);
|
| 98 |
+
font-weight: 600;
|
| 99 |
+
margin-bottom: 3px; /* Reduced margin */
|
| 100 |
}
|
| 101 |
|
| 102 |
+
/* Select Dropdown Styling */
|
| 103 |
+
.option-section select {
|
| 104 |
width: 100%;
|
| 105 |
+
padding: 8px 12px; /* Reduced padding */
|
| 106 |
+
border: 1px solid var(--border-color);
|
| 107 |
border-radius: 8px;
|
| 108 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 109 |
+
background-color: var(--background-color);
|
| 110 |
transition: border-color 0.3s, box-shadow 0.3s;
|
|
|
|
| 111 |
}
|
| 112 |
|
| 113 |
+
.option-section select:focus {
|
| 114 |
+
border-color: var(--primary-color);
|
| 115 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 116 |
outline: none;
|
| 117 |
}
|
| 118 |
|
| 119 |
+
/* Grouped Controls Styling */
|
| 120 |
+
.option-control-group {
|
| 121 |
+
display: flex;
|
| 122 |
+
flex-direction: row;
|
| 123 |
+
gap: 10px;
|
| 124 |
+
align-items: center;
|
| 125 |
}
|
| 126 |
|
| 127 |
+
/* Range Inputs Styling */
|
| 128 |
+
.option-section input[type="range"] {
|
| 129 |
width: 100%;
|
| 130 |
+
margin: 5px 0; /* Reduced margin */
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
/* Button Styling within Option Sections */
|
| 134 |
+
.option-section button {
|
| 135 |
+
background: var(--primary-gradient);
|
| 136 |
+
border: none;
|
| 137 |
+
color: white;
|
| 138 |
+
padding: 8px 12px; /* Reduced padding */
|
| 139 |
+
font-size: 0.9em; /* Slightly reduced font size */
|
| 140 |
+
border-radius: 8px;
|
| 141 |
+
cursor: pointer;
|
| 142 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 143 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.option-section button:hover:not(:disabled) {
|
| 147 |
+
background: var(--primary-hover-gradient);
|
| 148 |
+
transform: translateY(-1px); /* Slightly less translate */
|
| 149 |
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.option-section button:disabled {
|
| 153 |
+
background: var(--disabled-gradient);
|
| 154 |
+
cursor: not-allowed;
|
| 155 |
+
box-shadow: none;
|
| 156 |
}
|
| 157 |
|
| 158 |
/* Logs Container Styling */
|
| 159 |
#coder-logs-container {
|
| 160 |
display: flex;
|
| 161 |
flex-direction: column;
|
| 162 |
+
gap: var(--gap-small); /* Small gap */
|
| 163 |
+
max-height: 150px; /* Fixed height to prevent infinite expansion */
|
| 164 |
+
overflow: hidden; /* Hide overflow to maintain layout */
|
| 165 |
}
|
| 166 |
|
| 167 |
+
/* Logs Content Styling */
|
| 168 |
#coder-logs {
|
| 169 |
flex: 1;
|
| 170 |
+
max-height: 200px; /* Adjust based on container height */
|
| 171 |
border: 1px solid #e0e0e0;
|
| 172 |
+
border-radius: var(--border-radius);
|
| 173 |
overflow-y: auto; /* Enable vertical scrolling */
|
| 174 |
padding: 10px;
|
| 175 |
background-color: #f9f9f9;
|
| 176 |
+
font-size: var(--font-size-small);
|
| 177 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 178 |
}
|
| 179 |
|
| 180 |
+
/* Clear Logs Button Styling */
|
| 181 |
#coder-clear-logs {
|
| 182 |
align-self: flex-end;
|
| 183 |
+
background: var(--secondary-gradient);
|
| 184 |
border: none;
|
| 185 |
color: white;
|
| 186 |
+
padding: 6px 12px; /* Reduced padding */
|
| 187 |
+
font-size: 0.85em; /* Reduced font size */
|
| 188 |
cursor: pointer;
|
| 189 |
border-radius: 8px;
|
| 190 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
|
|
| 192 |
}
|
| 193 |
|
| 194 |
#coder-clear-logs:hover {
|
| 195 |
+
background: var(--secondary-hover-gradient);
|
| 196 |
+
transform: scale(1.01); /* Less scaling */
|
| 197 |
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
|
| 198 |
}
|
| 199 |
|
| 200 |
/* Chat Box Styling */
|
| 201 |
#coder-chat-box {
|
| 202 |
height: 500px;
|
| 203 |
border: 1px solid #e0e0e0;
|
| 204 |
+
border-radius: var(--border-radius);
|
| 205 |
overflow-y: auto;
|
| 206 |
+
padding: 15px; /* Reduced padding */
|
| 207 |
+
background-color: var(--background-color);
|
| 208 |
position: relative;
|
| 209 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 210 |
+
margin-bottom: 15px; /* Reduced margin */
|
| 211 |
}
|
| 212 |
|
| 213 |
/* Message Styling */
|
| 214 |
#coder .message-container {
|
| 215 |
+
margin-bottom: 15px; /* Reduced margin */
|
| 216 |
display: flex;
|
| 217 |
}
|
| 218 |
|
| 219 |
#coder .message {
|
| 220 |
+
padding: 10px 14px; /* Reduced padding */
|
| 221 |
+
border-radius: 18px; /* Slightly smaller border radius */
|
| 222 |
max-width: 75%;
|
| 223 |
position: relative;
|
| 224 |
word-wrap: break-word;
|
| 225 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 226 |
+
font-size: var(--font-size-base);
|
| 227 |
line-height: 1.4;
|
| 228 |
background-color: #f1f8e9;
|
| 229 |
transition: background-color 0.3s, box-shadow 0.3s;
|
|
|
|
| 242 |
/* Chat Input Container Styling */
|
| 243 |
#coder-text-input-container {
|
| 244 |
display: flex;
|
| 245 |
+
gap: 8px; /* Reduced gap */
|
| 246 |
}
|
| 247 |
|
| 248 |
#coder-text-input {
|
| 249 |
flex: 1;
|
| 250 |
+
padding: 8px 12px; /* Reduced padding */
|
| 251 |
+
border: 1px solid var(--border-color);
|
| 252 |
border-radius: 8px;
|
| 253 |
+
font-size: var(--font-size-base);
|
| 254 |
+
background-color: var(--background-color);
|
| 255 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 256 |
}
|
| 257 |
|
| 258 |
#coder-text-input:focus {
|
| 259 |
+
border-color: var(--primary-color);
|
| 260 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 261 |
outline: none;
|
| 262 |
}
|
| 263 |
|
| 264 |
#coder-submit-button {
|
| 265 |
+
background: var(--primary-gradient);
|
| 266 |
border: none;
|
| 267 |
color: white;
|
| 268 |
+
padding: 8px 16px; /* Reduced padding */
|
| 269 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 270 |
border-radius: 8px;
|
| 271 |
cursor: pointer;
|
| 272 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
|
|
| 274 |
}
|
| 275 |
|
| 276 |
#coder-submit-button:hover:not(:disabled) {
|
| 277 |
+
background: var(--primary-hover-gradient);
|
| 278 |
+
transform: translateY(-1px); /* Less translate */
|
| 279 |
+
box-shadow: var(--box-shadow-hover);
|
| 280 |
}
|
| 281 |
|
| 282 |
#coder-submit-button:disabled {
|
| 283 |
+
background: var(--disabled-gradient);
|
| 284 |
cursor: not-allowed;
|
| 285 |
box-shadow: none;
|
| 286 |
}
|
|
|
|
| 289 |
#coder-mic-container {
|
| 290 |
display: flex;
|
| 291 |
justify-content: center;
|
| 292 |
+
gap: 10px; /* Reduced gap */
|
| 293 |
+
margin-top: 15px; /* Reduced margin */
|
| 294 |
}
|
| 295 |
|
| 296 |
#coder-start_button,
|
| 297 |
#coder-stop_button {
|
| 298 |
+
background: var(--primary-gradient);
|
| 299 |
border: none;
|
| 300 |
color: white;
|
| 301 |
+
padding: 12px; /* Reduced padding */
|
| 302 |
border-radius: 50%;
|
| 303 |
cursor: pointer;
|
| 304 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 305 |
+
width: 50px; /* Reduced size */
|
| 306 |
+
height: 50px; /* Reduced size */
|
| 307 |
display: flex;
|
| 308 |
justify-content: center;
|
| 309 |
align-items: center;
|
|
|
|
| 313 |
}
|
| 314 |
|
| 315 |
#coder-stop_button {
|
| 316 |
+
background: var(--secondary-gradient);
|
| 317 |
}
|
| 318 |
|
| 319 |
#coder-start_button::before,
|
|
|
|
| 337 |
|
| 338 |
#coder-start_button:disabled,
|
| 339 |
#coder-stop_button:disabled {
|
| 340 |
+
background: var(--disabled-gradient);
|
| 341 |
cursor: not-allowed;
|
| 342 |
box-shadow: none;
|
| 343 |
}
|
| 344 |
|
| 345 |
#coder-start_button:hover:not(:disabled),
|
| 346 |
#coder-stop_button:hover:not(:disabled) {
|
| 347 |
+
transform: scale(1.03); /* Slightly less scaling */
|
| 348 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| 349 |
}
|
| 350 |
|
| 351 |
#coder-stop_button:hover:not(:disabled) {
|
| 352 |
+
background: var(--secondary-hover-gradient);
|
| 353 |
}
|
| 354 |
|
| 355 |
/* Icon Styling */
|
| 356 |
#coder .mic-icon,
|
| 357 |
#coder .stop-icon {
|
| 358 |
+
width: 24px; /* Reduced size */
|
| 359 |
+
height: 24px; /* Reduced size */
|
| 360 |
transition: transform 0.3s;
|
| 361 |
fill: #ffffff;
|
| 362 |
}
|
|
|
|
| 380 |
|
| 381 |
/* Chat Stats */
|
| 382 |
#coder-chat-stats {
|
| 383 |
+
font-size: var(--font-size-small);
|
| 384 |
color: #555555;
|
| 385 |
text-align: center;
|
| 386 |
margin-top: 10px;
|
|
|
|
| 391 |
display: none;
|
| 392 |
}
|
| 393 |
|
| 394 |
+
/* Scrollbar Styling for Logs and Chat */
|
| 395 |
#coder-chat-box::-webkit-scrollbar,
|
| 396 |
#coder-logs::-webkit-scrollbar {
|
| 397 |
width: 8px;
|
|
|
|
| 414 |
background: #a8a8a8;
|
| 415 |
}
|
| 416 |
|
| 417 |
+
/* Initialize Button Styling */
|
| 418 |
#coder-download {
|
| 419 |
+
background: var(--primary-gradient);
|
|
|
|
| 420 |
border: none;
|
| 421 |
color: white;
|
| 422 |
+
padding: 8px 16px; /* Reduced padding */
|
| 423 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 424 |
border-radius: 8px;
|
| 425 |
cursor: pointer;
|
| 426 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
|
|
| 428 |
}
|
| 429 |
|
| 430 |
#coder-download:hover:not(:disabled) {
|
| 431 |
+
background: var(--primary-hover-gradient);
|
| 432 |
+
transform: translateY(-1px); /* Less translate */
|
| 433 |
+
box-shadow: var(--box-shadow-hover);
|
| 434 |
}
|
| 435 |
|
| 436 |
#coder-download:disabled {
|
| 437 |
+
background: var(--disabled-gradient);
|
| 438 |
cursor: not-allowed;
|
| 439 |
box-shadow: none;
|
| 440 |
}
|
|
|
|
| 442 |
/* Configuration Info Styling */
|
| 443 |
#coder-configuration {
|
| 444 |
margin-top: 15px;
|
| 445 |
+
font-size: var(--font-size-small);
|
| 446 |
color: #555555;
|
| 447 |
}
|
| 448 |
|
| 449 |
/* Responsive Grid Adjustments */
|
| 450 |
+
@media (max-width: 1200px) {
|
| 451 |
+
.coder-options {
|
| 452 |
+
flex-direction: row; /* Ensure row direction on larger screens */
|
| 453 |
+
}
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
@media (max-width: 800px) {
|
| 457 |
.coder-card {
|
| 458 |
flex-direction: column;
|
| 459 |
+
padding: 20px;
|
| 460 |
+
margin: 20px auto;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.coder-options {
|
| 464 |
+
gap: var(--gap-compact);
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
.chat-window {
|
| 468 |
+
flex-direction: column; /* Stack chat sections vertically on small screens */
|
| 469 |
+
gap: var(--gap-compact);
|
| 470 |
}
|
| 471 |
|
| 472 |
/* Adjust Logs Container Height for Smaller Screens */
|
|
|
|
| 477 |
#coder-logs {
|
| 478 |
max-height: 150px;
|
| 479 |
}
|
| 480 |
+
|
| 481 |
+
/* Adjust Image Section for Smaller Screens */
|
| 482 |
+
/* If applicable */
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
/* Additional Styles for Option Control Group */
|
| 486 |
+
.option-control-group {
|
| 487 |
+
display: flex;
|
| 488 |
+
flex-direction: row;
|
| 489 |
+
gap: 10px;
|
| 490 |
+
align-items: center;
|
| 491 |
}
|
coder.js
CHANGED
|
@@ -333,7 +333,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 333 |
voiceSelect.appendChild(option);
|
| 334 |
});
|
| 335 |
if (coderVoices.length > 0) {
|
| 336 |
-
const savedVoice = localStorage.getItem("
|
| 337 |
if (savedVoice !== null && coderVoices[savedVoice]) {
|
| 338 |
coderSpeech.voice = coderVoices[savedVoice];
|
| 339 |
voiceSelect.value = savedVoice;
|
|
@@ -348,7 +348,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 348 |
const selectedVoiceIndex = document.getElementById("coder-tools").value;
|
| 349 |
coderSpeech.voice = coderVoices[selectedVoiceIndex];
|
| 350 |
// Save to localStorage
|
| 351 |
-
localStorage.setItem("
|
| 352 |
logMessage(`Voice changed to: ${coderVoices[selectedVoiceIndex].name}`, "system");
|
| 353 |
});
|
| 354 |
|
|
@@ -527,21 +527,21 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 527 |
|
| 528 |
// Load Preferences on Initialization
|
| 529 |
window.addEventListener("load", () => {
|
| 530 |
-
const savedVoice = localStorage.getItem("
|
| 531 |
if (savedVoice !== null && coderVoices[savedVoice]) {
|
| 532 |
document.getElementById("coder-tools").value = savedVoice;
|
| 533 |
coderSpeech.voice = coderVoices[savedVoice];
|
| 534 |
logMessage(`Loaded saved voice: ${coderVoices[savedVoice].name}`, "system");
|
| 535 |
}
|
| 536 |
|
| 537 |
-
const savedRate = localStorage.getItem("
|
| 538 |
if (savedRate !== null) {
|
| 539 |
document.getElementById("coder-speech-rate").value = savedRate;
|
| 540 |
coderSpeech.rate = parseFloat(savedRate);
|
| 541 |
logMessage(`Loaded saved speech rate: ${savedRate}`, "system");
|
| 542 |
}
|
| 543 |
|
| 544 |
-
const savedPitch = localStorage.getItem("
|
| 545 |
if (savedPitch !== null) {
|
| 546 |
document.getElementById("coder-speech-pitch").value = savedPitch;
|
| 547 |
coderSpeech.pitch = parseFloat(savedPitch);
|
|
@@ -553,7 +553,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 553 |
document.getElementById("coder-speech-rate").addEventListener("input", (e) => {
|
| 554 |
const rate = e.target.value;
|
| 555 |
coderSpeech.rate = parseFloat(rate);
|
| 556 |
-
localStorage.setItem("
|
| 557 |
logMessage(`Speech rate changed to: ${rate}`, "system");
|
| 558 |
});
|
| 559 |
|
|
@@ -561,7 +561,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 561 |
document.getElementById("coder-speech-pitch").addEventListener("input", (e) => {
|
| 562 |
const pitch = e.target.value;
|
| 563 |
coderSpeech.pitch = parseFloat(pitch);
|
| 564 |
-
localStorage.setItem("
|
| 565 |
logMessage(`Speech pitch changed to: ${pitch}`, "system");
|
| 566 |
});
|
| 567 |
|
|
@@ -609,4 +609,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 609 |
// Ensure Stop button is disabled after speech ends
|
| 610 |
document.getElementById("coder-stop_button").disabled = true;
|
| 611 |
});
|
|
|
|
|
|
|
| 612 |
});
|
|
|
|
| 333 |
voiceSelect.appendChild(option);
|
| 334 |
});
|
| 335 |
if (coderVoices.length > 0) {
|
| 336 |
+
const savedVoice = localStorage.getItem("coder-selectedVoice");
|
| 337 |
if (savedVoice !== null && coderVoices[savedVoice]) {
|
| 338 |
coderSpeech.voice = coderVoices[savedVoice];
|
| 339 |
voiceSelect.value = savedVoice;
|
|
|
|
| 348 |
const selectedVoiceIndex = document.getElementById("coder-tools").value;
|
| 349 |
coderSpeech.voice = coderVoices[selectedVoiceIndex];
|
| 350 |
// Save to localStorage
|
| 351 |
+
localStorage.setItem("coder-selectedVoice", selectedVoiceIndex);
|
| 352 |
logMessage(`Voice changed to: ${coderVoices[selectedVoiceIndex].name}`, "system");
|
| 353 |
});
|
| 354 |
|
|
|
|
| 527 |
|
| 528 |
// Load Preferences on Initialization
|
| 529 |
window.addEventListener("load", () => {
|
| 530 |
+
const savedVoice = localStorage.getItem("coder-selectedVoice");
|
| 531 |
if (savedVoice !== null && coderVoices[savedVoice]) {
|
| 532 |
document.getElementById("coder-tools").value = savedVoice;
|
| 533 |
coderSpeech.voice = coderVoices[savedVoice];
|
| 534 |
logMessage(`Loaded saved voice: ${coderVoices[savedVoice].name}`, "system");
|
| 535 |
}
|
| 536 |
|
| 537 |
+
const savedRate = localStorage.getItem("coder-speechRate");
|
| 538 |
if (savedRate !== null) {
|
| 539 |
document.getElementById("coder-speech-rate").value = savedRate;
|
| 540 |
coderSpeech.rate = parseFloat(savedRate);
|
| 541 |
logMessage(`Loaded saved speech rate: ${savedRate}`, "system");
|
| 542 |
}
|
| 543 |
|
| 544 |
+
const savedPitch = localStorage.getItem("coder-speechPitch");
|
| 545 |
if (savedPitch !== null) {
|
| 546 |
document.getElementById("coder-speech-pitch").value = savedPitch;
|
| 547 |
coderSpeech.pitch = parseFloat(savedPitch);
|
|
|
|
| 553 |
document.getElementById("coder-speech-rate").addEventListener("input", (e) => {
|
| 554 |
const rate = e.target.value;
|
| 555 |
coderSpeech.rate = parseFloat(rate);
|
| 556 |
+
localStorage.setItem("coder-speechRate", rate);
|
| 557 |
logMessage(`Speech rate changed to: ${rate}`, "system");
|
| 558 |
});
|
| 559 |
|
|
|
|
| 561 |
document.getElementById("coder-speech-pitch").addEventListener("input", (e) => {
|
| 562 |
const pitch = e.target.value;
|
| 563 |
coderSpeech.pitch = parseFloat(pitch);
|
| 564 |
+
localStorage.setItem("coder-speechPitch", pitch);
|
| 565 |
logMessage(`Speech pitch changed to: ${pitch}`, "system");
|
| 566 |
});
|
| 567 |
|
|
|
|
| 609 |
// Ensure Stop button is disabled after speech ends
|
| 610 |
document.getElementById("coder-stop_button").disabled = true;
|
| 611 |
});
|
| 612 |
+
|
| 613 |
+
|
| 614 |
});
|
digital.human.audio.css
CHANGED
|
@@ -9,6 +9,7 @@
|
|
| 9 |
/* Card Styling */
|
| 10 |
.voice-card {
|
| 11 |
display: flex;
|
|
|
|
| 12 |
gap: 20px;
|
| 13 |
background: linear-gradient(135deg, #ffffff, #f1f8e9);
|
| 14 |
border-radius: 16px;
|
|
@@ -25,25 +26,13 @@
|
|
| 25 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 26 |
}
|
| 27 |
|
| 28 |
-
/* Flex Layout for Voice Options
|
| 29 |
.voice-options {
|
| 30 |
-
flex: 1;
|
| 31 |
display: flex;
|
| 32 |
-
flex-direction:
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
/* Ensure Voice Options takes up available vertical space */
|
| 37 |
-
.voice-options {
|
| 38 |
-
height: 100%;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
/* Chat Window Styling */
|
| 42 |
-
.chat-window {
|
| 43 |
-
flex: 2;
|
| 44 |
-
display: flex;
|
| 45 |
-
flex-direction: column;
|
| 46 |
-
gap: 20px;
|
| 47 |
}
|
| 48 |
|
| 49 |
/* Option Sections Styling */
|
|
@@ -53,6 +42,9 @@
|
|
| 53 |
border-radius: 12px;
|
| 54 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 55 |
transition: background 0.3s, box-shadow 0.3s;
|
|
|
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
|
| 58 |
.option-section:hover {
|
|
@@ -120,7 +112,7 @@
|
|
| 120 |
display: flex;
|
| 121 |
flex-direction: column;
|
| 122 |
gap: 10px;
|
| 123 |
-
max-height:
|
| 124 |
overflow: hidden; /* Hide any overflow to prevent the container from expanding */
|
| 125 |
}
|
| 126 |
|
|
@@ -406,17 +398,23 @@
|
|
| 406 |
}
|
| 407 |
|
| 408 |
/* Responsive Grid Adjustments */
|
| 409 |
-
@media (max-width:
|
| 410 |
-
.voice-
|
| 411 |
-
flex-direction:
|
|
|
|
| 412 |
}
|
| 413 |
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 417 |
}
|
| 418 |
|
| 419 |
-
|
| 420 |
-
|
| 421 |
}
|
| 422 |
}
|
|
|
|
| 9 |
/* Card Styling */
|
| 10 |
.voice-card {
|
| 11 |
display: flex;
|
| 12 |
+
flex-direction: column; /* Ensure column layout */
|
| 13 |
gap: 20px;
|
| 14 |
background: linear-gradient(135deg, #ffffff, #f1f8e9);
|
| 15 |
border-radius: 16px;
|
|
|
|
| 26 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 27 |
}
|
| 28 |
|
| 29 |
+
/* Flex Layout for Voice Options */
|
| 30 |
.voice-options {
|
|
|
|
| 31 |
display: flex;
|
| 32 |
+
flex-direction: row; /* Arrange items in a row */
|
| 33 |
+
flex-wrap: wrap; /* Allow items to wrap to the next line on smaller screens */
|
| 34 |
+
gap: 20px; /* Space between option sections */
|
| 35 |
+
align-items: flex-start; /* Align items to the top */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
/* Option Sections Styling */
|
|
|
|
| 42 |
border-radius: 12px;
|
| 43 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 44 |
transition: background 0.3s, box-shadow 0.3s;
|
| 45 |
+
|
| 46 |
+
flex: 1 1 250px; /* Grow and shrink with a base width of 250px */
|
| 47 |
+
min-width: 200px; /* Prevent the section from becoming too small */
|
| 48 |
}
|
| 49 |
|
| 50 |
.option-section:hover {
|
|
|
|
| 112 |
display: flex;
|
| 113 |
flex-direction: column;
|
| 114 |
gap: 10px;
|
| 115 |
+
max-height: 150px; /* Set a maximum height for the logs container */
|
| 116 |
overflow: hidden; /* Hide any overflow to prevent the container from expanding */
|
| 117 |
}
|
| 118 |
|
|
|
|
| 398 |
}
|
| 399 |
|
| 400 |
/* Responsive Grid Adjustments */
|
| 401 |
+
@media (max-width: 1200px) {
|
| 402 |
+
.voice-options {
|
| 403 |
+
flex-direction: row;
|
| 404 |
+
flex-wrap: wrap;
|
| 405 |
}
|
| 406 |
|
| 407 |
+
.option-section {
|
| 408 |
+
flex: 1 1 45%; /* Two items per row */
|
| 409 |
+
}
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
@media (max-width: 800px) {
|
| 413 |
+
.voice-options {
|
| 414 |
+
flex-direction: column; /* Stack vertically on very small screens */
|
| 415 |
}
|
| 416 |
|
| 417 |
+
.option-section {
|
| 418 |
+
flex: 1 1 100%; /* Full width */
|
| 419 |
}
|
| 420 |
}
|
digital.human.audio.js
CHANGED
|
@@ -223,7 +223,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 223 |
|
| 224 |
if (!('webkitSpeechRecognition' in window)) {
|
| 225 |
alert("Web Speech API is not supported by this browser.");
|
| 226 |
-
logMessage("Web Speech API
|
| 227 |
} else {
|
| 228 |
voiceRecognition = new webkitSpeechRecognition();
|
| 229 |
voiceRecognition.continuous = false; // Non-continuous recognition
|
|
|
|
| 223 |
|
| 224 |
if (!('webkitSpeechRecognition' in window)) {
|
| 225 |
alert("Web Speech API is not supported by this browser.");
|
| 226 |
+
logMessage("Web Speech API not supported by this browser.", "error");
|
| 227 |
} else {
|
| 228 |
voiceRecognition = new webkitSpeechRecognition();
|
| 229 |
voiceRecognition.continuous = false; // Non-continuous recognition
|
digital.human.video.css
CHANGED
|
@@ -1,5 +1,43 @@
|
|
| 1 |
/* digital.human.video.css */
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
/* Reset and Base Styles */
|
| 4 |
#video * {
|
| 5 |
box-sizing: border-box;
|
|
@@ -9,11 +47,12 @@
|
|
| 9 |
/* Card Styling */
|
| 10 |
.video-card {
|
| 11 |
display: flex;
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 17 |
margin: 25px auto;
|
| 18 |
|
| 19 |
transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
|
|
@@ -25,124 +64,119 @@
|
|
| 25 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 26 |
}
|
| 27 |
|
| 28 |
-
/* Flex Layout for Video Options
|
| 29 |
.video-options {
|
| 30 |
-
|
| 31 |
display: flex;
|
| 32 |
-
flex-direction:
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
/* Ensure Video Options takes up available vertical space */
|
| 37 |
-
.video-options {
|
| 38 |
-
height: 100%;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
/* Chat Window Styling */
|
| 42 |
-
.chat-window {
|
| 43 |
-
flex: 2;
|
| 44 |
-
display: flex;
|
| 45 |
-
flex-direction: column;
|
| 46 |
-
gap: 20px;
|
| 47 |
}
|
| 48 |
|
| 49 |
/* Option Sections Styling */
|
| 50 |
.option-section {
|
| 51 |
-
background-color:
|
| 52 |
-
padding:
|
| 53 |
-
border-radius:
|
| 54 |
-
box-shadow:
|
| 55 |
transition: background 0.3s, box-shadow 0.3s;
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
/* Button Styling (Reused from Original) */
|
| 63 |
-
#video button {
|
| 64 |
-
background: linear-gradient(135deg, #00796B, #004D40);
|
| 65 |
-
border: none;
|
| 66 |
-
color: white;
|
| 67 |
-
padding: 12px 20px;
|
| 68 |
-
font-size: 1em;
|
| 69 |
-
border-radius: 8px;
|
| 70 |
-
cursor: pointer;
|
| 71 |
-
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 72 |
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 73 |
}
|
| 74 |
|
| 75 |
-
|
| 76 |
-
background:
|
| 77 |
-
transform: translateY(-2px);
|
| 78 |
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 79 |
}
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
|
|
|
|
|
| 85 |
}
|
| 86 |
|
| 87 |
-
/* Select Dropdown Styling
|
| 88 |
-
|
| 89 |
width: 100%;
|
| 90 |
-
padding:
|
| 91 |
-
border: 1px solid
|
| 92 |
border-radius: 8px;
|
| 93 |
-
font-size:
|
| 94 |
-
background-color:
|
| 95 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 96 |
-
margin-bottom: 15px;
|
| 97 |
}
|
| 98 |
|
| 99 |
-
|
| 100 |
-
border-color:
|
| 101 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 102 |
outline: none;
|
| 103 |
}
|
| 104 |
|
| 105 |
-
/*
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
margin
|
| 109 |
-
color: #555555;
|
| 110 |
-
font-weight: 500;
|
| 111 |
}
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
/* Logs Container Styling */
|
| 119 |
#video-logs-container {
|
| 120 |
display: flex;
|
| 121 |
flex-direction: column;
|
| 122 |
-
gap:
|
| 123 |
-
max-height:
|
| 124 |
-
overflow: hidden; /* Hide
|
| 125 |
}
|
| 126 |
|
|
|
|
| 127 |
#video-logs {
|
| 128 |
flex: 1;
|
| 129 |
-
max-height: 200px; /* Adjust
|
| 130 |
border: 1px solid #e0e0e0;
|
| 131 |
-
border-radius:
|
| 132 |
overflow-y: auto; /* Enable vertical scrolling */
|
| 133 |
padding: 10px;
|
| 134 |
background-color: #f9f9f9;
|
| 135 |
-
font-size:
|
| 136 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 137 |
}
|
| 138 |
|
|
|
|
| 139 |
#video-clear-logs {
|
| 140 |
align-self: flex-end;
|
| 141 |
-
background:
|
| 142 |
border: none;
|
| 143 |
color: white;
|
| 144 |
-
padding:
|
| 145 |
-
font-size: 0.
|
| 146 |
cursor: pointer;
|
| 147 |
border-radius: 8px;
|
| 148 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
@@ -150,38 +184,112 @@
|
|
| 150 |
}
|
| 151 |
|
| 152 |
#video-clear-logs:hover {
|
| 153 |
-
background:
|
| 154 |
-
transform: scale(1.
|
| 155 |
-
box-shadow: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
|
| 158 |
/* Chat Box Styling */
|
| 159 |
#video-chat-box {
|
| 160 |
height: 500px;
|
| 161 |
border: 1px solid #e0e0e0;
|
| 162 |
-
border-radius:
|
| 163 |
overflow-y: auto;
|
| 164 |
-
padding:
|
| 165 |
-
background-color:
|
| 166 |
position: relative;
|
| 167 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 168 |
-
margin-bottom:
|
| 169 |
}
|
| 170 |
|
| 171 |
/* Message Styling */
|
| 172 |
#video .message-container {
|
| 173 |
-
margin-bottom:
|
| 174 |
display: flex;
|
| 175 |
}
|
| 176 |
|
| 177 |
#video .message {
|
| 178 |
-
padding:
|
| 179 |
-
border-radius:
|
| 180 |
max-width: 75%;
|
| 181 |
position: relative;
|
| 182 |
word-wrap: break-word;
|
| 183 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 184 |
-
font-size:
|
| 185 |
line-height: 1.4;
|
| 186 |
background-color: #f1f8e9;
|
| 187 |
transition: background-color 0.3s, box-shadow 0.3s;
|
|
@@ -200,31 +308,31 @@
|
|
| 200 |
/* Chat Input Container Styling */
|
| 201 |
#video-text-input-container {
|
| 202 |
display: flex;
|
| 203 |
-
gap:
|
| 204 |
}
|
| 205 |
|
| 206 |
#video-text-input {
|
| 207 |
flex: 1;
|
| 208 |
-
padding:
|
| 209 |
-
border: 1px solid
|
| 210 |
border-radius: 8px;
|
| 211 |
-
font-size:
|
| 212 |
-
background-color:
|
| 213 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 214 |
}
|
| 215 |
|
| 216 |
#video-text-input:focus {
|
| 217 |
-
border-color:
|
| 218 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 219 |
outline: none;
|
| 220 |
}
|
| 221 |
|
| 222 |
#video-submit-button {
|
| 223 |
-
background:
|
| 224 |
border: none;
|
| 225 |
color: white;
|
| 226 |
-
padding:
|
| 227 |
-
font-size:
|
| 228 |
border-radius: 8px;
|
| 229 |
cursor: pointer;
|
| 230 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
@@ -232,13 +340,13 @@
|
|
| 232 |
}
|
| 233 |
|
| 234 |
#video-submit-button:hover:not(:disabled) {
|
| 235 |
-
background:
|
| 236 |
-
transform: translateY(-
|
| 237 |
-
box-shadow: 0
|
| 238 |
}
|
| 239 |
|
| 240 |
#video-submit-button:disabled {
|
| 241 |
-
background:
|
| 242 |
cursor: not-allowed;
|
| 243 |
box-shadow: none;
|
| 244 |
}
|
|
@@ -247,21 +355,21 @@
|
|
| 247 |
#video-mic-container {
|
| 248 |
display: flex;
|
| 249 |
justify-content: center;
|
| 250 |
-
gap:
|
| 251 |
-
margin-top:
|
| 252 |
}
|
| 253 |
|
| 254 |
#video-start_button,
|
| 255 |
#video-stop_button {
|
| 256 |
-
background:
|
| 257 |
border: none;
|
| 258 |
color: white;
|
| 259 |
-
padding:
|
| 260 |
border-radius: 50%;
|
| 261 |
cursor: pointer;
|
| 262 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 263 |
-
width:
|
| 264 |
-
height:
|
| 265 |
display: flex;
|
| 266 |
justify-content: center;
|
| 267 |
align-items: center;
|
|
@@ -271,7 +379,7 @@
|
|
| 271 |
}
|
| 272 |
|
| 273 |
#video-stop_button {
|
| 274 |
-
background:
|
| 275 |
}
|
| 276 |
|
| 277 |
#video-start_button::before,
|
|
@@ -295,26 +403,26 @@
|
|
| 295 |
|
| 296 |
#video-start_button:disabled,
|
| 297 |
#video-stop_button:disabled {
|
| 298 |
-
background:
|
| 299 |
cursor: not-allowed;
|
| 300 |
box-shadow: none;
|
| 301 |
}
|
| 302 |
|
| 303 |
#video-start_button:hover:not(:disabled),
|
| 304 |
#video-stop_button:hover:not(:disabled) {
|
| 305 |
-
transform: scale(1.
|
| 306 |
-
box-shadow: 0
|
| 307 |
}
|
| 308 |
|
| 309 |
#video-stop_button:hover:not(:disabled) {
|
| 310 |
-
background:
|
| 311 |
}
|
| 312 |
|
| 313 |
/* Icon Styling */
|
| 314 |
#video .mic-icon,
|
| 315 |
#video .stop-icon {
|
| 316 |
-
width:
|
| 317 |
-
height:
|
| 318 |
transition: transform 0.3s;
|
| 319 |
fill: #ffffff;
|
| 320 |
}
|
|
@@ -338,7 +446,7 @@
|
|
| 338 |
|
| 339 |
/* Chat Stats */
|
| 340 |
#video-chat-stats {
|
| 341 |
-
font-size:
|
| 342 |
color: #555555;
|
| 343 |
text-align: center;
|
| 344 |
margin-top: 10px;
|
|
@@ -349,7 +457,7 @@
|
|
| 349 |
display: none;
|
| 350 |
}
|
| 351 |
|
| 352 |
-
/* Scrollbar Styling */
|
| 353 |
#video-chat-box::-webkit-scrollbar,
|
| 354 |
#video-logs::-webkit-scrollbar {
|
| 355 |
width: 8px;
|
|
@@ -372,14 +480,13 @@
|
|
| 372 |
background: #a8a8a8;
|
| 373 |
}
|
| 374 |
|
| 375 |
-
/* Initialize Button Styling
|
| 376 |
#video-download {
|
| 377 |
-
|
| 378 |
-
background: linear-gradient(135deg, #00796B, #004D40);
|
| 379 |
border: none;
|
| 380 |
color: white;
|
| 381 |
-
padding:
|
| 382 |
-
font-size:
|
| 383 |
border-radius: 8px;
|
| 384 |
cursor: pointer;
|
| 385 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
@@ -387,13 +494,13 @@
|
|
| 387 |
}
|
| 388 |
|
| 389 |
#video-download:hover:not(:disabled) {
|
| 390 |
-
background:
|
| 391 |
-
transform: translateY(-
|
| 392 |
-
box-shadow:
|
| 393 |
}
|
| 394 |
|
| 395 |
#video-download:disabled {
|
| 396 |
-
background:
|
| 397 |
cursor: not-allowed;
|
| 398 |
box-shadow: none;
|
| 399 |
}
|
|
@@ -401,14 +508,36 @@
|
|
| 401 |
/* Configuration Info Styling */
|
| 402 |
#video-configuration {
|
| 403 |
margin-top: 15px;
|
| 404 |
-
font-size:
|
| 405 |
color: #555555;
|
| 406 |
}
|
| 407 |
|
| 408 |
/* Responsive Grid Adjustments */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
@media (max-width: 800px) {
|
| 410 |
.video-card {
|
| 411 |
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
}
|
| 413 |
|
| 414 |
/* Adjust Logs Container Height for Smaller Screens */
|
|
@@ -419,37 +548,43 @@
|
|
| 419 |
#video-logs {
|
| 420 |
max-height: 150px;
|
| 421 |
}
|
| 422 |
-
}
|
| 423 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
|
| 425 |
-
/*
|
| 426 |
.video-image-section {
|
| 427 |
-
flex: 1;
|
| 428 |
display: flex;
|
| 429 |
flex-direction: column;
|
| 430 |
-
gap:
|
| 431 |
-
background-color:
|
| 432 |
-
padding:
|
| 433 |
-
border-radius:
|
| 434 |
-
box-shadow:
|
| 435 |
transition: background 0.3s, box-shadow 0.3s;
|
| 436 |
}
|
| 437 |
|
| 438 |
.video-image-section h3 {
|
| 439 |
margin-bottom: 10px;
|
| 440 |
-
color:
|
|
|
|
|
|
|
| 441 |
}
|
| 442 |
|
| 443 |
#video-image-upload {
|
| 444 |
-
padding:
|
| 445 |
-
border: 1px solid
|
| 446 |
border-radius: 8px;
|
| 447 |
-
font-size:
|
| 448 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 449 |
}
|
| 450 |
|
| 451 |
#video-image-upload:hover {
|
| 452 |
-
border-color:
|
| 453 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 454 |
}
|
| 455 |
|
|
@@ -457,14 +592,295 @@
|
|
| 457 |
width: 100%;
|
| 458 |
height: auto;
|
| 459 |
border: 1px solid #e0e0e0;
|
| 460 |
-
border-radius:
|
| 461 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 462 |
background-color: #f9f9f9;
|
| 463 |
}
|
| 464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 465 |
@media (max-width: 800px) {
|
| 466 |
.video-card {
|
| 467 |
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 468 |
}
|
| 469 |
|
| 470 |
/* Adjust Image Section for Smaller Screens */
|
|
@@ -472,3 +888,153 @@
|
|
| 472 |
width: 100%;
|
| 473 |
}
|
| 474 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
/* digital.human.video.css */
|
| 2 |
|
| 3 |
+
/* Define CSS Variables at the Root */
|
| 4 |
+
:root {
|
| 5 |
+
/* Colors */
|
| 6 |
+
--primary-color: #00796B;
|
| 7 |
+
--primary-gradient: linear-gradient(135deg, #00796B, #004D40);
|
| 8 |
+
--primary-hover-gradient: linear-gradient(135deg, #005D56, #00332E);
|
| 9 |
+
--secondary-color: #E53935;
|
| 10 |
+
--secondary-gradient: linear-gradient(135deg, #FF5252, #E53935);
|
| 11 |
+
--secondary-hover-gradient: linear-gradient(135deg, #E53935, #D32F2F);
|
| 12 |
+
--disabled-gradient: linear-gradient(135deg, #A5D6A7, #81C784);
|
| 13 |
+
--background-color: #ffffff;
|
| 14 |
+
--hover-background-color: #f9f9f9;
|
| 15 |
+
--text-color: #333333;
|
| 16 |
+
--border-color: #cccccc;
|
| 17 |
+
|
| 18 |
+
/* Existing Spacing Variables */
|
| 19 |
+
--padding: 20px;
|
| 20 |
+
--padding-small: 15px;
|
| 21 |
+
--gap: 15px;
|
| 22 |
+
--gap-large: 25px;
|
| 23 |
+
|
| 24 |
+
/* New Reduced Spacing Variables */
|
| 25 |
+
--padding-compact: 10px;
|
| 26 |
+
--gap-compact: 10px;
|
| 27 |
+
|
| 28 |
+
/* Font Sizes */
|
| 29 |
+
--font-size-base: 1em;
|
| 30 |
+
--font-size-small: 0.85em;
|
| 31 |
+
--font-size-large: 1.2em;
|
| 32 |
+
|
| 33 |
+
/* Border Radius */
|
| 34 |
+
--border-radius: 12px;
|
| 35 |
+
|
| 36 |
+
/* Box Shadows */
|
| 37 |
+
--box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 38 |
+
--box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
/* Reset and Base Styles */
|
| 42 |
#video * {
|
| 43 |
box-sizing: border-box;
|
|
|
|
| 47 |
/* Card Styling */
|
| 48 |
.video-card {
|
| 49 |
display: flex;
|
| 50 |
+
flex-direction: column; /* Stack options and main content vertically */
|
| 51 |
+
gap: var(--gap-large); /* Large gap between sections */
|
| 52 |
+
background: var(--background-color);
|
| 53 |
+
border-radius: var(--border-radius);
|
| 54 |
+
box-shadow: var(--box-shadow-base);
|
| 55 |
+
padding: var(--padding);
|
| 56 |
margin: 25px auto;
|
| 57 |
|
| 58 |
transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
|
|
|
|
| 64 |
background: linear-gradient(135deg, #e0f7fa, #ffffff);
|
| 65 |
}
|
| 66 |
|
| 67 |
+
/* Flex Layout for Video Options */
|
| 68 |
.video-options {
|
| 69 |
+
width: 100%; /* Full width */
|
| 70 |
display: flex;
|
| 71 |
+
flex-direction: row; /* Arrange options side by side */
|
| 72 |
+
flex-wrap: wrap; /* Allow wrapping on smaller screens */
|
| 73 |
+
gap: var(--gap-compact); /* Reduced gap for compactness */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
/* Option Sections Styling */
|
| 77 |
.option-section {
|
| 78 |
+
background-color: var(--background-color);
|
| 79 |
+
padding: var(--padding-compact); /* Reduced padding */
|
| 80 |
+
border-radius: var(--border-radius);
|
| 81 |
+
box-shadow: var(--box-shadow-base);
|
| 82 |
transition: background 0.3s, box-shadow 0.3s;
|
| 83 |
+
flex: 1 1 200px; /* Flexible basis */
|
| 84 |
|
| 85 |
+
display: flex;
|
| 86 |
+
flex-direction: column; /* Stack labels and inputs vertically */
|
| 87 |
+
gap: var(--gap-compact); /* Reduced gap */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
|
| 90 |
+
.option-section:hover {
|
| 91 |
+
background-color: var(--hover-background-color);
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
+
/* Labels Styling */
|
| 95 |
+
.option-section label {
|
| 96 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 97 |
+
color: var(--text-color);
|
| 98 |
+
font-weight: 600;
|
| 99 |
+
margin-bottom: 3px; /* Reduced margin */
|
| 100 |
}
|
| 101 |
|
| 102 |
+
/* Select Dropdown Styling */
|
| 103 |
+
.option-section select {
|
| 104 |
width: 100%;
|
| 105 |
+
padding: 8px 12px; /* Reduced padding */
|
| 106 |
+
border: 1px solid var(--border-color);
|
| 107 |
border-radius: 8px;
|
| 108 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 109 |
+
background-color: var(--background-color);
|
| 110 |
transition: border-color 0.3s, box-shadow 0.3s;
|
|
|
|
| 111 |
}
|
| 112 |
|
| 113 |
+
.option-section select:focus {
|
| 114 |
+
border-color: var(--primary-color);
|
| 115 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 116 |
outline: none;
|
| 117 |
}
|
| 118 |
|
| 119 |
+
/* Range Inputs Styling */
|
| 120 |
+
.option-section input[type="range"] {
|
| 121 |
+
width: 100%;
|
| 122 |
+
margin: 5px 0; /* Reduced margin */
|
|
|
|
|
|
|
| 123 |
}
|
| 124 |
|
| 125 |
+
/* Button Styling within Option Sections */
|
| 126 |
+
.option-section button {
|
| 127 |
+
background: var(--primary-gradient);
|
| 128 |
+
border: none;
|
| 129 |
+
color: white;
|
| 130 |
+
padding: 8px 12px; /* Reduced padding */
|
| 131 |
+
font-size: 0.9em; /* Slightly reduced font size */
|
| 132 |
+
border-radius: 8px;
|
| 133 |
+
cursor: pointer;
|
| 134 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 135 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.option-section button:hover:not(:disabled) {
|
| 139 |
+
background: var(--primary-hover-gradient);
|
| 140 |
+
transform: translateY(-1px); /* Slightly less translate */
|
| 141 |
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.option-section button:disabled {
|
| 145 |
+
background: var(--disabled-gradient);
|
| 146 |
+
cursor: not-allowed;
|
| 147 |
+
box-shadow: none;
|
| 148 |
}
|
| 149 |
|
| 150 |
/* Logs Container Styling */
|
| 151 |
#video-logs-container {
|
| 152 |
display: flex;
|
| 153 |
flex-direction: column;
|
| 154 |
+
gap: var(--gap-small); /* Small gap */
|
| 155 |
+
max-height: 150px; /* Fixed height to prevent infinite expansion */
|
| 156 |
+
overflow: hidden; /* Hide overflow to maintain layout */
|
| 157 |
}
|
| 158 |
|
| 159 |
+
/* Logs Content Styling */
|
| 160 |
#video-logs {
|
| 161 |
flex: 1;
|
| 162 |
+
max-height: 200px; /* Adjust based on container height */
|
| 163 |
border: 1px solid #e0e0e0;
|
| 164 |
+
border-radius: var(--border-radius);
|
| 165 |
overflow-y: auto; /* Enable vertical scrolling */
|
| 166 |
padding: 10px;
|
| 167 |
background-color: #f9f9f9;
|
| 168 |
+
font-size: var(--font-size-small);
|
| 169 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 170 |
}
|
| 171 |
|
| 172 |
+
/* Clear Logs Button Styling */
|
| 173 |
#video-clear-logs {
|
| 174 |
align-self: flex-end;
|
| 175 |
+
background: var(--secondary-gradient);
|
| 176 |
border: none;
|
| 177 |
color: white;
|
| 178 |
+
padding: 6px 12px; /* Reduced padding */
|
| 179 |
+
font-size: 0.85em; /* Reduced font size */
|
| 180 |
cursor: pointer;
|
| 181 |
border-radius: 8px;
|
| 182 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
|
|
| 184 |
}
|
| 185 |
|
| 186 |
#video-clear-logs:hover {
|
| 187 |
+
background: var(--secondary-hover-gradient);
|
| 188 |
+
transform: scale(1.01); /* Less scaling */
|
| 189 |
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
/* Search Logs Input Styling (Optional) */
|
| 193 |
+
#video-log-search {
|
| 194 |
+
padding: 6px 10px; /* Reduced padding */
|
| 195 |
+
border: 1px solid var(--border-color);
|
| 196 |
+
border-radius: 8px;
|
| 197 |
+
font-size: 0.85em; /* Reduced font size */
|
| 198 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
#video-log-search:focus {
|
| 202 |
+
border-color: var(--primary-color);
|
| 203 |
+
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 204 |
+
outline: none;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
/* Main Content Wrapper for Chat and Image Upload */
|
| 208 |
+
.video-main {
|
| 209 |
+
display: flex;
|
| 210 |
+
flex-direction: row; /* Arrange chat and image sections horizontally */
|
| 211 |
+
gap: var(--gap-large); /* Increased gap for better separation */
|
| 212 |
+
width: 100%;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
/* Chat Window Styling */
|
| 216 |
+
.chat-window {
|
| 217 |
+
flex: 3; /* Takes up more space */
|
| 218 |
+
display: flex;
|
| 219 |
+
flex-direction: column;
|
| 220 |
+
gap: var(--gap);
|
| 221 |
+
/* Optionally, adjust height if needed */
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
/* Image Upload and Canvas Section Styling */
|
| 225 |
+
.video-image-section {
|
| 226 |
+
flex: 1; /* Takes up less space */
|
| 227 |
+
display: flex;
|
| 228 |
+
flex-direction: column;
|
| 229 |
+
gap: var(--gap);
|
| 230 |
+
background-color: var(--background-color);
|
| 231 |
+
padding: var(--padding-small);
|
| 232 |
+
border-radius: var(--border-radius);
|
| 233 |
+
box-shadow: var(--box-shadow-base);
|
| 234 |
+
transition: background 0.3s, box-shadow 0.3s;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.video-image-section h3 {
|
| 238 |
+
margin-bottom: 10px;
|
| 239 |
+
color: var(--primary-color);
|
| 240 |
+
font-size: 1.1em;
|
| 241 |
+
font-weight: 600;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
#video-image-upload {
|
| 245 |
+
padding: 8px 12px; /* Reduced padding */
|
| 246 |
+
border: 1px solid var(--border-color);
|
| 247 |
+
border-radius: 8px;
|
| 248 |
+
font-size: var(--font-size-base);
|
| 249 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
#video-image-upload:hover {
|
| 253 |
+
border-color: var(--primary-color);
|
| 254 |
+
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
#video-image-canvas {
|
| 258 |
+
width: 100%;
|
| 259 |
+
height: auto;
|
| 260 |
+
border: 1px solid #e0e0e0;
|
| 261 |
+
border-radius: var(--border-radius);
|
| 262 |
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 263 |
+
background-color: #f9f9f9;
|
| 264 |
}
|
| 265 |
|
| 266 |
/* Chat Box Styling */
|
| 267 |
#video-chat-box {
|
| 268 |
height: 500px;
|
| 269 |
border: 1px solid #e0e0e0;
|
| 270 |
+
border-radius: var(--border-radius);
|
| 271 |
overflow-y: auto;
|
| 272 |
+
padding: 15px; /* Reduced padding */
|
| 273 |
+
background-color: var(--background-color);
|
| 274 |
position: relative;
|
| 275 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 276 |
+
margin-bottom: 15px; /* Reduced margin */
|
| 277 |
}
|
| 278 |
|
| 279 |
/* Message Styling */
|
| 280 |
#video .message-container {
|
| 281 |
+
margin-bottom: 15px; /* Reduced margin */
|
| 282 |
display: flex;
|
| 283 |
}
|
| 284 |
|
| 285 |
#video .message {
|
| 286 |
+
padding: 10px 14px; /* Reduced padding */
|
| 287 |
+
border-radius: 18px; /* Slightly smaller border radius */
|
| 288 |
max-width: 75%;
|
| 289 |
position: relative;
|
| 290 |
word-wrap: break-word;
|
| 291 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 292 |
+
font-size: var(--font-size-base);
|
| 293 |
line-height: 1.4;
|
| 294 |
background-color: #f1f8e9;
|
| 295 |
transition: background-color 0.3s, box-shadow 0.3s;
|
|
|
|
| 308 |
/* Chat Input Container Styling */
|
| 309 |
#video-text-input-container {
|
| 310 |
display: flex;
|
| 311 |
+
gap: 8px; /* Reduced gap */
|
| 312 |
}
|
| 313 |
|
| 314 |
#video-text-input {
|
| 315 |
flex: 1;
|
| 316 |
+
padding: 8px 12px; /* Reduced padding */
|
| 317 |
+
border: 1px solid var(--border-color);
|
| 318 |
border-radius: 8px;
|
| 319 |
+
font-size: var(--font-size-base);
|
| 320 |
+
background-color: var(--background-color);
|
| 321 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 322 |
}
|
| 323 |
|
| 324 |
#video-text-input:focus {
|
| 325 |
+
border-color: var(--primary-color);
|
| 326 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 327 |
outline: none;
|
| 328 |
}
|
| 329 |
|
| 330 |
#video-submit-button {
|
| 331 |
+
background: var(--primary-gradient);
|
| 332 |
border: none;
|
| 333 |
color: white;
|
| 334 |
+
padding: 8px 16px; /* Reduced padding */
|
| 335 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 336 |
border-radius: 8px;
|
| 337 |
cursor: pointer;
|
| 338 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
|
|
| 340 |
}
|
| 341 |
|
| 342 |
#video-submit-button:hover:not(:disabled) {
|
| 343 |
+
background: var(--primary-hover-gradient);
|
| 344 |
+
transform: translateY(-1px); /* Less translate */
|
| 345 |
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
|
| 346 |
}
|
| 347 |
|
| 348 |
#video-submit-button:disabled {
|
| 349 |
+
background: var(--disabled-gradient);
|
| 350 |
cursor: not-allowed;
|
| 351 |
box-shadow: none;
|
| 352 |
}
|
|
|
|
| 355 |
#video-mic-container {
|
| 356 |
display: flex;
|
| 357 |
justify-content: center;
|
| 358 |
+
gap: 10px; /* Reduced gap */
|
| 359 |
+
margin-top: 15px; /* Reduced margin */
|
| 360 |
}
|
| 361 |
|
| 362 |
#video-start_button,
|
| 363 |
#video-stop_button {
|
| 364 |
+
background: var(--primary-gradient);
|
| 365 |
border: none;
|
| 366 |
color: white;
|
| 367 |
+
padding: 12px; /* Reduced padding */
|
| 368 |
border-radius: 50%;
|
| 369 |
cursor: pointer;
|
| 370 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 371 |
+
width: 50px; /* Reduced size */
|
| 372 |
+
height: 50px; /* Reduced size */
|
| 373 |
display: flex;
|
| 374 |
justify-content: center;
|
| 375 |
align-items: center;
|
|
|
|
| 379 |
}
|
| 380 |
|
| 381 |
#video-stop_button {
|
| 382 |
+
background: var(--secondary-gradient);
|
| 383 |
}
|
| 384 |
|
| 385 |
#video-start_button::before,
|
|
|
|
| 403 |
|
| 404 |
#video-start_button:disabled,
|
| 405 |
#video-stop_button:disabled {
|
| 406 |
+
background: var(--disabled-gradient);
|
| 407 |
cursor: not-allowed;
|
| 408 |
box-shadow: none;
|
| 409 |
}
|
| 410 |
|
| 411 |
#video-start_button:hover:not(:disabled),
|
| 412 |
#video-stop_button:hover:not(:disabled) {
|
| 413 |
+
transform: scale(1.03); /* Slightly less scaling */
|
| 414 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| 415 |
}
|
| 416 |
|
| 417 |
#video-stop_button:hover:not(:disabled) {
|
| 418 |
+
background: var(--secondary-hover-gradient);
|
| 419 |
}
|
| 420 |
|
| 421 |
/* Icon Styling */
|
| 422 |
#video .mic-icon,
|
| 423 |
#video .stop-icon {
|
| 424 |
+
width: 24px; /* Reduced size */
|
| 425 |
+
height: 24px; /* Reduced size */
|
| 426 |
transition: transform 0.3s;
|
| 427 |
fill: #ffffff;
|
| 428 |
}
|
|
|
|
| 446 |
|
| 447 |
/* Chat Stats */
|
| 448 |
#video-chat-stats {
|
| 449 |
+
font-size: var(--font-size-small);
|
| 450 |
color: #555555;
|
| 451 |
text-align: center;
|
| 452 |
margin-top: 10px;
|
|
|
|
| 457 |
display: none;
|
| 458 |
}
|
| 459 |
|
| 460 |
+
/* Scrollbar Styling for Logs */
|
| 461 |
#video-chat-box::-webkit-scrollbar,
|
| 462 |
#video-logs::-webkit-scrollbar {
|
| 463 |
width: 8px;
|
|
|
|
| 480 |
background: #a8a8a8;
|
| 481 |
}
|
| 482 |
|
| 483 |
+
/* Initialize Button Styling */
|
| 484 |
#video-download {
|
| 485 |
+
background: var(--primary-gradient);
|
|
|
|
| 486 |
border: none;
|
| 487 |
color: white;
|
| 488 |
+
padding: 8px 16px; /* Reduced padding */
|
| 489 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 490 |
border-radius: 8px;
|
| 491 |
cursor: pointer;
|
| 492 |
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
|
|
|
| 494 |
}
|
| 495 |
|
| 496 |
#video-download:hover:not(:disabled) {
|
| 497 |
+
background: var(--primary-hover-gradient);
|
| 498 |
+
transform: translateY(-1px); /* Less translate */
|
| 499 |
+
box-shadow: var(--box-shadow-hover);
|
| 500 |
}
|
| 501 |
|
| 502 |
#video-download:disabled {
|
| 503 |
+
background: var(--disabled-gradient);
|
| 504 |
cursor: not-allowed;
|
| 505 |
box-shadow: none;
|
| 506 |
}
|
|
|
|
| 508 |
/* Configuration Info Styling */
|
| 509 |
#video-configuration {
|
| 510 |
margin-top: 15px;
|
| 511 |
+
font-size: var(--font-size-small);
|
| 512 |
color: #555555;
|
| 513 |
}
|
| 514 |
|
| 515 |
/* Responsive Grid Adjustments */
|
| 516 |
+
@media (max-width: 1200px) {
|
| 517 |
+
.video-main {
|
| 518 |
+
flex-direction: column; /* Stack chat and image sections vertically on medium screens */
|
| 519 |
+
gap: var(--gap);
|
| 520 |
+
}
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
@media (max-width: 800px) {
|
| 524 |
.video-card {
|
| 525 |
flex-direction: column;
|
| 526 |
+
padding: 20px;
|
| 527 |
+
margin: 20px auto;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
.video-options {
|
| 531 |
+
gap: var(--gap-compact);
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
.video-main {
|
| 535 |
+
flex-direction: column; /* Stack chat and image sections vertically on small screens */
|
| 536 |
+
gap: var(--gap-compact);
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
.video-image-section {
|
| 540 |
+
width: 100%;
|
| 541 |
}
|
| 542 |
|
| 543 |
/* Adjust Logs Container Height for Smaller Screens */
|
|
|
|
| 548 |
#video-logs {
|
| 549 |
max-height: 150px;
|
| 550 |
}
|
|
|
|
| 551 |
|
| 552 |
+
/* Adjust Image Section for Smaller Screens */
|
| 553 |
+
.video-image-section {
|
| 554 |
+
width: 100%;
|
| 555 |
+
}
|
| 556 |
+
}
|
| 557 |
|
| 558 |
+
/* Image Upload and Canvas Section Styling */
|
| 559 |
.video-image-section {
|
| 560 |
+
flex: 1; /* Takes up less space */
|
| 561 |
display: flex;
|
| 562 |
flex-direction: column;
|
| 563 |
+
gap: var(--gap);
|
| 564 |
+
background-color: var(--background-color);
|
| 565 |
+
padding: var(--padding-small);
|
| 566 |
+
border-radius: var(--border-radius);
|
| 567 |
+
box-shadow: var(--box-shadow-base);
|
| 568 |
transition: background 0.3s, box-shadow 0.3s;
|
| 569 |
}
|
| 570 |
|
| 571 |
.video-image-section h3 {
|
| 572 |
margin-bottom: 10px;
|
| 573 |
+
color: var(--primary-color);
|
| 574 |
+
font-size: 1.1em;
|
| 575 |
+
font-weight: 600;
|
| 576 |
}
|
| 577 |
|
| 578 |
#video-image-upload {
|
| 579 |
+
padding: 8px 12px; /* Reduced padding */
|
| 580 |
+
border: 1px solid var(--border-color);
|
| 581 |
border-radius: 8px;
|
| 582 |
+
font-size: var(--font-size-base);
|
| 583 |
transition: border-color 0.3s, box-shadow 0.3s;
|
| 584 |
}
|
| 585 |
|
| 586 |
#video-image-upload:hover {
|
| 587 |
+
border-color: var(--primary-color);
|
| 588 |
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 589 |
}
|
| 590 |
|
|
|
|
| 592 |
width: 100%;
|
| 593 |
height: auto;
|
| 594 |
border: 1px solid #e0e0e0;
|
| 595 |
+
border-radius: var(--border-radius);
|
| 596 |
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 597 |
background-color: #f9f9f9;
|
| 598 |
}
|
| 599 |
|
| 600 |
+
/* Chat Box Styling */
|
| 601 |
+
#video-chat-box {
|
| 602 |
+
height: 500px;
|
| 603 |
+
border: 1px solid #e0e0e0;
|
| 604 |
+
border-radius: var(--border-radius);
|
| 605 |
+
overflow-y: auto;
|
| 606 |
+
padding: 15px; /* Reduced padding */
|
| 607 |
+
background-color: var(--background-color);
|
| 608 |
+
position: relative;
|
| 609 |
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 610 |
+
margin-bottom: 15px; /* Reduced margin */
|
| 611 |
+
}
|
| 612 |
+
|
| 613 |
+
/* Message Styling */
|
| 614 |
+
#video .message-container {
|
| 615 |
+
margin-bottom: 15px; /* Reduced margin */
|
| 616 |
+
display: flex;
|
| 617 |
+
}
|
| 618 |
+
|
| 619 |
+
#video .message {
|
| 620 |
+
padding: 10px 14px; /* Reduced padding */
|
| 621 |
+
border-radius: 18px; /* Slightly smaller border radius */
|
| 622 |
+
max-width: 75%;
|
| 623 |
+
position: relative;
|
| 624 |
+
word-wrap: break-word;
|
| 625 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 626 |
+
font-size: var(--font-size-base);
|
| 627 |
+
line-height: 1.4;
|
| 628 |
+
background-color: #f1f8e9;
|
| 629 |
+
transition: background-color 0.3s, box-shadow 0.3s;
|
| 630 |
+
}
|
| 631 |
+
|
| 632 |
+
#video .user .message {
|
| 633 |
+
background: #DCF8C6;
|
| 634 |
+
border-bottom-right-radius: 0;
|
| 635 |
+
}
|
| 636 |
+
|
| 637 |
+
#video .assistant .message {
|
| 638 |
+
background: #e3f2fd;
|
| 639 |
+
border-bottom-left-radius: 0;
|
| 640 |
+
}
|
| 641 |
+
|
| 642 |
+
/* Chat Input Container Styling */
|
| 643 |
+
#video-text-input-container {
|
| 644 |
+
display: flex;
|
| 645 |
+
gap: 8px; /* Reduced gap */
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
#video-text-input {
|
| 649 |
+
flex: 1;
|
| 650 |
+
padding: 8px 12px; /* Reduced padding */
|
| 651 |
+
border: 1px solid var(--border-color);
|
| 652 |
+
border-radius: 8px;
|
| 653 |
+
font-size: var(--font-size-base);
|
| 654 |
+
background-color: var(--background-color);
|
| 655 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
| 656 |
+
}
|
| 657 |
+
|
| 658 |
+
#video-text-input:focus {
|
| 659 |
+
border-color: var(--primary-color);
|
| 660 |
+
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 661 |
+
outline: none;
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
#video-submit-button {
|
| 665 |
+
background: var(--primary-gradient);
|
| 666 |
+
border: none;
|
| 667 |
+
color: white;
|
| 668 |
+
padding: 8px 16px; /* Reduced padding */
|
| 669 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 670 |
+
border-radius: 8px;
|
| 671 |
+
cursor: pointer;
|
| 672 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 673 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
#video-submit-button:hover:not(:disabled) {
|
| 677 |
+
background: var(--primary-hover-gradient);
|
| 678 |
+
transform: translateY(-1px); /* Less translate */
|
| 679 |
+
box-shadow: var(--box-shadow-hover);
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
#video-submit-button:disabled {
|
| 683 |
+
background: var(--disabled-gradient);
|
| 684 |
+
cursor: not-allowed;
|
| 685 |
+
box-shadow: none;
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
/* Microphone and Stop Buttons Styling */
|
| 689 |
+
#video-mic-container {
|
| 690 |
+
display: flex;
|
| 691 |
+
justify-content: center;
|
| 692 |
+
gap: 10px; /* Reduced gap */
|
| 693 |
+
margin-top: 15px; /* Reduced margin */
|
| 694 |
+
}
|
| 695 |
+
|
| 696 |
+
#video-start_button,
|
| 697 |
+
#video-stop_button {
|
| 698 |
+
background: var(--primary-gradient);
|
| 699 |
+
border: none;
|
| 700 |
+
color: white;
|
| 701 |
+
padding: 12px; /* Reduced padding */
|
| 702 |
+
border-radius: 50%;
|
| 703 |
+
cursor: pointer;
|
| 704 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 705 |
+
width: 50px; /* Reduced size */
|
| 706 |
+
height: 50px; /* Reduced size */
|
| 707 |
+
display: flex;
|
| 708 |
+
justify-content: center;
|
| 709 |
+
align-items: center;
|
| 710 |
+
position: relative;
|
| 711 |
+
overflow: hidden;
|
| 712 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
| 713 |
+
}
|
| 714 |
+
|
| 715 |
+
#video-stop_button {
|
| 716 |
+
background: var(--secondary-gradient);
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
#video-start_button::before,
|
| 720 |
+
#video-stop_button::before {
|
| 721 |
+
content: '';
|
| 722 |
+
position: absolute;
|
| 723 |
+
width: 200%;
|
| 724 |
+
height: 200%;
|
| 725 |
+
background: rgba(255, 255, 255, 0.3);
|
| 726 |
+
top: 50%;
|
| 727 |
+
left: 50%;
|
| 728 |
+
transform: translate(-50%, -50%) scale(0);
|
| 729 |
+
border-radius: 50%;
|
| 730 |
+
transition: transform 0.5s ease-out;
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
#video-start_button:active::before,
|
| 734 |
+
#video-stop_button:active::before {
|
| 735 |
+
transform: translate(-50%, -50%) scale(1);
|
| 736 |
+
}
|
| 737 |
+
|
| 738 |
+
#video-start_button:disabled,
|
| 739 |
+
#video-stop_button:disabled {
|
| 740 |
+
background: var(--disabled-gradient);
|
| 741 |
+
cursor: not-allowed;
|
| 742 |
+
box-shadow: none;
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
#video-start_button:hover:not(:disabled),
|
| 746 |
+
#video-stop_button:hover:not(:disabled) {
|
| 747 |
+
transform: scale(1.03); /* Slightly less scaling */
|
| 748 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| 749 |
+
}
|
| 750 |
+
|
| 751 |
+
#video-stop_button:hover:not(:disabled) {
|
| 752 |
+
background: var(--secondary-hover-gradient);
|
| 753 |
+
}
|
| 754 |
+
|
| 755 |
+
/* Icon Styling */
|
| 756 |
+
#video .mic-icon,
|
| 757 |
+
#video .stop-icon {
|
| 758 |
+
width: 24px; /* Reduced size */
|
| 759 |
+
height: 24px; /* Reduced size */
|
| 760 |
+
transition: transform 0.3s;
|
| 761 |
+
fill: #ffffff;
|
| 762 |
+
}
|
| 763 |
+
|
| 764 |
+
/* Animation for Mic Icon */
|
| 765 |
+
#video .mic-animate {
|
| 766 |
+
animation: pulse 2s infinite;
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
@keyframes pulse {
|
| 770 |
+
0% {
|
| 771 |
+
transform: scale(1);
|
| 772 |
+
}
|
| 773 |
+
50% {
|
| 774 |
+
transform: scale(1.2);
|
| 775 |
+
}
|
| 776 |
+
100% {
|
| 777 |
+
transform: scale(1);
|
| 778 |
+
}
|
| 779 |
+
}
|
| 780 |
+
|
| 781 |
+
/* Chat Stats */
|
| 782 |
+
#video-chat-stats {
|
| 783 |
+
font-size: var(--font-size-small);
|
| 784 |
+
color: #555555;
|
| 785 |
+
text-align: center;
|
| 786 |
+
margin-top: 10px;
|
| 787 |
+
}
|
| 788 |
+
|
| 789 |
+
/* Hidden Class */
|
| 790 |
+
#video .hidden {
|
| 791 |
+
display: none;
|
| 792 |
+
}
|
| 793 |
+
|
| 794 |
+
/* Scrollbar Styling for Logs */
|
| 795 |
+
#video-chat-box::-webkit-scrollbar,
|
| 796 |
+
#video-logs::-webkit-scrollbar {
|
| 797 |
+
width: 8px;
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
#video-chat-box::-webkit-scrollbar-track,
|
| 801 |
+
#video-logs::-webkit-scrollbar-track {
|
| 802 |
+
background: #f1f1f1;
|
| 803 |
+
border-radius: 4px;
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
#video-chat-box::-webkit-scrollbar-thumb,
|
| 807 |
+
#video-logs::-webkit-scrollbar-thumb {
|
| 808 |
+
background: #cccccc;
|
| 809 |
+
border-radius: 4px;
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
#video-chat-box::-webkit-scrollbar-thumb:hover,
|
| 813 |
+
#video-logs::-webkit-scrollbar-thumb:hover {
|
| 814 |
+
background: #a8a8a8;
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
/* Initialize Button Styling */
|
| 818 |
+
#video-download {
|
| 819 |
+
background: var(--primary-gradient);
|
| 820 |
+
border: none;
|
| 821 |
+
color: white;
|
| 822 |
+
padding: 8px 16px; /* Reduced padding */
|
| 823 |
+
font-size: 0.95em; /* Slightly reduced font size */
|
| 824 |
+
border-radius: 8px;
|
| 825 |
+
cursor: pointer;
|
| 826 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 827 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 828 |
+
}
|
| 829 |
+
|
| 830 |
+
#video-download:hover:not(:disabled) {
|
| 831 |
+
background: var(--primary-hover-gradient);
|
| 832 |
+
transform: translateY(-1px); /* Less translate */
|
| 833 |
+
box-shadow: var(--box-shadow-hover);
|
| 834 |
+
}
|
| 835 |
+
|
| 836 |
+
#video-download:disabled {
|
| 837 |
+
background: var(--disabled-gradient);
|
| 838 |
+
cursor: not-allowed;
|
| 839 |
+
box-shadow: none;
|
| 840 |
+
}
|
| 841 |
+
|
| 842 |
+
/* Configuration Info Styling */
|
| 843 |
+
#video-configuration {
|
| 844 |
+
margin-top: 15px;
|
| 845 |
+
font-size: var(--font-size-small);
|
| 846 |
+
color: #555555;
|
| 847 |
+
}
|
| 848 |
+
|
| 849 |
+
/* Responsive Grid Adjustments */
|
| 850 |
+
@media (max-width: 1200px) {
|
| 851 |
+
.video-main {
|
| 852 |
+
flex-direction: column; /* Stack chat and image sections vertically on medium screens */
|
| 853 |
+
gap: var(--gap);
|
| 854 |
+
}
|
| 855 |
+
}
|
| 856 |
+
|
| 857 |
@media (max-width: 800px) {
|
| 858 |
.video-card {
|
| 859 |
flex-direction: column;
|
| 860 |
+
padding: 20px;
|
| 861 |
+
margin: 20px auto;
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
+
.video-options {
|
| 865 |
+
gap: var(--gap-compact);
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
.video-main {
|
| 869 |
+
flex-direction: column; /* Stack chat and image sections vertically on small screens */
|
| 870 |
+
gap: var(--gap-compact);
|
| 871 |
+
}
|
| 872 |
+
|
| 873 |
+
.video-image-section {
|
| 874 |
+
width: 100%;
|
| 875 |
+
}
|
| 876 |
+
|
| 877 |
+
/* Adjust Logs Container Height for Smaller Screens */
|
| 878 |
+
#video-logs-container {
|
| 879 |
+
max-height: 200px;
|
| 880 |
+
}
|
| 881 |
+
|
| 882 |
+
#video-logs {
|
| 883 |
+
max-height: 150px;
|
| 884 |
}
|
| 885 |
|
| 886 |
/* Adjust Image Section for Smaller Screens */
|
|
|
|
| 888 |
width: 100%;
|
| 889 |
}
|
| 890 |
}
|
| 891 |
+
|
| 892 |
+
/* Image Upload and Canvas Section Styling */
|
| 893 |
+
.video-image-section {
|
| 894 |
+
flex: 1; /* Takes up less space */
|
| 895 |
+
display: flex;
|
| 896 |
+
flex-direction: column;
|
| 897 |
+
gap: var(--gap);
|
| 898 |
+
background-color: var(--background-color);
|
| 899 |
+
padding: var(--padding-small);
|
| 900 |
+
border-radius: var(--border-radius);
|
| 901 |
+
box-shadow: var(--box-shadow-base);
|
| 902 |
+
transition: background 0.3s, box-shadow 0.3s;
|
| 903 |
+
}
|
| 904 |
+
|
| 905 |
+
.video-image-section h3 {
|
| 906 |
+
margin-bottom: 10px;
|
| 907 |
+
color: var(--primary-color);
|
| 908 |
+
font-size: 1.1em;
|
| 909 |
+
font-weight: 600;
|
| 910 |
+
}
|
| 911 |
+
|
| 912 |
+
#video-image-upload {
|
| 913 |
+
padding: 8px 12px; /* Reduced padding */
|
| 914 |
+
border: 1px solid var(--border-color);
|
| 915 |
+
border-radius: 8px;
|
| 916 |
+
font-size: var(--font-size-base);
|
| 917 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
#video-image-upload:hover {
|
| 921 |
+
border-color: var(--primary-color);
|
| 922 |
+
box-shadow: 0 0 5px rgba(0, 121, 107, 0.5);
|
| 923 |
+
}
|
| 924 |
+
|
| 925 |
+
#video-image-canvas {
|
| 926 |
+
width: 100%;
|
| 927 |
+
height: auto;
|
| 928 |
+
border: 1px solid #e0e0e0;
|
| 929 |
+
border-radius: var(--border-radius);
|
| 930 |
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 931 |
+
background-color: #f9f9f9;
|
| 932 |
+
}
|
| 933 |
+
|
| 934 |
+
/* Tab Navigation Styling */
|
| 935 |
+
.image-tabs {
|
| 936 |
+
display: flex;
|
| 937 |
+
gap: 10px;
|
| 938 |
+
margin-bottom: 20px;
|
| 939 |
+
}
|
| 940 |
+
|
| 941 |
+
.tab-button {
|
| 942 |
+
flex: 1;
|
| 943 |
+
padding: 10px 0;
|
| 944 |
+
background-color: var(--background-color);
|
| 945 |
+
border: 1px solid var(--border-color);
|
| 946 |
+
border-bottom: none;
|
| 947 |
+
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
| 948 |
+
cursor: pointer;
|
| 949 |
+
font-size: var(--font-size-base);
|
| 950 |
+
transition: background-color 0.3s, box-shadow 0.3s;
|
| 951 |
+
}
|
| 952 |
+
|
| 953 |
+
.tab-button.active {
|
| 954 |
+
background-color: var(--hover-background-color);
|
| 955 |
+
box-shadow: 0 2px -2px var(--border-color);
|
| 956 |
+
}
|
| 957 |
+
|
| 958 |
+
.tab-button:hover:not(.active) {
|
| 959 |
+
background-color: var(--hover-background-color);
|
| 960 |
+
}
|
| 961 |
+
|
| 962 |
+
/* Tab Content Styling */
|
| 963 |
+
.tab-content {
|
| 964 |
+
border: 1px solid var(--border-color);
|
| 965 |
+
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
| 966 |
+
padding: var(--padding-small);
|
| 967 |
+
background-color: var(--background-color);
|
| 968 |
+
box-shadow: var(--box-shadow-base);
|
| 969 |
+
}
|
| 970 |
+
|
| 971 |
+
.hidden {
|
| 972 |
+
display: none;
|
| 973 |
+
}
|
| 974 |
+
|
| 975 |
+
/* Webcam Section Styling */
|
| 976 |
+
.webcam-tab video,
|
| 977 |
+
.webcam-tab canvas {
|
| 978 |
+
width: 100%;
|
| 979 |
+
max-width: 500px;
|
| 980 |
+
border: 1px solid #e0e0e0;
|
| 981 |
+
border-radius: var(--border-radius);
|
| 982 |
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
|
| 983 |
+
}
|
| 984 |
+
|
| 985 |
+
#capture-webcam-button {
|
| 986 |
+
margin-top: 10px;
|
| 987 |
+
padding: 8px 16px;
|
| 988 |
+
background: var(--primary-gradient);
|
| 989 |
+
border: none;
|
| 990 |
+
color: white;
|
| 991 |
+
border-radius: 8px;
|
| 992 |
+
cursor: pointer;
|
| 993 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 994 |
+
}
|
| 995 |
+
|
| 996 |
+
#capture-webcam-button:hover {
|
| 997 |
+
background: var(--primary-hover-gradient);
|
| 998 |
+
transform: translateY(-1px);
|
| 999 |
+
box-shadow: var(--box-shadow-hover);
|
| 1000 |
+
}
|
| 1001 |
+
|
| 1002 |
+
/* Drawing Section Styling */
|
| 1003 |
+
.draw-tab canvas {
|
| 1004 |
+
width: 100%;
|
| 1005 |
+
height: 400px;
|
| 1006 |
+
border: 1px solid #e0e0e0;
|
| 1007 |
+
border-radius: var(--border-radius);
|
| 1008 |
+
background-color: #ffffff; /* White background for drawing */
|
| 1009 |
+
cursor: crosshair;
|
| 1010 |
+
}
|
| 1011 |
+
|
| 1012 |
+
.draw-controls {
|
| 1013 |
+
display: flex;
|
| 1014 |
+
align-items: center;
|
| 1015 |
+
gap: 10px;
|
| 1016 |
+
margin-top: 10px;
|
| 1017 |
+
}
|
| 1018 |
+
|
| 1019 |
+
#clear-draw-button {
|
| 1020 |
+
padding: 6px 12px;
|
| 1021 |
+
background: var(--secondary-gradient);
|
| 1022 |
+
border: none;
|
| 1023 |
+
color: white;
|
| 1024 |
+
border-radius: 8px;
|
| 1025 |
+
cursor: pointer;
|
| 1026 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 1027 |
+
}
|
| 1028 |
+
|
| 1029 |
+
#clear-draw-button:hover {
|
| 1030 |
+
background: var(--secondary-hover-gradient);
|
| 1031 |
+
transform: translateY(-1px);
|
| 1032 |
+
box-shadow: var(--box-shadow-hover);
|
| 1033 |
+
}
|
| 1034 |
+
|
| 1035 |
+
#draw-color,
|
| 1036 |
+
#draw-size {
|
| 1037 |
+
padding: 4px;
|
| 1038 |
+
border: 1px solid var(--border-color);
|
| 1039 |
+
border-radius: 8px;
|
| 1040 |
+
}
|
digital.human.video.js
CHANGED
|
@@ -644,4 +644,352 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 644 |
reader.readAsDataURL(file);
|
| 645 |
});
|
| 646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 647 |
});
|
|
|
|
| 644 |
reader.readAsDataURL(file);
|
| 645 |
});
|
| 646 |
|
| 647 |
+
|
| 648 |
+
|
| 649 |
+
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
|
| 656 |
+
// ------------------ Additions Start Here ------------------
|
| 657 |
+
|
| 658 |
+
// Function to send image to the API
|
| 659 |
+
function sendImageToAPI(imageB64, onResult, onError) {
|
| 660 |
+
const invokeUrl = "https://integrate.api.nvidia.com/v1/chat/completions";
|
| 661 |
+
const stream = false; // Streaming not supported in browser
|
| 662 |
+
|
| 663 |
+
const headers = {
|
| 664 |
+
"Authorization": "Bearer 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",
|
| 665 |
+
"Accept": "application/json",
|
| 666 |
+
"Content-Type": "application/json"
|
| 667 |
+
};
|
| 668 |
+
|
| 669 |
+
if (imageB64.length > 180000) {
|
| 670 |
+
alert("To upload larger images, use the assets API (see docs)");
|
| 671 |
+
return;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
const payload = {
|
| 675 |
+
"model": "microsoft/phi-3.5-vision-instruct",
|
| 676 |
+
"messages": [
|
| 677 |
+
{
|
| 678 |
+
"role": "user",
|
| 679 |
+
"content": `Describe the image. <img src="data:image/png;base64,${imageB64}" />`
|
| 680 |
+
}
|
| 681 |
+
],
|
| 682 |
+
"max_tokens": 512,
|
| 683 |
+
"temperature": 0.20,
|
| 684 |
+
"top_p": 0.70,
|
| 685 |
+
"stream": stream
|
| 686 |
+
};
|
| 687 |
+
|
| 688 |
+
axios.post(invokeUrl, payload, { headers: headers })
|
| 689 |
+
.then(response => {
|
| 690 |
+
onResult(response.data);
|
| 691 |
+
})
|
| 692 |
+
.catch(error => {
|
| 693 |
+
console.error(error);
|
| 694 |
+
onError(error);
|
| 695 |
+
});
|
| 696 |
+
}
|
| 697 |
+
|
| 698 |
+
// Event listener for Analyze button
|
| 699 |
+
document.getElementById("analyze-button").addEventListener("click", function() {
|
| 700 |
+
const canvas = document.getElementById("video-image-canvas");
|
| 701 |
+
const imageDataURL = canvas.toDataURL("image/png");
|
| 702 |
+
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 703 |
+
|
| 704 |
+
const userMessage = {
|
| 705 |
+
content: "Please analyze this image.",
|
| 706 |
+
role: "user"
|
| 707 |
+
};
|
| 708 |
+
videoAppendMessage(userMessage);
|
| 709 |
+
|
| 710 |
+
sendImageToAPI(imageB64, function(responseData) {
|
| 711 |
+
const assistantMessage = {
|
| 712 |
+
content: responseData.choices[0].message.content,
|
| 713 |
+
role: "assistant"
|
| 714 |
+
};
|
| 715 |
+
videoAppendMessage(assistantMessage);
|
| 716 |
+
}, function(error) {
|
| 717 |
+
alert("Error: " + error);
|
| 718 |
+
});
|
| 719 |
+
});
|
| 720 |
+
|
| 721 |
+
// Event listener for Explain button (Webcam)
|
| 722 |
+
document.getElementById("capture-webcam-button").addEventListener("click", function() {
|
| 723 |
+
const video = document.getElementById("webcam-video");
|
| 724 |
+
const canvas = document.createElement("canvas");
|
| 725 |
+
canvas.width = video.videoWidth;
|
| 726 |
+
canvas.height = video.videoHeight;
|
| 727 |
+
const context = canvas.getContext("2d");
|
| 728 |
+
context.drawImage(video, 0, 0, canvas.width, canvas.height);
|
| 729 |
+
|
| 730 |
+
const imageDataURL = canvas.toDataURL("image/png");
|
| 731 |
+
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 732 |
+
|
| 733 |
+
const userMessage = {
|
| 734 |
+
content: "Please explain this image.",
|
| 735 |
+
role: "user"
|
| 736 |
+
};
|
| 737 |
+
videoAppendMessage(userMessage);
|
| 738 |
+
|
| 739 |
+
sendImageToAPI(imageB64, function(responseData) {
|
| 740 |
+
const assistantMessage = {
|
| 741 |
+
content: responseData.choices[0].message.content,
|
| 742 |
+
role: "assistant"
|
| 743 |
+
};
|
| 744 |
+
videoAppendMessage(assistantMessage);
|
| 745 |
+
}, function(error) {
|
| 746 |
+
alert("Error: " + error);
|
| 747 |
+
});
|
| 748 |
+
});
|
| 749 |
+
|
| 750 |
+
// Event listener for Discuss button (Draw tab)
|
| 751 |
+
document.getElementById("discuss-button").addEventListener("click", function() {
|
| 752 |
+
const canvas = document.getElementById("draw-canvas");
|
| 753 |
+
const imageDataURL = canvas.toDataURL("image/png");
|
| 754 |
+
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 755 |
+
|
| 756 |
+
const userMessage = {
|
| 757 |
+
content: "Please discuss this drawing.",
|
| 758 |
+
role: "user"
|
| 759 |
+
};
|
| 760 |
+
videoAppendMessage(userMessage);
|
| 761 |
+
|
| 762 |
+
sendImageToAPI(imageB64, function(responseData) {
|
| 763 |
+
const assistantMessage = {
|
| 764 |
+
content: responseData.choices[0].message.content,
|
| 765 |
+
role: "assistant"
|
| 766 |
+
};
|
| 767 |
+
videoAppendMessage(assistantMessage);
|
| 768 |
+
}, function(error) {
|
| 769 |
+
alert("Error: " + error);
|
| 770 |
+
});
|
| 771 |
+
});
|
| 772 |
+
|
| 773 |
+
|
| 774 |
+
|
| 775 |
+
|
| 776 |
+
|
| 777 |
+
|
| 778 |
+
|
| 779 |
+
|
| 780 |
+
|
| 781 |
+
|
| 782 |
+
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
|
| 786 |
+
|
| 787 |
+
// Tab Switching Functionality
|
| 788 |
+
const tabButtons = document.querySelectorAll('.image-tabs .tab-button');
|
| 789 |
+
const tabContents = document.querySelectorAll('.video-image-section .tab-content');
|
| 790 |
+
|
| 791 |
+
tabButtons.forEach(button => {
|
| 792 |
+
button.addEventListener('click', () => {
|
| 793 |
+
// Remove active class from all buttons
|
| 794 |
+
tabButtons.forEach(btn => btn.classList.remove('active'));
|
| 795 |
+
// Add active class to the clicked button
|
| 796 |
+
button.classList.add('active');
|
| 797 |
+
|
| 798 |
+
// Hide all tab contents
|
| 799 |
+
tabContents.forEach(content => content.classList.add('hidden'));
|
| 800 |
+
// Show the selected tab content
|
| 801 |
+
const selectedTab = button.getAttribute('data-tab');
|
| 802 |
+
document.querySelector(`.video-image-section .${selectedTab}-tab`).classList.remove('hidden');
|
| 803 |
+
|
| 804 |
+
// Initialize functionalities when their respective tabs are activated
|
| 805 |
+
if (selectedTab === 'webcam') {
|
| 806 |
+
initializeWebcam();
|
| 807 |
+
}
|
| 808 |
+
if (selectedTab === 'draw') {
|
| 809 |
+
initializeDrawing();
|
| 810 |
+
}
|
| 811 |
+
});
|
| 812 |
+
});
|
| 813 |
+
|
| 814 |
+
// ------------------ Webcam Functionality ------------------
|
| 815 |
+
|
| 816 |
+
let webcamStream = null;
|
| 817 |
+
|
| 818 |
+
function initializeWebcam() {
|
| 819 |
+
const video = document.getElementById('webcam-video');
|
| 820 |
+
const captureButton = document.getElementById('capture-webcam-button');
|
| 821 |
+
const canvas = document.getElementById('webcam-canvas');
|
| 822 |
+
|
| 823 |
+
// Check if webcam is already initialized
|
| 824 |
+
if (webcamStream) {
|
| 825 |
+
return;
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
+
// Access the webcam
|
| 829 |
+
navigator.mediaDevices.getUserMedia({ video: true })
|
| 830 |
+
.then(stream => {
|
| 831 |
+
webcamStream = stream;
|
| 832 |
+
video.srcObject = stream;
|
| 833 |
+
logMessage("Webcam access granted.", "system");
|
| 834 |
+
})
|
| 835 |
+
.catch(err => {
|
| 836 |
+
console.error("Error accessing webcam:", err);
|
| 837 |
+
alert("Unable to access the webcam. Please check permissions.");
|
| 838 |
+
logMessage("Webcam access denied or error occurred.", "error");
|
| 839 |
+
});
|
| 840 |
+
|
| 841 |
+
// Capture Image from Webcam
|
| 842 |
+
captureButton.addEventListener('click', () => {
|
| 843 |
+
if (!webcamStream) {
|
| 844 |
+
alert("Webcam not initialized.");
|
| 845 |
+
return;
|
| 846 |
+
}
|
| 847 |
+
const context = canvas.getContext('2d');
|
| 848 |
+
canvas.width = video.videoWidth;
|
| 849 |
+
canvas.height = video.videoHeight;
|
| 850 |
+
context.drawImage(video, 0, 0, canvas.width, canvas.height);
|
| 851 |
+
logMessage("Webcam image captured.", "system");
|
| 852 |
+
});
|
| 853 |
+
}
|
| 854 |
+
|
| 855 |
+
// Function to stop the webcam stream
|
| 856 |
+
function stopWebcam() {
|
| 857 |
+
if (webcamStream) {
|
| 858 |
+
webcamStream.getTracks().forEach(track => track.stop());
|
| 859 |
+
webcamStream = null;
|
| 860 |
+
const videoElement = document.getElementById('webcam-video');
|
| 861 |
+
if (videoElement) videoElement.srcObject = null;
|
| 862 |
+
const canvas = document.getElementById('webcam-canvas');
|
| 863 |
+
if (canvas && canvas.getContext) {
|
| 864 |
+
const ctx = canvas.getContext('2d');
|
| 865 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| 866 |
+
}
|
| 867 |
+
logMessage("Webcam stream stopped.", "system");
|
| 868 |
+
}
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
// Modify the tab switching logic to include webcam cleanup
|
| 872 |
+
tabButtons.forEach(button => {
|
| 873 |
+
button.addEventListener('click', () => {
|
| 874 |
+
// Existing tab switching code...
|
| 875 |
+
// After switching tabs, check if the previous tab was Webcam and stop the stream
|
| 876 |
+
const selectedTab = button.getAttribute('data-tab');
|
| 877 |
+
if (selectedTab !== 'webcam') {
|
| 878 |
+
stopWebcam();
|
| 879 |
+
}
|
| 880 |
+
});
|
| 881 |
+
});
|
| 882 |
+
|
| 883 |
+
// ------------------ Drawing Functionality ------------------
|
| 884 |
+
|
| 885 |
+
let draw = false;
|
| 886 |
+
let currentColor = '#000000';
|
| 887 |
+
let currentSize = 2;
|
| 888 |
+
let ctxDraw = null;
|
| 889 |
+
let lastX = 0;
|
| 890 |
+
let lastY = 0;
|
| 891 |
+
|
| 892 |
+
function initializeDrawing() {
|
| 893 |
+
const canvas = document.getElementById('draw-canvas');
|
| 894 |
+
const colorPicker = document.getElementById('draw-color');
|
| 895 |
+
const sizePicker = document.getElementById('draw-size');
|
| 896 |
+
const clearButton = document.getElementById('clear-draw-button');
|
| 897 |
+
|
| 898 |
+
if (ctxDraw) {
|
| 899 |
+
return; // Drawing already initialized
|
| 900 |
+
}
|
| 901 |
+
|
| 902 |
+
ctxDraw = canvas.getContext('2d');
|
| 903 |
+
canvas.width = canvas.offsetWidth;
|
| 904 |
+
canvas.height = 400; // Fixed height
|
| 905 |
+
|
| 906 |
+
// Set initial styles
|
| 907 |
+
ctxDraw.strokeStyle = currentColor;
|
| 908 |
+
ctxDraw.lineWidth = currentSize;
|
| 909 |
+
ctxDraw.lineJoin = 'round';
|
| 910 |
+
ctxDraw.lineCap = 'round';
|
| 911 |
+
|
| 912 |
+
// Mouse Events
|
| 913 |
+
canvas.addEventListener('mousedown', (e) => {
|
| 914 |
+
draw = true;
|
| 915 |
+
[lastX, lastY] = [e.offsetX, e.offsetY];
|
| 916 |
+
});
|
| 917 |
+
|
| 918 |
+
canvas.addEventListener('mousemove', drawLine);
|
| 919 |
+
canvas.addEventListener('mouseup', () => draw = false);
|
| 920 |
+
canvas.addEventListener('mouseout', () => draw = false);
|
| 921 |
+
|
| 922 |
+
// Touch Events for mobile support
|
| 923 |
+
canvas.addEventListener('touchstart', (e) => {
|
| 924 |
+
e.preventDefault();
|
| 925 |
+
if (e.touches.length === 1) {
|
| 926 |
+
const touch = e.touches[0];
|
| 927 |
+
const rect = canvas.getBoundingClientRect();
|
| 928 |
+
lastX = touch.clientX - rect.left;
|
| 929 |
+
lastY = touch.clientY - rect.top;
|
| 930 |
+
draw = true;
|
| 931 |
+
}
|
| 932 |
+
});
|
| 933 |
+
|
| 934 |
+
canvas.addEventListener('touchmove', (e) => {
|
| 935 |
+
e.preventDefault();
|
| 936 |
+
if (draw && e.touches.length === 1) {
|
| 937 |
+
const touch = e.touches[0];
|
| 938 |
+
const rect = canvas.getBoundingClientRect();
|
| 939 |
+
const x = touch.clientX - rect.left;
|
| 940 |
+
const y = touch.clientY - rect.top;
|
| 941 |
+
drawLine({ offsetX: x, offsetY: y });
|
| 942 |
+
}
|
| 943 |
+
});
|
| 944 |
+
|
| 945 |
+
canvas.addEventListener('touchend', () => draw = false);
|
| 946 |
+
|
| 947 |
+
// Color Picker
|
| 948 |
+
colorPicker.addEventListener('input', (e) => {
|
| 949 |
+
currentColor = e.target.value;
|
| 950 |
+
ctxDraw.strokeStyle = currentColor;
|
| 951 |
+
logMessage(`Drawing color changed to: ${currentColor}`, "system");
|
| 952 |
+
});
|
| 953 |
+
|
| 954 |
+
// Size Picker
|
| 955 |
+
sizePicker.addEventListener('input', (e) => {
|
| 956 |
+
currentSize = e.target.value;
|
| 957 |
+
ctxDraw.lineWidth = currentSize;
|
| 958 |
+
logMessage(`Brush size changed to: ${currentSize}`, "system");
|
| 959 |
+
});
|
| 960 |
+
|
| 961 |
+
// Clear Drawing
|
| 962 |
+
clearButton.addEventListener('click', () => {
|
| 963 |
+
ctxDraw.clearRect(0, 0, canvas.width, canvas.height);
|
| 964 |
+
logMessage("Drawing canvas cleared.", "system");
|
| 965 |
+
});
|
| 966 |
+
}
|
| 967 |
+
|
| 968 |
+
function drawLine(e) {
|
| 969 |
+
if (!draw) return;
|
| 970 |
+
ctxDraw.beginPath();
|
| 971 |
+
ctxDraw.moveTo(lastX, lastY);
|
| 972 |
+
ctxDraw.lineTo(e.offsetX, e.offsetY);
|
| 973 |
+
ctxDraw.stroke();
|
| 974 |
+
[lastX, lastY] = [e.offsetX, e.offsetY];
|
| 975 |
+
}
|
| 976 |
+
|
| 977 |
+
// Adjust canvas size on window resize
|
| 978 |
+
window.addEventListener('resize', () => {
|
| 979 |
+
const drawCanvas = document.getElementById('draw-canvas');
|
| 980 |
+
if (ctxDraw && drawCanvas.width !== drawCanvas.offsetWidth) {
|
| 981 |
+
const imageData = ctxDraw.getImageData(0, 0, drawCanvas.width, drawCanvas.height);
|
| 982 |
+
drawCanvas.width = drawCanvas.offsetWidth;
|
| 983 |
+
ctxDraw.putImageData(imageData, 0, 0);
|
| 984 |
+
}
|
| 985 |
+
|
| 986 |
+
const webcamCanvas = document.getElementById('webcam-canvas');
|
| 987 |
+
if (webcamCanvas) {
|
| 988 |
+
webcamCanvas.width = webcamCanvas.offsetWidth;
|
| 989 |
+
// Optionally, clear or redraw if necessary
|
| 990 |
+
}
|
| 991 |
+
});
|
| 992 |
+
|
| 993 |
+
// ------------------ End of Additions ------------------
|
| 994 |
+
|
| 995 |
});
|
finalwork4.html
CHANGED
|
@@ -21,14 +21,14 @@
|
|
| 21 |
<h2>AGED GURU</h2>
|
| 22 |
<a href="#" class="active" data-content="voice">Digital Human Voice</a>
|
| 23 |
<a href="#" data-content="video">Digital Human Video</a>
|
|
|
|
| 24 |
<a href="#" data-content="coder">Young Coder</a>
|
| 25 |
<a href="#" data-content="advanced-math">Advanced Mathematics & Problem Solving</a>
|
| 26 |
-
<a href="#" data-content="interdisciplinary">Interdisciplinary Studies Assistant</a>
|
| 27 |
-
<a href="#" data-content="insights">Insights</a>
|
| 28 |
<a href="#" data-content="podcast">Podcast</a>
|
| 29 |
-
<a href="#" data-content="
|
| 30 |
<a href="#" data-content="knowledge-base">Knowledge Base</a>
|
| 31 |
<a href="#" data-content="digital-twin">Digital Twin</a>
|
|
|
|
| 32 |
</div>
|
| 33 |
|
| 34 |
<!-- Main Content -->
|
|
@@ -50,7 +50,7 @@
|
|
| 50 |
<div id="voice-model-selection-container" class="option-section">
|
| 51 |
<label for="voice-model-selection">Select Model:</label>
|
| 52 |
<select id="voice-model-selection"></select>
|
| 53 |
-
<button id="voice-download" disabled>
|
| 54 |
</div>
|
| 55 |
|
| 56 |
<!-- Voice Selection Section -->
|
|
@@ -127,16 +127,18 @@
|
|
| 127 |
|
| 128 |
|
| 129 |
|
|
|
|
|
|
|
| 130 |
<!-- --------------------Digital Human Mentor Video Content Starts---------------- -->
|
| 131 |
<div id="video" class="content-section hidden">
|
| 132 |
<div class="card video-card">
|
| 133 |
-
<!--
|
| 134 |
<div class="video-options">
|
| 135 |
<!-- Model Selection Section -->
|
| 136 |
<div id="video-model-selection-container" class="option-section">
|
| 137 |
<label for="video-model-selection">Select Model:</label>
|
| 138 |
<select id="video-model-selection"></select>
|
| 139 |
-
<button id="video-download" disabled>
|
| 140 |
</div>
|
| 141 |
|
| 142 |
<!-- Voice Selection Section -->
|
|
@@ -164,55 +166,92 @@
|
|
| 164 |
</div>
|
| 165 |
</div>
|
| 166 |
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
</div>
|
| 173 |
|
| 174 |
-
<!--
|
| 175 |
-
<div id="video-
|
| 176 |
-
|
| 177 |
-
<!-- Chat Input Section -->
|
| 178 |
-
<div id="video-text-input-container">
|
| 179 |
-
<input type="text" id="video-text-input" placeholder="Type your message here..." disabled>
|
| 180 |
-
<button id="video-submit-button" disabled>Send</button>
|
| 181 |
</div>
|
| 182 |
|
| 183 |
-
<!--
|
| 184 |
-
<div id="video-
|
| 185 |
-
<
|
| 186 |
-
<!-- Mic Icon SVG -->
|
| 187 |
-
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 188 |
-
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 189 |
-
</svg>
|
| 190 |
-
</button>
|
| 191 |
-
<button id="video-stop_button" aria-label="Stop Speech" disabled>
|
| 192 |
-
<!-- Stop Icon SVG -->
|
| 193 |
-
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 194 |
-
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 195 |
-
</svg>
|
| 196 |
-
</button>
|
| 197 |
</div>
|
| 198 |
</div>
|
| 199 |
|
| 200 |
-
<!--
|
| 201 |
-
<div
|
| 202 |
-
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
</div>
|
| 209 |
-
</div>
|
| 210 |
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
<h3>Upload and Analyze Image</h3>
|
| 214 |
-
<input type="file" id="video-image-upload" accept="image/*" />
|
| 215 |
-
<canvas id="video-image-canvas"></canvas>
|
| 216 |
</div>
|
| 217 |
</div>
|
| 218 |
</div>
|
|
@@ -225,16 +264,18 @@
|
|
| 225 |
<!-- --------------------Coder Content Starts------------------------------------- -->
|
| 226 |
<div id="coder" class="content-section hidden">
|
| 227 |
<div class="card coder-card">
|
| 228 |
-
<!--
|
| 229 |
<div class="coder-options">
|
| 230 |
<!-- Model Selection Section -->
|
| 231 |
<div id="coder-model-selection-container" class="option-section">
|
| 232 |
<label for="coder-model-selection">Select Model:</label>
|
| 233 |
-
<
|
| 234 |
-
|
|
|
|
|
|
|
| 235 |
</div>
|
| 236 |
|
| 237 |
-
<!--
|
| 238 |
<div id="coder-tool-selection-container" class="option-section">
|
| 239 |
<label for="coder-tools">Select Voice:</label>
|
| 240 |
<select id="coder-tools"></select>
|
|
@@ -258,66 +299,82 @@
|
|
| 258 |
<button id="coder-clear-logs">Clear Logs</button>
|
| 259 |
</div>
|
| 260 |
</div>
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
</div>
|
| 268 |
|
| 269 |
-
<!--
|
| 270 |
-
<div id="coder-
|
| 271 |
-
|
| 272 |
-
<!-- Chat Input Section -->
|
| 273 |
-
<div id="coder-text-input-container">
|
| 274 |
-
<input type="text" id="coder-text-input" placeholder="Type your message here..." disabled>
|
| 275 |
-
<button id="coder-submit-button" disabled>Send</button>
|
| 276 |
</div>
|
| 277 |
|
| 278 |
-
<!--
|
| 279 |
-
<div id="coder-
|
| 280 |
-
<
|
| 281 |
-
<!-- Mic Icon SVG -->
|
| 282 |
-
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 283 |
-
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 284 |
-
</svg>
|
| 285 |
-
</button>
|
| 286 |
-
<button id="coder-stop_button" aria-label="Stop Speech" disabled>
|
| 287 |
-
<!-- Stop Icon SVG -->
|
| 288 |
-
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 289 |
-
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 290 |
-
</svg>
|
| 291 |
-
</button>
|
| 292 |
</div>
|
| 293 |
</div>
|
|
|
|
| 294 |
|
| 295 |
-
<!--
|
| 296 |
-
<div id="coder-
|
| 297 |
-
<
|
| 298 |
-
</div>
|
| 299 |
-
|
| 300 |
-
<!-- Configuration Info -->
|
| 301 |
-
<div id="coder-configuration" class="hidden">
|
| 302 |
-
<p>Model Initialized: <span id="coder-selected-model">N/A</span></p>
|
| 303 |
</div>
|
|
|
|
| 304 |
</div>
|
|
|
|
|
|
|
|
|
|
| 305 |
</div>
|
| 306 |
</div>
|
| 307 |
<!-- --------------------Coder Content Ends---------------------------------------- -->
|
| 308 |
|
| 309 |
|
| 310 |
|
|
|
|
| 311 |
<!-- --------------------Math Content Starts--------------------------------------- -->
|
| 312 |
<div id="advanced-math" class="content-section hidden">
|
| 313 |
<div class="card advanced-math-card">
|
| 314 |
-
<!--
|
| 315 |
<div class="math-options">
|
| 316 |
<!-- Model Selection Section -->
|
| 317 |
<div id="math-model-selection-container" class="option-section">
|
| 318 |
<label for="math-model-selection">Select Math Model:</label>
|
| 319 |
<select id="math-model-selection"></select>
|
| 320 |
-
<button id="math-download" disabled>
|
| 321 |
</div>
|
| 322 |
|
| 323 |
<!-- Tool Selection Section -->
|
|
@@ -345,6 +402,7 @@
|
|
| 345 |
</div>
|
| 346 |
</div>
|
| 347 |
|
|
|
|
| 348 |
<div class="chat-window">
|
| 349 |
<!-- Chat Box Section -->
|
| 350 |
<div id="math-chat-container">
|
|
@@ -404,7 +462,7 @@
|
|
| 404 |
<div id="inter-model-selection-container" class="option-section">
|
| 405 |
<label for="inter-model-selection">Select Model:</label>
|
| 406 |
<select id="inter-model-selection"></select>
|
| 407 |
-
<button id="inter-download" disabled>
|
| 408 |
</div>
|
| 409 |
|
| 410 |
<!-- Voice Selection Section -->
|
|
@@ -530,6 +588,8 @@
|
|
| 530 |
</div>
|
| 531 |
</div>
|
| 532 |
|
|
|
|
|
|
|
| 533 |
|
| 534 |
<!-- Include the necessary scripts -->
|
| 535 |
<script type="module">
|
|
@@ -557,6 +617,8 @@
|
|
| 557 |
|
| 558 |
|
| 559 |
<!-- Include the necessary scripts -->
|
|
|
|
|
|
|
| 560 |
|
| 561 |
<script type="module" src="digital.human.audio.js"> </script>
|
| 562 |
<script type="module" src="digital.human.video.js"> </script>
|
|
|
|
| 21 |
<h2>AGED GURU</h2>
|
| 22 |
<a href="#" class="active" data-content="voice">Digital Human Voice</a>
|
| 23 |
<a href="#" data-content="video">Digital Human Video</a>
|
| 24 |
+
<a href="#" data-content="interdisciplinary">Interdisciplinary Studies Assistant</a>
|
| 25 |
<a href="#" data-content="coder">Young Coder</a>
|
| 26 |
<a href="#" data-content="advanced-math">Advanced Mathematics & Problem Solving</a>
|
|
|
|
|
|
|
| 27 |
<a href="#" data-content="podcast">Podcast</a>
|
| 28 |
+
<a href="#" data-content="insights">Insights</a>
|
| 29 |
<a href="#" data-content="knowledge-base">Knowledge Base</a>
|
| 30 |
<a href="#" data-content="digital-twin">Digital Twin</a>
|
| 31 |
+
<a href="#" data-content="3d-explorer">3D Explorer</a>
|
| 32 |
</div>
|
| 33 |
|
| 34 |
<!-- Main Content -->
|
|
|
|
| 50 |
<div id="voice-model-selection-container" class="option-section">
|
| 51 |
<label for="voice-model-selection">Select Model:</label>
|
| 52 |
<select id="voice-model-selection"></select>
|
| 53 |
+
<button id="voice-download" disabled>Initialize Model</button>
|
| 54 |
</div>
|
| 55 |
|
| 56 |
<!-- Voice Selection Section -->
|
|
|
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
+
|
| 131 |
+
|
| 132 |
<!-- --------------------Digital Human Mentor Video Content Starts---------------- -->
|
| 133 |
<div id="video" class="content-section hidden">
|
| 134 |
<div class="card video-card">
|
| 135 |
+
<!-- Video Options -->
|
| 136 |
<div class="video-options">
|
| 137 |
<!-- Model Selection Section -->
|
| 138 |
<div id="video-model-selection-container" class="option-section">
|
| 139 |
<label for="video-model-selection">Select Model:</label>
|
| 140 |
<select id="video-model-selection"></select>
|
| 141 |
+
<button id="video-download" disabled>Initialize Model</button>
|
| 142 |
</div>
|
| 143 |
|
| 144 |
<!-- Voice Selection Section -->
|
|
|
|
| 166 |
</div>
|
| 167 |
</div>
|
| 168 |
|
| 169 |
+
<!-- New: Wrapper for Chat Window and Image Upload Section -->
|
| 170 |
+
<div class="video-main">
|
| 171 |
+
<!-- Chat Window Section -->
|
| 172 |
+
<div class="chat-window">
|
| 173 |
+
<!-- Chat Box Section -->
|
| 174 |
+
<div id="video-chat-container">
|
| 175 |
+
<div id="video-chat-box">
|
| 176 |
+
<!-- Chat messages will appear here -->
|
| 177 |
+
</div>
|
| 178 |
+
|
| 179 |
+
<!-- Chat Stats -->
|
| 180 |
+
<div id="video-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 181 |
+
|
| 182 |
+
<!-- Chat Input Section -->
|
| 183 |
+
<div id="video-text-input-container">
|
| 184 |
+
<input type="text" id="video-text-input" placeholder="Type your message here..." disabled>
|
| 185 |
+
<button id="video-submit-button" disabled>Send</button>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<!-- Microphone Controls -->
|
| 189 |
+
<div id="video-mic-container">
|
| 190 |
+
<button id="video-start_button" aria-label="Start Voice Input" disabled>
|
| 191 |
+
<!-- Mic Icon SVG -->
|
| 192 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 193 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 194 |
+
</svg>
|
| 195 |
+
</button>
|
| 196 |
+
<button id="video-stop_button" aria-label="Stop Speech" disabled>
|
| 197 |
+
<!-- Stop Icon SVG -->
|
| 198 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 199 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 200 |
+
</svg>
|
| 201 |
+
</button>
|
| 202 |
+
</div>
|
| 203 |
</div>
|
| 204 |
|
| 205 |
+
<!-- Loading Spinner -->
|
| 206 |
+
<div id="video-loading-spinner" class="hidden">
|
| 207 |
+
<div class="spinner"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
</div>
|
| 209 |
|
| 210 |
+
<!-- Configuration Info -->
|
| 211 |
+
<div id="video-configuration" class="hidden">
|
| 212 |
+
<p>Model Initialized: <span id="video-selected-model">N/A</span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
</div>
|
| 214 |
</div>
|
| 215 |
|
| 216 |
+
<!-- Image Upload and Canvas Section -->
|
| 217 |
+
<div class="video-image-section">
|
| 218 |
+
<!-- Tab Navigation -->
|
| 219 |
+
<div class="image-tabs">
|
| 220 |
+
<button class="tab-button active" data-tab="upload">Upload Image</button>
|
| 221 |
+
<button class="tab-button" data-tab="webcam">Webcam</button>
|
| 222 |
+
<button class="tab-button" data-tab="draw">Draw</button>
|
| 223 |
+
</div>
|
| 224 |
|
| 225 |
+
<!-- Tab Contents -->
|
| 226 |
+
<div class="tab-content upload-tab">
|
| 227 |
+
<h3>Upload and Analyze Image</h3>
|
| 228 |
+
<input type="file" id="video-image-upload" accept="image/*" />
|
| 229 |
+
<canvas id="video-image-canvas"></canvas>
|
| 230 |
+
<button id="analyze-button">Analyze</button>
|
| 231 |
+
</div>
|
| 232 |
+
|
| 233 |
+
<div class="tab-content webcam-tab hidden">
|
| 234 |
+
<h3>Webcam Capture</h3>
|
| 235 |
+
<video id="webcam-video" autoplay playsinline></video>
|
| 236 |
+
<button id="capture-webcam-button">Capture Image</button>
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
<div class="tab-content draw-tab hidden">
|
| 240 |
+
<h3>Draw on Canvas</h3>
|
| 241 |
+
<canvas id="draw-canvas"></canvas>
|
| 242 |
+
<div class="draw-controls">
|
| 243 |
+
<button id="clear-draw-button">Clear Drawing</button>
|
| 244 |
+
<label for="draw-color">Color:</label>
|
| 245 |
+
<input type="color" id="draw-color" value="#000000">
|
| 246 |
+
<label for="draw-size">Size:</label>
|
| 247 |
+
<input type="range" id="draw-size" min="1" max="10" value="2">
|
| 248 |
+
<button id="discuss-button">Discuss</button>
|
| 249 |
+
</div>
|
| 250 |
+
</div>
|
| 251 |
</div>
|
|
|
|
| 252 |
|
| 253 |
+
|
| 254 |
+
|
|
|
|
|
|
|
|
|
|
| 255 |
</div>
|
| 256 |
</div>
|
| 257 |
</div>
|
|
|
|
| 264 |
<!-- --------------------Coder Content Starts------------------------------------- -->
|
| 265 |
<div id="coder" class="content-section hidden">
|
| 266 |
<div class="card coder-card">
|
| 267 |
+
<!-- Wrapper for Top Options -->
|
| 268 |
<div class="coder-options">
|
| 269 |
<!-- Model Selection Section -->
|
| 270 |
<div id="coder-model-selection-container" class="option-section">
|
| 271 |
<label for="coder-model-selection">Select Model:</label>
|
| 272 |
+
<div class="option-control-group">
|
| 273 |
+
<select id="coder-model-selection"></select>
|
| 274 |
+
<button id="coder-download" disabled>Initialize Model</button>
|
| 275 |
+
</div>
|
| 276 |
</div>
|
| 277 |
|
| 278 |
+
<!-- Voice Selection Section -->
|
| 279 |
<div id="coder-tool-selection-container" class="option-section">
|
| 280 |
<label for="coder-tools">Select Voice:</label>
|
| 281 |
<select id="coder-tools"></select>
|
|
|
|
| 299 |
<button id="coder-clear-logs">Clear Logs</button>
|
| 300 |
</div>
|
| 301 |
</div>
|
| 302 |
+
<!-- End of Top Options Wrapper -->
|
| 303 |
+
|
| 304 |
+
<!-- Wrapper for Chat and Python Interpreter -->
|
| 305 |
+
<div class="coder-main" style="display: flex; flex-direction: row; gap: 20px;">
|
| 306 |
+
<!-- Chat Window Section -->
|
| 307 |
+
<div class="chat-window" style="flex: 2;">
|
| 308 |
+
<!-- Chat Box Section -->
|
| 309 |
+
<div id="coder-chat-container">
|
| 310 |
+
<div id="coder-chat-box">
|
| 311 |
+
<!-- Chat messages will appear here -->
|
| 312 |
+
</div>
|
| 313 |
+
|
| 314 |
+
<!-- Chat Stats -->
|
| 315 |
+
<div id="coder-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 316 |
+
|
| 317 |
+
<!-- Chat Input Section -->
|
| 318 |
+
<div id="coder-text-input-container">
|
| 319 |
+
<input type="text" id="coder-text-input" placeholder="Type your message here..." disabled>
|
| 320 |
+
<button id="coder-submit-button" disabled>Send</button>
|
| 321 |
+
</div>
|
| 322 |
+
|
| 323 |
+
<!-- Microphone Controls -->
|
| 324 |
+
<div id="coder-mic-container">
|
| 325 |
+
<button id="coder-start_button" aria-label="Start Voice Input" disabled>
|
| 326 |
+
<!-- Mic Icon SVG -->
|
| 327 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 328 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 329 |
+
</svg>
|
| 330 |
+
</button>
|
| 331 |
+
<button id="coder-stop_button" aria-label="Stop Speech" disabled>
|
| 332 |
+
<!-- Stop Icon SVG -->
|
| 333 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 334 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 335 |
+
</svg>
|
| 336 |
+
</button>
|
| 337 |
+
</div>
|
| 338 |
</div>
|
| 339 |
|
| 340 |
+
<!-- Loading Spinner -->
|
| 341 |
+
<div id="coder-loading-spinner" class="hidden">
|
| 342 |
+
<div class="spinner"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
</div>
|
| 344 |
|
| 345 |
+
<!-- Configuration Info -->
|
| 346 |
+
<div id="coder-configuration" class="hidden">
|
| 347 |
+
<p>Model Initialized: <span id="coder-selected-model">N/A</span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
</div>
|
| 349 |
</div>
|
| 350 |
+
<!-- End of Chat Window Section -->
|
| 351 |
|
| 352 |
+
<!-- Python Interpreter Section -->
|
| 353 |
+
<div id="coder-python-container" style="flex: 1; display: flex; flex-direction: column; gap: 10px;">
|
| 354 |
+
<iframe src="https://pyodide.org/en/stable/console.html" style="flex: 1; border: none; border-radius: var(--border-radius);"></iframe>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
</div>
|
| 356 |
+
<!-- End of Python Interpreter Section -->
|
| 357 |
</div>
|
| 358 |
+
<!-- End of Wrapper for Chat and Python Interpreter -->
|
| 359 |
+
|
| 360 |
+
<!-- Loading Spinner and Configuration Info (if any additional) can remain as is -->
|
| 361 |
</div>
|
| 362 |
</div>
|
| 363 |
<!-- --------------------Coder Content Ends---------------------------------------- -->
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
+
|
| 368 |
<!-- --------------------Math Content Starts--------------------------------------- -->
|
| 369 |
<div id="advanced-math" class="content-section hidden">
|
| 370 |
<div class="card advanced-math-card">
|
| 371 |
+
<!-- Top Controls -->
|
| 372 |
<div class="math-options">
|
| 373 |
<!-- Model Selection Section -->
|
| 374 |
<div id="math-model-selection-container" class="option-section">
|
| 375 |
<label for="math-model-selection">Select Math Model:</label>
|
| 376 |
<select id="math-model-selection"></select>
|
| 377 |
+
<button id="math-download" disabled>Initialize Model</button>
|
| 378 |
</div>
|
| 379 |
|
| 380 |
<!-- Tool Selection Section -->
|
|
|
|
| 402 |
</div>
|
| 403 |
</div>
|
| 404 |
|
| 405 |
+
<!-- Chat Window Section -->
|
| 406 |
<div class="chat-window">
|
| 407 |
<!-- Chat Box Section -->
|
| 408 |
<div id="math-chat-container">
|
|
|
|
| 462 |
<div id="inter-model-selection-container" class="option-section">
|
| 463 |
<label for="inter-model-selection">Select Model:</label>
|
| 464 |
<select id="inter-model-selection"></select>
|
| 465 |
+
<button id="inter-download" disabled>Initialize Model</button>
|
| 466 |
</div>
|
| 467 |
|
| 468 |
<!-- Voice Selection Section -->
|
|
|
|
| 588 |
</div>
|
| 589 |
</div>
|
| 590 |
|
| 591 |
+
<!-- Include Axios from CDN -->
|
| 592 |
+
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
| 593 |
|
| 594 |
<!-- Include the necessary scripts -->
|
| 595 |
<script type="module">
|
|
|
|
| 617 |
|
| 618 |
|
| 619 |
<!-- Include the necessary scripts -->
|
| 620 |
+
<!-- Include Pyodide Script -->
|
| 621 |
+
|
| 622 |
|
| 623 |
<script type="module" src="digital.human.audio.js"> </script>
|
| 624 |
<script type="module" src="digital.human.video.js"> </script>
|
interdisciplinary.css
CHANGED
|
@@ -9,6 +9,7 @@
|
|
| 9 |
/* Card Styling */
|
| 10 |
.interdisciplinary-card {
|
| 11 |
display: flex;
|
|
|
|
| 12 |
gap: 20px;
|
| 13 |
background: linear-gradient(135deg, #ffffff, #f1f8e9);
|
| 14 |
border-radius: 16px;
|
|
@@ -27,15 +28,15 @@
|
|
| 27 |
|
| 28 |
/* Flex Layout for Inter Options and Chat Window */
|
| 29 |
.inter-options {
|
| 30 |
-
flex: 1;
|
| 31 |
display: flex;
|
| 32 |
-
flex-direction: column
|
|
|
|
| 33 |
gap: 20px;
|
| 34 |
}
|
| 35 |
|
| 36 |
-
/* Ensure Inter Options takes up available
|
| 37 |
.inter-options {
|
| 38 |
-
|
| 39 |
}
|
| 40 |
|
| 41 |
/* Chat Window Styling */
|
|
@@ -53,6 +54,8 @@
|
|
| 53 |
border-radius: 12px;
|
| 54 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 55 |
transition: background 0.3s, box-shadow 0.3s;
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
|
| 58 |
.option-section:hover {
|
|
@@ -419,4 +422,13 @@
|
|
| 419 |
#inter-logs {
|
| 420 |
max-height: 150px;
|
| 421 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
}
|
|
|
|
| 9 |
/* Card Styling */
|
| 10 |
.interdisciplinary-card {
|
| 11 |
display: flex;
|
| 12 |
+
flex-direction: column; /* Changed from row to column */
|
| 13 |
gap: 20px;
|
| 14 |
background: linear-gradient(135deg, #ffffff, #f1f8e9);
|
| 15 |
border-radius: 16px;
|
|
|
|
| 28 |
|
| 29 |
/* Flex Layout for Inter Options and Chat Window */
|
| 30 |
.inter-options {
|
|
|
|
| 31 |
display: flex;
|
| 32 |
+
flex-direction: row; /* Changed from column to row */
|
| 33 |
+
flex-wrap: wrap; /* Allows wrapping on smaller screens */
|
| 34 |
gap: 20px;
|
| 35 |
}
|
| 36 |
|
| 37 |
+
/* Ensure Inter Options takes up available horizontal space */
|
| 38 |
.inter-options {
|
| 39 |
+
width: 100%;
|
| 40 |
}
|
| 41 |
|
| 42 |
/* Chat Window Styling */
|
|
|
|
| 54 |
border-radius: 12px;
|
| 55 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
| 56 |
transition: background 0.3s, box-shadow 0.3s;
|
| 57 |
+
flex: 1; /* Allows each option section to take equal space */
|
| 58 |
+
min-width: 200px; /* Ensures a minimum width for each control */
|
| 59 |
}
|
| 60 |
|
| 61 |
.option-section:hover {
|
|
|
|
| 422 |
#inter-logs {
|
| 423 |
max-height: 150px;
|
| 424 |
}
|
| 425 |
+
|
| 426 |
+
/* Stack the option sections vertically on smaller screens */
|
| 427 |
+
.inter-options {
|
| 428 |
+
flex-direction: column;
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
.option-section {
|
| 432 |
+
min-width: 100%;
|
| 433 |
+
}
|
| 434 |
}
|