Spaces:
Running
Running
Update index.html
Browse files- index.html +367 -143
index.html
CHANGED
@@ -9,24 +9,26 @@
|
|
9 |
<script src="https://cdn.tailwindcss.com"></script>
|
10 |
<style>
|
11 |
:root {
|
12 |
-
--bg-primary: #
|
13 |
-
--bg-secondary: #
|
14 |
-
--bg-tertiary: #
|
15 |
-
--text-primary: #
|
16 |
-
--text-secondary: #
|
17 |
-
--accent-primary: #
|
18 |
-
--accent-secondary: #
|
19 |
-
--accent-tertiary: #
|
20 |
-
--error: #
|
21 |
-
--success: #
|
22 |
-
--warning: #
|
23 |
-
--glass-bg: rgba(
|
24 |
-
--glass-border: rgba(
|
25 |
-
--shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.
|
26 |
-
--shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.
|
27 |
-
--gradient-primary: linear-gradient(135deg, var(--accent-primary),
|
28 |
-
--gradient-secondary: linear-gradient(135deg, var(--accent-secondary), var(--accent-
|
29 |
-
--gradient-bg: linear-gradient(135deg, #
|
|
|
|
|
30 |
}
|
31 |
|
32 |
* {
|
@@ -38,8 +40,9 @@
|
|
38 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
|
39 |
background: var(--bg-primary);
|
40 |
background-image:
|
41 |
-
|
42 |
-
|
|
|
43 |
color: var(--text-primary);
|
44 |
display: flex;
|
45 |
justify-content: center;
|
@@ -47,16 +50,14 @@
|
|
47 |
min-height: 100vh;
|
48 |
overflow: hidden;
|
49 |
-webkit-tap-highlight-color: transparent;
|
50 |
-
backdrop-filter: blur(10px);
|
51 |
}
|
52 |
|
53 |
.app-container {
|
54 |
width: 95%;
|
55 |
max-width: 1400px;
|
56 |
background: var(--glass-bg);
|
57 |
-
backdrop-filter: blur(20px);
|
58 |
border: 1px solid var(--glass-border);
|
59 |
-
border-radius:
|
60 |
box-shadow: var(--shadow-xl);
|
61 |
display: flex;
|
62 |
overflow: hidden;
|
@@ -64,6 +65,17 @@
|
|
64 |
position: relative;
|
65 |
animation: slideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
|
66 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
@keyframes slideIn {
|
69 |
from {
|
@@ -80,12 +92,29 @@
|
|
80 |
width: 320px;
|
81 |
padding: 24px;
|
82 |
background: var(--bg-secondary);
|
83 |
-
|
84 |
-
border-right: 1px solid var(--glass-border);
|
85 |
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
86 |
overflow-y: auto;
|
87 |
scrollbar-width: thin;
|
88 |
-
scrollbar-color: var(--accent-primary)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
|
91 |
.settings-panel::-webkit-scrollbar {
|
@@ -93,7 +122,7 @@
|
|
93 |
}
|
94 |
|
95 |
.settings-panel::-webkit-scrollbar-track {
|
96 |
-
background:
|
97 |
}
|
98 |
|
99 |
.settings-panel::-webkit-scrollbar-thumb {
|
@@ -113,11 +142,26 @@
|
|
113 |
flex-direction: column;
|
114 |
position: relative;
|
115 |
background: var(--bg-primary);
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
.form-field {
|
119 |
margin-bottom: 20px;
|
120 |
animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
.form-field label {
|
@@ -130,23 +174,21 @@
|
|
130 |
letter-spacing: 0.5px;
|
131 |
}
|
132 |
|
133 |
-
.form-field select, .form-field textarea {
|
134 |
width: 100%;
|
135 |
padding: 12px 16px;
|
136 |
-
border: 2px solid
|
137 |
-
border-radius:
|
138 |
background: var(--bg-tertiary);
|
139 |
color: var(--text-primary);
|
140 |
font-size: 1rem;
|
141 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
142 |
-
backdrop-filter: blur(10px);
|
143 |
}
|
144 |
|
145 |
-
.form-field select:focus, .form-field textarea:focus {
|
146 |
outline: none;
|
147 |
border-color: var(--accent-primary);
|
148 |
-
box-shadow: 0 0
|
149 |
-
transform: translateY(-2px);
|
150 |
}
|
151 |
|
152 |
.form-field textarea {
|
@@ -157,9 +199,9 @@
|
|
157 |
button {
|
158 |
padding: 12px 24px;
|
159 |
border: none;
|
160 |
-
border-radius:
|
161 |
-
background: var(--
|
162 |
-
color: var(--
|
163 |
cursor: pointer;
|
164 |
font-size: 1rem;
|
165 |
font-weight: 600;
|
@@ -167,6 +209,7 @@
|
|
167 |
touch-action: manipulation;
|
168 |
position: relative;
|
169 |
overflow: hidden;
|
|
|
170 |
}
|
171 |
|
172 |
button::before {
|
@@ -176,7 +219,7 @@
|
|
176 |
left: -100%;
|
177 |
width: 100%;
|
178 |
height: 100%;
|
179 |
-
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.
|
180 |
transition: left 0.5s;
|
181 |
}
|
182 |
|
@@ -185,17 +228,18 @@
|
|
185 |
}
|
186 |
|
187 |
button:hover {
|
188 |
-
|
189 |
-
|
190 |
}
|
191 |
|
192 |
button:active {
|
193 |
-
transform: translateY(
|
|
|
194 |
}
|
195 |
|
196 |
.material-icons {
|
197 |
font-family: 'Material Icons';
|
198 |
-
font-size:
|
199 |
vertical-align: middle;
|
200 |
}
|
201 |
|
@@ -207,7 +251,10 @@
|
|
207 |
flex-direction: column;
|
208 |
gap: 16px;
|
209 |
scrollbar-width: thin;
|
210 |
-
scrollbar-color: var(--accent-primary)
|
|
|
|
|
|
|
211 |
}
|
212 |
|
213 |
.chat-container::-webkit-scrollbar {
|
@@ -215,7 +262,7 @@
|
|
215 |
}
|
216 |
|
217 |
.chat-container::-webkit-scrollbar-track {
|
218 |
-
background:
|
219 |
}
|
220 |
|
221 |
.chat-container::-webkit-scrollbar-thumb {
|
@@ -226,12 +273,22 @@
|
|
226 |
.message {
|
227 |
max-width: 80%;
|
228 |
padding: 16px 20px;
|
229 |
-
border-radius:
|
230 |
font-size: 1rem;
|
231 |
line-height: 1.6;
|
232 |
position: relative;
|
233 |
animation: messageSlide 0.5s cubic-bezier(0.23, 1, 0.32, 1);
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
|
237 |
@keyframes messageSlide {
|
@@ -246,48 +303,56 @@
|
|
246 |
}
|
247 |
|
248 |
.message.user {
|
249 |
-
background: var(--
|
250 |
align-self: flex-end;
|
251 |
-
|
252 |
}
|
253 |
|
254 |
.message.ai {
|
255 |
-
background: var(--
|
256 |
-
border: 1px solid var(--glass-border);
|
257 |
align-self: flex-start;
|
258 |
-
|
259 |
}
|
260 |
|
261 |
.input-container {
|
262 |
display: flex;
|
263 |
gap: 12px;
|
264 |
padding: 20px;
|
265 |
-
background: var(--
|
266 |
-
|
267 |
-
border-top: 1px solid var(--glass-border);
|
268 |
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
}
|
270 |
|
271 |
#userInput {
|
272 |
flex: 1;
|
273 |
padding: 16px 20px;
|
274 |
-
border: 2px solid
|
275 |
-
border-radius:
|
276 |
-
background: var(--bg-
|
277 |
color: var(--text-primary);
|
278 |
resize: none;
|
279 |
min-height: 60px;
|
280 |
max-height: 150px;
|
281 |
-
font-size:
|
282 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
283 |
-
backdrop-filter: blur(10px);
|
284 |
}
|
285 |
|
286 |
#userInput:focus {
|
287 |
outline: none;
|
288 |
border-color: var(--accent-primary);
|
289 |
-
box-shadow: 0 0
|
290 |
-
transform: translateY(-2px);
|
291 |
}
|
292 |
|
293 |
#sendButton, #attachButton {
|
@@ -296,14 +361,20 @@
|
|
296 |
justify-content: center;
|
297 |
width: 60px;
|
298 |
height: 60px;
|
299 |
-
border-radius:
|
300 |
-
background: var(--
|
301 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
302 |
}
|
303 |
|
304 |
#sendButton:hover, #attachButton:hover {
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
|
|
|
|
307 |
}
|
308 |
|
309 |
#sendButton:disabled {
|
@@ -316,7 +387,7 @@
|
|
316 |
.spinner {
|
317 |
width: 28px;
|
318 |
height: 28px;
|
319 |
-
border: 3px solid rgba(
|
320 |
border-top: 3px solid var(--accent-primary);
|
321 |
border-radius: 50%;
|
322 |
animation: spin 1s linear infinite;
|
@@ -331,14 +402,14 @@
|
|
331 |
top: 24px;
|
332 |
right: 24px;
|
333 |
padding: 16px 24px;
|
334 |
-
border-radius:
|
335 |
color: #fff;
|
336 |
font-size: 1rem;
|
337 |
font-weight: 600;
|
338 |
z-index: 1000;
|
339 |
display: none;
|
340 |
-
backdrop-filter: blur(15px);
|
341 |
animation: notificationSlide 0.5s cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
342 |
}
|
343 |
|
344 |
@keyframes notificationSlide {
|
@@ -353,13 +424,15 @@
|
|
353 |
}
|
354 |
|
355 |
.error-message {
|
356 |
-
background:
|
357 |
-
|
|
|
358 |
}
|
359 |
|
360 |
.success-message {
|
361 |
-
background:
|
362 |
-
|
|
|
363 |
}
|
364 |
|
365 |
.carousel-container {
|
@@ -372,6 +445,7 @@
|
|
372 |
position: relative;
|
373 |
user-select: none;
|
374 |
padding: 24px;
|
|
|
375 |
}
|
376 |
|
377 |
.carousel {
|
@@ -380,28 +454,55 @@
|
|
380 |
max-width: 500px;
|
381 |
height: 300px;
|
382 |
transform-style: preserve-3d;
|
383 |
-
transition: transform 0.
|
384 |
cursor: grab;
|
385 |
}
|
386 |
|
387 |
.carousel.dragging {
|
388 |
cursor: grabbing;
|
|
|
389 |
}
|
390 |
|
391 |
.carousel-card {
|
392 |
position: absolute;
|
393 |
width: 100%;
|
394 |
height: 100%;
|
395 |
-
background: var(--
|
396 |
-
|
397 |
-
border:
|
398 |
-
border-radius: 16px;
|
399 |
padding: 24px;
|
400 |
-
box-shadow: var(--shadow-lg);
|
401 |
display: flex;
|
402 |
flex-direction: column;
|
403 |
gap: 12px;
|
404 |
-
transition: all 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
}
|
406 |
|
407 |
.carousel-controls, .carousel-indicator {
|
@@ -414,15 +515,15 @@
|
|
414 |
width: 14px;
|
415 |
height: 14px;
|
416 |
background: var(--bg-tertiary);
|
417 |
-
border-radius:
|
418 |
cursor: pointer;
|
419 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
420 |
-
border: 2px solid
|
|
|
421 |
}
|
422 |
|
423 |
.carousel-dot.active {
|
424 |
background: var(--accent-primary);
|
425 |
-
box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
|
426 |
transform: scale(1.2);
|
427 |
}
|
428 |
|
@@ -433,13 +534,12 @@
|
|
433 |
|
434 |
.mode-toggle {
|
435 |
display: flex;
|
436 |
-
background: var(--bg-
|
437 |
-
|
438 |
-
border-radius: 20px;
|
439 |
padding: 4px;
|
440 |
position: relative;
|
441 |
margin-bottom: 20px;
|
442 |
-
border:
|
443 |
}
|
444 |
|
445 |
.mode-toggle button {
|
@@ -452,12 +552,13 @@
|
|
452 |
z-index: 1;
|
453 |
font-size: 1rem;
|
454 |
font-weight: 600;
|
455 |
-
border-radius:
|
456 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
457 |
}
|
458 |
|
459 |
.mode-toggle button.active {
|
460 |
-
color: var(--
|
461 |
}
|
462 |
|
463 |
.mode-toggle-slider {
|
@@ -465,10 +566,10 @@
|
|
465 |
top: 4px;
|
466 |
left: 4px;
|
467 |
height: calc(100% - 8px);
|
468 |
-
background: var(--
|
469 |
-
border-radius:
|
470 |
-
transition: all 0.4s cubic-bezier(0.
|
471 |
-
box-shadow: 0
|
472 |
}
|
473 |
|
474 |
.dropzone {
|
@@ -477,8 +578,7 @@
|
|
477 |
left: 0;
|
478 |
right: 0;
|
479 |
bottom: 0;
|
480 |
-
background: rgba(
|
481 |
-
backdrop-filter: blur(20px);
|
482 |
border: 3px dashed var(--accent-primary);
|
483 |
display: none;
|
484 |
align-items: center;
|
@@ -487,7 +587,7 @@
|
|
487 |
font-size: 1.4rem;
|
488 |
font-weight: 600;
|
489 |
z-index: 10;
|
490 |
-
border-radius:
|
491 |
}
|
492 |
|
493 |
.dropzone.active {
|
@@ -522,22 +622,38 @@
|
|
522 |
|
523 |
.chip {
|
524 |
padding: 10px 18px;
|
525 |
-
background: var(--
|
526 |
-
|
527 |
-
border:
|
528 |
-
border-radius: 20px;
|
529 |
font-size: 0.9rem;
|
530 |
font-weight: 600;
|
531 |
cursor: pointer;
|
532 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
533 |
color: var(--text-secondary);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
}
|
535 |
|
536 |
.chip:hover {
|
537 |
background: var(--accent-primary);
|
538 |
-
color: var(--
|
539 |
transform: translateY(-2px);
|
540 |
-
box-shadow: 0
|
|
|
|
|
|
|
|
|
|
|
541 |
}
|
542 |
|
543 |
.floating-buttons {
|
@@ -552,21 +668,26 @@
|
|
552 |
.floating-btn {
|
553 |
width: 48px;
|
554 |
height: 48px;
|
555 |
-
border-radius:
|
556 |
-
background: var(--
|
557 |
-
|
558 |
-
border: 1px solid var(--glass-border);
|
559 |
display: flex;
|
560 |
align-items: center;
|
561 |
justify-content: center;
|
562 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
563 |
padding: 0;
|
|
|
564 |
}
|
565 |
|
566 |
.floating-btn:hover {
|
567 |
background: var(--accent-primary);
|
568 |
-
|
569 |
-
|
|
|
|
|
|
|
|
|
|
|
570 |
}
|
571 |
|
572 |
.code-tools {
|
@@ -580,19 +701,18 @@
|
|
580 |
.code-tools button {
|
581 |
padding: 6px 12px;
|
582 |
font-size: 0.85rem;
|
583 |
-
background: var(--
|
584 |
-
|
585 |
-
|
586 |
}
|
587 |
|
588 |
pre {
|
589 |
position: relative;
|
590 |
-
background: var(--bg-
|
591 |
-
border: 1px solid var(--
|
592 |
padding: 20px;
|
593 |
-
border-radius:
|
594 |
overflow-x: auto;
|
595 |
-
backdrop-filter: blur(10px);
|
596 |
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
|
597 |
}
|
598 |
|
@@ -604,9 +724,46 @@
|
|
604 |
.image-preview {
|
605 |
max-width: 100%;
|
606 |
max-height: 300px;
|
607 |
-
border-radius:
|
608 |
margin-top: 12px;
|
609 |
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
}
|
611 |
|
612 |
@keyframes fadeInUp {
|
@@ -633,7 +790,7 @@
|
|
633 |
width: 100%;
|
634 |
max-height: 40vh;
|
635 |
border-right: none;
|
636 |
-
border-bottom:
|
637 |
}
|
638 |
|
639 |
.settings-panel.collapsed {
|
@@ -692,7 +849,7 @@
|
|
692 |
padding: 8px 14px;
|
693 |
}
|
694 |
|
695 |
-
.form-field select, .form-field textarea, #userInput {
|
696 |
font-size: 16px;
|
697 |
}
|
698 |
}
|
@@ -701,7 +858,7 @@
|
|
701 |
<body>
|
702 |
<div class="app-container" id="appContainer">
|
703 |
<div class="settings-panel" id="settingsPanel">
|
704 |
-
<h2 style="font-size: 1.4rem; margin-bottom: 24px;
|
705 |
<div class="form-field">
|
706 |
<label>π€ Main Model:</label>
|
707 |
<select id="modelSelect">
|
@@ -717,16 +874,16 @@
|
|
717 |
</div>
|
718 |
<div class="form-field">
|
719 |
<label>π API Key:</label>
|
720 |
-
<input type="password" id="apiKeyInput"
|
721 |
<p style="font-size: 0.8rem; color: var(--text-secondary); margin-top: 8px;">
|
722 |
π Your API key is stored locally only
|
723 |
</p>
|
724 |
</div>
|
725 |
<div class="form-field">
|
726 |
<label>β‘ Max Tokens:</label>
|
727 |
-
<input type="number" id="maxTokensInput"
|
728 |
</div>
|
729 |
-
<button id="saveSettingsBtn">πΎ Save Settings</button>
|
730 |
</div>
|
731 |
<div class="main-content">
|
732 |
<div class="floating-buttons">
|
@@ -742,19 +899,19 @@
|
|
742 |
</div>
|
743 |
|
744 |
<div class="mode-toggle">
|
745 |
-
<button id="carouselModeBtn" class="active">ποΈ
|
746 |
-
<button id="chatModeBtn">π¬
|
747 |
<div class="mode-toggle-slider" id="modeToggleSlider"></div>
|
748 |
</div>
|
749 |
|
750 |
<div id="carouselMode">
|
751 |
<div class="carousel-container">
|
752 |
<div class="carousel" id="promptCarousel">
|
753 |
-
<div class="carousel-card" style="transform: rotateY(0deg) translateZ(500px);">
|
754 |
<label>π― Primary System Prompt:</label>
|
755 |
<textarea id="primarySystemPrompt" placeholder="Enter primary system prompt for the AI assistant...">You are a helpful AI assistant that provides clear, accurate, and helpful responses. Focus on practical solutions and detailed explanations.</textarea>
|
756 |
</div>
|
757 |
-
<div class="carousel-card" style="transform: rotateY(60deg) translateZ(500px); opacity: 0.8;">
|
758 |
<label>π» Code Template:</label>
|
759 |
<textarea id="codeTemplate" placeholder="Enter code formatting template...">```javascript
|
760 |
// Code implementation
|
@@ -764,7 +921,7 @@ function solution() {
|
|
764 |
}
|
765 |
```</textarea>
|
766 |
</div>
|
767 |
-
<div class="carousel-card" style="transform: rotateY(120deg) translateZ(500px); opacity: 0.8;">
|
768 |
<label>π Additional Instructions:</label>
|
769 |
<textarea id="additionalInstructions" placeholder="Enter additional instructions for the AI...">Provide working code examples when possible. Explain complex concepts step by step. Use modern best practices.</textarea>
|
770 |
</div>
|
@@ -778,7 +935,7 @@ function solution() {
|
|
778 |
<div class="carousel-dot" data-index="1"></div>
|
779 |
<div class="carousel-dot" data-index="2"></div>
|
780 |
</div>
|
781 |
-
<button id="applyPromptBtn" style="margin-top: 24px;">β
Apply Prompts & Switch to
|
782 |
</div>
|
783 |
</div>
|
784 |
|
@@ -811,13 +968,27 @@ function solution() {
|
|
811 |
// Global variables
|
812 |
let isLoading = false;
|
813 |
let currentCarouselIndex = 0;
|
|
|
|
|
814 |
|
815 |
// Initialize the application
|
816 |
document.addEventListener('DOMContentLoaded', function() {
|
817 |
loadSettings();
|
818 |
setupEventListeners();
|
819 |
-
|
820 |
hljs.highlightAll();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
});
|
822 |
|
823 |
// Settings management
|
@@ -859,9 +1030,15 @@ function solution() {
|
|
859 |
document.getElementById('saveSettingsBtn').addEventListener('click', saveSettings);
|
860 |
document.getElementById('settingsToggle').addEventListener('click', toggleSettings);
|
861 |
|
862 |
-
// Carousel controls
|
863 |
-
document.getElementById('prevCard').addEventListener('click', () =>
|
864 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
document.getElementById('applyPromptBtn').addEventListener('click', applyPromptsAndSwitchToChat);
|
866 |
|
867 |
// Chat controls
|
@@ -881,7 +1058,7 @@ function solution() {
|
|
881 |
});
|
882 |
});
|
883 |
|
884 |
-
// Carousel dots
|
885 |
document.querySelectorAll('.carousel-dot').forEach(dot => {
|
886 |
dot.addEventListener('click', (e) => {
|
887 |
const index = parseInt(e.target.getAttribute('data-index'));
|
@@ -889,6 +1066,39 @@ function solution() {
|
|
889 |
});
|
890 |
});
|
891 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
|
893 |
// Mode switching
|
894 |
function switchMode(mode) {
|
@@ -915,11 +1125,7 @@ function solution() {
|
|
915 |
}
|
916 |
}
|
917 |
|
918 |
-
//
|
919 |
-
function setupCarousel() {
|
920 |
-
updateCarouselPosition();
|
921 |
-
}
|
922 |
-
|
923 |
function rotateCarousel(direction) {
|
924 |
const totalCards = 3;
|
925 |
currentCarouselIndex = (currentCarouselIndex + direction + totalCards) % totalCards;
|
@@ -934,20 +1140,38 @@ function solution() {
|
|
934 |
function updateCarouselPosition() {
|
935 |
const carousel = document.getElementById('promptCarousel');
|
936 |
const cards = carousel.querySelectorAll('.carousel-card');
|
937 |
-
const dots = document.querySelectorAll('.carousel-dot');
|
938 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
939 |
cards.forEach((card, index) => {
|
940 |
const angle = (index - currentCarouselIndex) * 60;
|
941 |
const isActive = index === currentCarouselIndex;
|
942 |
|
|
|
|
|
943 |
card.style.transform = `rotateY(${angle}deg) translateZ(500px)`;
|
944 |
card.style.opacity = isActive ? '1' : '0.6';
|
945 |
card.style.zIndex = isActive ? '10' : '1';
|
946 |
});
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
|
|
|
|
|
|
|
|
951 |
}
|
952 |
|
953 |
function applyPromptsAndSwitchToChat() {
|
@@ -1124,4 +1348,4 @@ function solution() {
|
|
1124 |
}
|
1125 |
</script>
|
1126 |
</body>
|
1127 |
-
</html>
|
|
|
9 |
<script src="https://cdn.tailwindcss.com"></script>
|
10 |
<style>
|
11 |
:root {
|
12 |
+
--bg-primary: #121212;
|
13 |
+
--bg-secondary: #1c1c1a;
|
14 |
+
--bg-tertiary: #252521;
|
15 |
+
--text-primary: #e8e8e0;
|
16 |
+
--text-secondary: #a5a59c;
|
17 |
+
--accent-primary: #8FBC8F;
|
18 |
+
--accent-secondary: #5D4037;
|
19 |
+
--accent-tertiary: #3E2723;
|
20 |
+
--error: #a73737;
|
21 |
+
--success: #4a7c59;
|
22 |
+
--warning: #b3892b;
|
23 |
+
--glass-bg: rgba(24, 24, 20, 0.7);
|
24 |
+
--glass-border: rgba(143, 188, 143, 0.2);
|
25 |
+
--shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.7);
|
26 |
+
--shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.85);
|
27 |
+
--gradient-primary: linear-gradient(135deg, var(--accent-primary), #6a8a6a);
|
28 |
+
--gradient-secondary: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
|
29 |
+
--gradient-bg: linear-gradient(135deg, #252521 0%, #121212 100%);
|
30 |
+
--rust-accent: #8b5d3b;
|
31 |
+
--metal-accent: #6c7b74;
|
32 |
}
|
33 |
|
34 |
* {
|
|
|
40 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
|
41 |
background: var(--bg-primary);
|
42 |
background-image:
|
43 |
+
url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%238FBC8F' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E"),
|
44 |
+
repeating-linear-gradient(45deg, rgba(143, 188, 143, 0.02) 0px, rgba(143, 188, 143, 0.02) 2px, transparent 2px, transparent 4px),
|
45 |
+
linear-gradient(135deg, rgba(30, 20, 15, 0.9), rgba(18, 18, 18, 1));
|
46 |
color: var(--text-primary);
|
47 |
display: flex;
|
48 |
justify-content: center;
|
|
|
50 |
min-height: 100vh;
|
51 |
overflow: hidden;
|
52 |
-webkit-tap-highlight-color: transparent;
|
|
|
53 |
}
|
54 |
|
55 |
.app-container {
|
56 |
width: 95%;
|
57 |
max-width: 1400px;
|
58 |
background: var(--glass-bg);
|
|
|
59 |
border: 1px solid var(--glass-border);
|
60 |
+
border-radius: 8px;
|
61 |
box-shadow: var(--shadow-xl);
|
62 |
display: flex;
|
63 |
overflow: hidden;
|
|
|
65 |
position: relative;
|
66 |
animation: slideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
|
67 |
}
|
68 |
+
|
69 |
+
.app-container::before {
|
70 |
+
content: '';
|
71 |
+
position: absolute;
|
72 |
+
top: 0;
|
73 |
+
left: 0;
|
74 |
+
right: 0;
|
75 |
+
height: 4px;
|
76 |
+
background: var(--accent-primary);
|
77 |
+
z-index: 10;
|
78 |
+
}
|
79 |
|
80 |
@keyframes slideIn {
|
81 |
from {
|
|
|
92 |
width: 320px;
|
93 |
padding: 24px;
|
94 |
background: var(--bg-secondary);
|
95 |
+
border-right: 2px solid var(--accent-tertiary);
|
|
|
96 |
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
97 |
overflow-y: auto;
|
98 |
scrollbar-width: thin;
|
99 |
+
scrollbar-color: var(--accent-primary) var(--bg-tertiary);
|
100 |
+
position: relative;
|
101 |
+
}
|
102 |
+
|
103 |
+
.settings-panel::after {
|
104 |
+
content: '';
|
105 |
+
position: absolute;
|
106 |
+
top: 0;
|
107 |
+
right: 0;
|
108 |
+
width: 1px;
|
109 |
+
height: 100%;
|
110 |
+
background: repeating-linear-gradient(
|
111 |
+
to bottom,
|
112 |
+
var(--accent-primary) 0,
|
113 |
+
var(--accent-primary) 10px,
|
114 |
+
transparent 10px,
|
115 |
+
transparent 20px
|
116 |
+
);
|
117 |
+
opacity: 0.3;
|
118 |
}
|
119 |
|
120 |
.settings-panel::-webkit-scrollbar {
|
|
|
122 |
}
|
123 |
|
124 |
.settings-panel::-webkit-scrollbar-track {
|
125 |
+
background: var(--bg-tertiary);
|
126 |
}
|
127 |
|
128 |
.settings-panel::-webkit-scrollbar-thumb {
|
|
|
142 |
flex-direction: column;
|
143 |
position: relative;
|
144 |
background: var(--bg-primary);
|
145 |
+
background-image:
|
146 |
+
linear-gradient(rgba(18, 18, 18, 0.97), rgba(18, 18, 18, 0.97)),
|
147 |
+
url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238FBC8F' fill-opacity='0.03'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
|
148 |
}
|
149 |
|
150 |
.form-field {
|
151 |
margin-bottom: 20px;
|
152 |
animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
|
153 |
+
position: relative;
|
154 |
+
}
|
155 |
+
|
156 |
+
.form-field::after {
|
157 |
+
content: '';
|
158 |
+
position: absolute;
|
159 |
+
bottom: -10px;
|
160 |
+
left: 0;
|
161 |
+
right: 0;
|
162 |
+
height: 1px;
|
163 |
+
background: var(--accent-tertiary);
|
164 |
+
opacity: 0.3;
|
165 |
}
|
166 |
|
167 |
.form-field label {
|
|
|
174 |
letter-spacing: 0.5px;
|
175 |
}
|
176 |
|
177 |
+
.form-field select, .form-field textarea, .form-field input {
|
178 |
width: 100%;
|
179 |
padding: 12px 16px;
|
180 |
+
border: 2px solid var(--accent-tertiary);
|
181 |
+
border-radius: 6px;
|
182 |
background: var(--bg-tertiary);
|
183 |
color: var(--text-primary);
|
184 |
font-size: 1rem;
|
185 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
186 |
}
|
187 |
|
188 |
+
.form-field select:focus, .form-field textarea:focus, .form-field input:focus {
|
189 |
outline: none;
|
190 |
border-color: var(--accent-primary);
|
191 |
+
box-shadow: 0 0 0 2px rgba(143, 188, 143, 0.3);
|
|
|
192 |
}
|
193 |
|
194 |
.form-field textarea {
|
|
|
199 |
button {
|
200 |
padding: 12px 24px;
|
201 |
border: none;
|
202 |
+
border-radius: 6px;
|
203 |
+
background: var(--accent-primary);
|
204 |
+
color: var(--bg-primary);
|
205 |
cursor: pointer;
|
206 |
font-size: 1rem;
|
207 |
font-weight: 600;
|
|
|
209 |
touch-action: manipulation;
|
210 |
position: relative;
|
211 |
overflow: hidden;
|
212 |
+
box-shadow: 0 4px 0 var(--accent-tertiary);
|
213 |
}
|
214 |
|
215 |
button::before {
|
|
|
219 |
left: -100%;
|
220 |
width: 100%;
|
221 |
height: 100%;
|
222 |
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
|
223 |
transition: left 0.5s;
|
224 |
}
|
225 |
|
|
|
228 |
}
|
229 |
|
230 |
button:hover {
|
231 |
+
background: #a0cfa0;
|
232 |
+
transform: translateY(-2px);
|
233 |
}
|
234 |
|
235 |
button:active {
|
236 |
+
transform: translateY(2px);
|
237 |
+
box-shadow: 0 0 0 var(--accent-tertiary);
|
238 |
}
|
239 |
|
240 |
.material-icons {
|
241 |
font-family: 'Material Icons';
|
242 |
+
font-size: 24px;
|
243 |
vertical-align: middle;
|
244 |
}
|
245 |
|
|
|
251 |
flex-direction: column;
|
252 |
gap: 16px;
|
253 |
scrollbar-width: thin;
|
254 |
+
scrollbar-color: var(--accent-primary) var(--bg-tertiary);
|
255 |
+
background-image:
|
256 |
+
linear-gradient(rgba(18, 18, 18, 0.95), rgba(18, 18, 18, 0.95)),
|
257 |
+
url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235D4037' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
|
258 |
}
|
259 |
|
260 |
.chat-container::-webkit-scrollbar {
|
|
|
262 |
}
|
263 |
|
264 |
.chat-container::-webkit-scrollbar-track {
|
265 |
+
background: var(--bg-tertiary);
|
266 |
}
|
267 |
|
268 |
.chat-container::-webkit-scrollbar-thumb {
|
|
|
273 |
.message {
|
274 |
max-width: 80%;
|
275 |
padding: 16px 20px;
|
276 |
+
border-radius: 6px;
|
277 |
font-size: 1rem;
|
278 |
line-height: 1.6;
|
279 |
position: relative;
|
280 |
animation: messageSlide 0.5s cubic-bezier(0.23, 1, 0.32, 1);
|
281 |
+
border: 1px solid transparent;
|
282 |
+
}
|
283 |
+
|
284 |
+
.message::before {
|
285 |
+
content: '';
|
286 |
+
position: absolute;
|
287 |
+
top: 0;
|
288 |
+
left: 0;
|
289 |
+
right: 0;
|
290 |
+
height: 1px;
|
291 |
+
background: var(--glass-border);
|
292 |
}
|
293 |
|
294 |
@keyframes messageSlide {
|
|
|
303 |
}
|
304 |
|
305 |
.message.user {
|
306 |
+
background: var(--accent-secondary);
|
307 |
align-self: flex-end;
|
308 |
+
border-bottom: 3px solid var(--accent-tertiary);
|
309 |
}
|
310 |
|
311 |
.message.ai {
|
312 |
+
background: var(--bg-tertiary);
|
|
|
313 |
align-self: flex-start;
|
314 |
+
border-left: 3px solid var(--accent-primary);
|
315 |
}
|
316 |
|
317 |
.input-container {
|
318 |
display: flex;
|
319 |
gap: 12px;
|
320 |
padding: 20px;
|
321 |
+
background: var(--bg-secondary);
|
322 |
+
border-top: 2px solid var(--accent-tertiary);
|
|
|
323 |
align-items: center;
|
324 |
+
position: relative;
|
325 |
+
}
|
326 |
+
|
327 |
+
.input-container::before {
|
328 |
+
content: '';
|
329 |
+
position: absolute;
|
330 |
+
top: -4px;
|
331 |
+
left: 0;
|
332 |
+
right: 0;
|
333 |
+
height: 2px;
|
334 |
+
background: var(--rust-accent);
|
335 |
+
opacity: 0.6;
|
336 |
}
|
337 |
|
338 |
#userInput {
|
339 |
flex: 1;
|
340 |
padding: 16px 20px;
|
341 |
+
border: 2px solid var(--accent-tertiary);
|
342 |
+
border-radius: 6px;
|
343 |
+
background: var(--bg-tertiary);
|
344 |
color: var(--text-primary);
|
345 |
resize: none;
|
346 |
min-height: 60px;
|
347 |
max-height: 150px;
|
348 |
+
font-size: 16px;
|
349 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
|
350 |
}
|
351 |
|
352 |
#userInput:focus {
|
353 |
outline: none;
|
354 |
border-color: var(--accent-primary);
|
355 |
+
box-shadow: 0 0 0 2px rgba(143, 188, 143, 0.3);
|
|
|
356 |
}
|
357 |
|
358 |
#sendButton, #attachButton {
|
|
|
361 |
justify-content: center;
|
362 |
width: 60px;
|
363 |
height: 60px;
|
364 |
+
border-radius: 6px;
|
365 |
+
background: var(--accent-primary);
|
366 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
367 |
+
box-shadow: 0 4px 0 var(--accent-tertiary);
|
368 |
}
|
369 |
|
370 |
#sendButton:hover, #attachButton:hover {
|
371 |
+
background: #a0cfa0;
|
372 |
+
transform: translateY(-2px);
|
373 |
+
}
|
374 |
+
|
375 |
+
#sendButton:active, #attachButton:active {
|
376 |
+
transform: translateY(2px);
|
377 |
+
box-shadow: 0 0 0 var(--accent-tertiary);
|
378 |
}
|
379 |
|
380 |
#sendButton:disabled {
|
|
|
387 |
.spinner {
|
388 |
width: 28px;
|
389 |
height: 28px;
|
390 |
+
border: 3px solid rgba(143, 188, 143, 0.2);
|
391 |
border-top: 3px solid var(--accent-primary);
|
392 |
border-radius: 50%;
|
393 |
animation: spin 1s linear infinite;
|
|
|
402 |
top: 24px;
|
403 |
right: 24px;
|
404 |
padding: 16px 24px;
|
405 |
+
border-radius: 6px;
|
406 |
color: #fff;
|
407 |
font-size: 1rem;
|
408 |
font-weight: 600;
|
409 |
z-index: 1000;
|
410 |
display: none;
|
|
|
411 |
animation: notificationSlide 0.5s cubic-bezier(0.23, 1, 0.32, 1);
|
412 |
+
border-left: 4px solid transparent;
|
413 |
}
|
414 |
|
415 |
@keyframes notificationSlide {
|
|
|
424 |
}
|
425 |
|
426 |
.error-message {
|
427 |
+
background: var(--bg-tertiary);
|
428 |
+
border-left-color: var(--error);
|
429 |
+
box-shadow: 0 5px 15px rgba(167, 55, 55, 0.3);
|
430 |
}
|
431 |
|
432 |
.success-message {
|
433 |
+
background: var(--bg-tertiary);
|
434 |
+
border-left-color: var(--success);
|
435 |
+
box-shadow: 0 5px 15px rgba(74, 124, 89, 0.3);
|
436 |
}
|
437 |
|
438 |
.carousel-container {
|
|
|
445 |
position: relative;
|
446 |
user-select: none;
|
447 |
padding: 24px;
|
448 |
+
touch-action: pan-y;
|
449 |
}
|
450 |
|
451 |
.carousel {
|
|
|
454 |
max-width: 500px;
|
455 |
height: 300px;
|
456 |
transform-style: preserve-3d;
|
457 |
+
transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
|
458 |
cursor: grab;
|
459 |
}
|
460 |
|
461 |
.carousel.dragging {
|
462 |
cursor: grabbing;
|
463 |
+
transition: none;
|
464 |
}
|
465 |
|
466 |
.carousel-card {
|
467 |
position: absolute;
|
468 |
width: 100%;
|
469 |
height: 100%;
|
470 |
+
background: var(--bg-secondary);
|
471 |
+
border: 2px solid var(--accent-tertiary);
|
472 |
+
border-radius: 6px;
|
|
|
473 |
padding: 24px;
|
|
|
474 |
display: flex;
|
475 |
flex-direction: column;
|
476 |
gap: 12px;
|
477 |
+
transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
|
478 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
479 |
+
}
|
480 |
+
|
481 |
+
.carousel-card::before {
|
482 |
+
content: '';
|
483 |
+
position: absolute;
|
484 |
+
top: 0;
|
485 |
+
left: 0;
|
486 |
+
right: 0;
|
487 |
+
height: 4px;
|
488 |
+
background: var(--accent-primary);
|
489 |
+
}
|
490 |
+
|
491 |
+
.carousel-card::after {
|
492 |
+
content: '';
|
493 |
+
position: absolute;
|
494 |
+
top: 4px;
|
495 |
+
bottom: 0;
|
496 |
+
right: 0;
|
497 |
+
width: 4px;
|
498 |
+
background: repeating-linear-gradient(
|
499 |
+
to bottom,
|
500 |
+
var(--accent-primary) 0,
|
501 |
+
var(--accent-primary) 10px,
|
502 |
+
transparent 10px,
|
503 |
+
transparent 20px
|
504 |
+
);
|
505 |
+
opacity: 0.5;
|
506 |
}
|
507 |
|
508 |
.carousel-controls, .carousel-indicator {
|
|
|
515 |
width: 14px;
|
516 |
height: 14px;
|
517 |
background: var(--bg-tertiary);
|
518 |
+
border-radius: 2px;
|
519 |
cursor: pointer;
|
520 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
521 |
+
border: 2px solid var(--accent-tertiary);
|
522 |
+
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
|
523 |
}
|
524 |
|
525 |
.carousel-dot.active {
|
526 |
background: var(--accent-primary);
|
|
|
527 |
transform: scale(1.2);
|
528 |
}
|
529 |
|
|
|
534 |
|
535 |
.mode-toggle {
|
536 |
display: flex;
|
537 |
+
background: var(--bg-tertiary);
|
538 |
+
border-radius: 6px;
|
|
|
539 |
padding: 4px;
|
540 |
position: relative;
|
541 |
margin-bottom: 20px;
|
542 |
+
border: 2px solid var(--accent-tertiary);
|
543 |
}
|
544 |
|
545 |
.mode-toggle button {
|
|
|
552 |
z-index: 1;
|
553 |
font-size: 1rem;
|
554 |
font-weight: 600;
|
555 |
+
border-radius: 4px;
|
556 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
557 |
+
box-shadow: none;
|
558 |
}
|
559 |
|
560 |
.mode-toggle button.active {
|
561 |
+
color: var(--bg-primary);
|
562 |
}
|
563 |
|
564 |
.mode-toggle-slider {
|
|
|
566 |
top: 4px;
|
567 |
left: 4px;
|
568 |
height: calc(100% - 8px);
|
569 |
+
background: var(--accent-primary);
|
570 |
+
border-radius: 4px;
|
571 |
+
transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
|
572 |
+
box-shadow: 0 2px 0 var(--accent-tertiary);
|
573 |
}
|
574 |
|
575 |
.dropzone {
|
|
|
578 |
left: 0;
|
579 |
right: 0;
|
580 |
bottom: 0;
|
581 |
+
background: rgba(143, 188, 143, 0.1);
|
|
|
582 |
border: 3px dashed var(--accent-primary);
|
583 |
display: none;
|
584 |
align-items: center;
|
|
|
587 |
font-size: 1.4rem;
|
588 |
font-weight: 600;
|
589 |
z-index: 10;
|
590 |
+
border-radius: 6px;
|
591 |
}
|
592 |
|
593 |
.dropzone.active {
|
|
|
622 |
|
623 |
.chip {
|
624 |
padding: 10px 18px;
|
625 |
+
background: var(--bg-tertiary);
|
626 |
+
border: 1px solid var(--accent-tertiary);
|
627 |
+
border-radius: 4px;
|
|
|
628 |
font-size: 0.9rem;
|
629 |
font-weight: 600;
|
630 |
cursor: pointer;
|
631 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
632 |
color: var(--text-secondary);
|
633 |
+
position: relative;
|
634 |
+
}
|
635 |
+
|
636 |
+
.chip::after {
|
637 |
+
content: '';
|
638 |
+
position: absolute;
|
639 |
+
bottom: 0;
|
640 |
+
right: 0;
|
641 |
+
width: 5px;
|
642 |
+
height: 5px;
|
643 |
+
background: var(--accent-primary);
|
644 |
+
border-radius: 1px;
|
645 |
}
|
646 |
|
647 |
.chip:hover {
|
648 |
background: var(--accent-primary);
|
649 |
+
color: var(--bg-primary);
|
650 |
transform: translateY(-2px);
|
651 |
+
box-shadow: 0 3px 0 var(--accent-tertiary);
|
652 |
+
}
|
653 |
+
|
654 |
+
.chip:active {
|
655 |
+
transform: translateY(1px);
|
656 |
+
box-shadow: 0 0 0 var(--accent-tertiary);
|
657 |
}
|
658 |
|
659 |
.floating-buttons {
|
|
|
668 |
.floating-btn {
|
669 |
width: 48px;
|
670 |
height: 48px;
|
671 |
+
border-radius: 6px;
|
672 |
+
background: var(--bg-tertiary);
|
673 |
+
border: 2px solid var(--accent-tertiary);
|
|
|
674 |
display: flex;
|
675 |
align-items: center;
|
676 |
justify-content: center;
|
677 |
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
678 |
padding: 0;
|
679 |
+
box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
|
680 |
}
|
681 |
|
682 |
.floating-btn:hover {
|
683 |
background: var(--accent-primary);
|
684 |
+
color: var(--bg-primary);
|
685 |
+
transform: translateY(-2px);
|
686 |
+
}
|
687 |
+
|
688 |
+
.floating-btn:active {
|
689 |
+
transform: translateY(2px);
|
690 |
+
box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
|
691 |
}
|
692 |
|
693 |
.code-tools {
|
|
|
701 |
.code-tools button {
|
702 |
padding: 6px 12px;
|
703 |
font-size: 0.85rem;
|
704 |
+
background: var(--bg-tertiary);
|
705 |
+
border: 1px solid var(--accent-tertiary);
|
706 |
+
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
|
707 |
}
|
708 |
|
709 |
pre {
|
710 |
position: relative;
|
711 |
+
background: var(--bg-tertiary);
|
712 |
+
border: 1px solid var(--accent-tertiary);
|
713 |
padding: 20px;
|
714 |
+
border-radius: 6px;
|
715 |
overflow-x: auto;
|
|
|
716 |
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
|
717 |
}
|
718 |
|
|
|
724 |
.image-preview {
|
725 |
max-width: 100%;
|
726 |
max-height: 300px;
|
727 |
+
border-radius: 6px;
|
728 |
margin-top: 12px;
|
729 |
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
|
730 |
+
border: 1px solid var(--accent-tertiary);
|
731 |
+
}
|
732 |
+
|
733 |
+
/* Factory theme specific elements */
|
734 |
+
.rusty-border {
|
735 |
+
position: relative;
|
736 |
+
}
|
737 |
+
|
738 |
+
.rusty-border::after {
|
739 |
+
content: '';
|
740 |
+
position: absolute;
|
741 |
+
top: 0;
|
742 |
+
left: 0;
|
743 |
+
right: 0;
|
744 |
+
bottom: 0;
|
745 |
+
border: 1px solid var(--rust-accent);
|
746 |
+
border-radius: inherit;
|
747 |
+
pointer-events: none;
|
748 |
+
opacity: 0.6;
|
749 |
+
}
|
750 |
+
|
751 |
+
.metal-panel {
|
752 |
+
background-image:
|
753 |
+
linear-gradient(45deg,
|
754 |
+
rgba(108, 123, 116, 0.1) 25%,
|
755 |
+
transparent 25%,
|
756 |
+
transparent 75%,
|
757 |
+
rgba(108, 123, 116, 0.1) 75%,
|
758 |
+
rgba(108, 123, 116, 0.1)),
|
759 |
+
linear-gradient(45deg,
|
760 |
+
rgba(108, 123, 116, 0.1) 25%,
|
761 |
+
transparent 25%,
|
762 |
+
transparent 75%,
|
763 |
+
rgba(108, 123, 116, 0.1) 75%,
|
764 |
+
rgba(108, 123, 116, 0.1));
|
765 |
+
background-size: 10px 10px;
|
766 |
+
background-position: 0 0, 5px 5px;
|
767 |
}
|
768 |
|
769 |
@keyframes fadeInUp {
|
|
|
790 |
width: 100%;
|
791 |
max-height: 40vh;
|
792 |
border-right: none;
|
793 |
+
border-bottom: 2px solid var(--accent-tertiary);
|
794 |
}
|
795 |
|
796 |
.settings-panel.collapsed {
|
|
|
849 |
padding: 8px 14px;
|
850 |
}
|
851 |
|
852 |
+
.form-field select, .form-field textarea, .form-field input, #userInput {
|
853 |
font-size: 16px;
|
854 |
}
|
855 |
}
|
|
|
858 |
<body>
|
859 |
<div class="app-container" id="appContainer">
|
860 |
<div class="settings-panel" id="settingsPanel">
|
861 |
+
<h2 style="font-size: 1.4rem; margin-bottom: 24px; color: var(--accent-primary); font-weight: 700;">βοΈ Control Panel</h2>
|
862 |
<div class="form-field">
|
863 |
<label>π€ Main Model:</label>
|
864 |
<select id="modelSelect">
|
|
|
874 |
</div>
|
875 |
<div class="form-field">
|
876 |
<label>π API Key:</label>
|
877 |
+
<input type="password" id="apiKeyInput" placeholder="Enter your HuggingFace API key">
|
878 |
<p style="font-size: 0.8rem; color: var(--text-secondary); margin-top: 8px;">
|
879 |
π Your API key is stored locally only
|
880 |
</p>
|
881 |
</div>
|
882 |
<div class="form-field">
|
883 |
<label>β‘ Max Tokens:</label>
|
884 |
+
<input type="number" id="maxTokensInput" value="512" min="100" max="2048">
|
885 |
</div>
|
886 |
+
<button id="saveSettingsBtn" class="rusty-border">πΎ Save Settings</button>
|
887 |
</div>
|
888 |
<div class="main-content">
|
889 |
<div class="floating-buttons">
|
|
|
899 |
</div>
|
900 |
|
901 |
<div class="mode-toggle">
|
902 |
+
<button id="carouselModeBtn" class="active">ποΈ Command Center</button>
|
903 |
+
<button id="chatModeBtn">π¬ Terminal</button>
|
904 |
<div class="mode-toggle-slider" id="modeToggleSlider"></div>
|
905 |
</div>
|
906 |
|
907 |
<div id="carouselMode">
|
908 |
<div class="carousel-container">
|
909 |
<div class="carousel" id="promptCarousel">
|
910 |
+
<div class="carousel-card metal-panel" style="transform: rotateY(0deg) translateZ(500px);">
|
911 |
<label>π― Primary System Prompt:</label>
|
912 |
<textarea id="primarySystemPrompt" placeholder="Enter primary system prompt for the AI assistant...">You are a helpful AI assistant that provides clear, accurate, and helpful responses. Focus on practical solutions and detailed explanations.</textarea>
|
913 |
</div>
|
914 |
+
<div class="carousel-card metal-panel" style="transform: rotateY(60deg) translateZ(500px); opacity: 0.8;">
|
915 |
<label>π» Code Template:</label>
|
916 |
<textarea id="codeTemplate" placeholder="Enter code formatting template...">```javascript
|
917 |
// Code implementation
|
|
|
921 |
}
|
922 |
```</textarea>
|
923 |
</div>
|
924 |
+
<div class="carousel-card metal-panel" style="transform: rotateY(120deg) translateZ(500px); opacity: 0.8;">
|
925 |
<label>π Additional Instructions:</label>
|
926 |
<textarea id="additionalInstructions" placeholder="Enter additional instructions for the AI...">Provide working code examples when possible. Explain complex concepts step by step. Use modern best practices.</textarea>
|
927 |
</div>
|
|
|
935 |
<div class="carousel-dot" data-index="1"></div>
|
936 |
<div class="carousel-dot" data-index="2"></div>
|
937 |
</div>
|
938 |
+
<button id="applyPromptBtn" style="margin-top: 24px;">β
Apply Prompts & Switch to Terminal</button>
|
939 |
</div>
|
940 |
</div>
|
941 |
|
|
|
968 |
// Global variables
|
969 |
let isLoading = false;
|
970 |
let currentCarouselIndex = 0;
|
971 |
+
let isDragging = false;
|
972 |
+
let startX = 0;
|
973 |
|
974 |
// Initialize the application
|
975 |
document.addEventListener('DOMContentLoaded', function() {
|
976 |
loadSettings();
|
977 |
setupEventListeners();
|
978 |
+
setupSimpleCarousel();
|
979 |
hljs.highlightAll();
|
980 |
+
|
981 |
+
// Dark mode detection
|
982 |
+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
983 |
+
document.documentElement.classList.add('dark');
|
984 |
+
}
|
985 |
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
986 |
+
if (event.matches) {
|
987 |
+
document.documentElement.classList.add('dark');
|
988 |
+
} else {
|
989 |
+
document.documentElement.classList.remove('dark');
|
990 |
+
}
|
991 |
+
});
|
992 |
});
|
993 |
|
994 |
// Settings management
|
|
|
1030 |
document.getElementById('saveSettingsBtn').addEventListener('click', saveSettings);
|
1031 |
document.getElementById('settingsToggle').addEventListener('click', toggleSettings);
|
1032 |
|
1033 |
+
// Carousel controls - simple direct rotation
|
1034 |
+
document.getElementById('prevCard').addEventListener('click', () => {
|
1035 |
+
rotateCarousel(-1);
|
1036 |
+
});
|
1037 |
+
|
1038 |
+
document.getElementById('nextCard').addEventListener('click', () => {
|
1039 |
+
rotateCarousel(1);
|
1040 |
+
});
|
1041 |
+
|
1042 |
document.getElementById('applyPromptBtn').addEventListener('click', applyPromptsAndSwitchToChat);
|
1043 |
|
1044 |
// Chat controls
|
|
|
1058 |
});
|
1059 |
});
|
1060 |
|
1061 |
+
// Carousel dots - simple direct navigation
|
1062 |
document.querySelectorAll('.carousel-dot').forEach(dot => {
|
1063 |
dot.addEventListener('click', (e) => {
|
1064 |
const index = parseInt(e.target.getAttribute('data-index'));
|
|
|
1066 |
});
|
1067 |
});
|
1068 |
}
|
1069 |
+
|
1070 |
+
// Simple carousel functions with direct animations
|
1071 |
+
function setupSimpleCarousel() {
|
1072 |
+
// Initial setup
|
1073 |
+
updateCarouselPosition();
|
1074 |
+
|
1075 |
+
// Add touch handling for mobile/tablet
|
1076 |
+
const carousel = document.getElementById('promptCarousel');
|
1077 |
+
|
1078 |
+
// Touch events for swiping
|
1079 |
+
carousel.addEventListener('touchstart', handleTouchStart, { passive: true });
|
1080 |
+
carousel.addEventListener('touchend', handleTouchEnd, { passive: true });
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
function handleTouchStart(e) {
|
1084 |
+
startX = e.touches[0].clientX;
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
function handleTouchEnd(e) {
|
1088 |
+
const endX = e.changedTouches[0].clientX;
|
1089 |
+
const diffX = endX - startX;
|
1090 |
+
|
1091 |
+
// If swipe distance is significant, rotate carousel
|
1092 |
+
if (Math.abs(diffX) > 50) {
|
1093 |
+
if (diffX > 0) {
|
1094 |
+
// Swipe right - go to previous card
|
1095 |
+
rotateCarousel(-1);
|
1096 |
+
} else {
|
1097 |
+
// Swipe left - go to next card
|
1098 |
+
rotateCarousel(1);
|
1099 |
+
}
|
1100 |
+
}
|
1101 |
+
}
|
1102 |
|
1103 |
// Mode switching
|
1104 |
function switchMode(mode) {
|
|
|
1125 |
}
|
1126 |
}
|
1127 |
|
1128 |
+
// Simplified carousel functionality
|
|
|
|
|
|
|
|
|
1129 |
function rotateCarousel(direction) {
|
1130 |
const totalCards = 3;
|
1131 |
currentCarouselIndex = (currentCarouselIndex + direction + totalCards) % totalCards;
|
|
|
1140 |
function updateCarouselPosition() {
|
1141 |
const carousel = document.getElementById('promptCarousel');
|
1142 |
const cards = carousel.querySelectorAll('.carousel-card');
|
|
|
1143 |
|
1144 |
+
// Update indicator dots
|
1145 |
+
document.querySelectorAll('.carousel-dot').forEach((dot, index) => {
|
1146 |
+
dot.classList.toggle('active', index === currentCarouselIndex);
|
1147 |
+
});
|
1148 |
+
|
1149 |
+
// Apply smooth transition
|
1150 |
+
carousel.style.transition = 'transform 0.5s ease-out';
|
1151 |
+
|
1152 |
+
// Apply new rotation
|
1153 |
+
const newRotation = -currentCarouselIndex * 60;
|
1154 |
+
carousel.style.transform = `rotateY(${newRotation}deg)`;
|
1155 |
+
|
1156 |
+
// Update each card position
|
1157 |
cards.forEach((card, index) => {
|
1158 |
const angle = (index - currentCarouselIndex) * 60;
|
1159 |
const isActive = index === currentCarouselIndex;
|
1160 |
|
1161 |
+
// Add smooth transition to cards
|
1162 |
+
card.style.transition = 'all 0.5s ease-out';
|
1163 |
card.style.transform = `rotateY(${angle}deg) translateZ(500px)`;
|
1164 |
card.style.opacity = isActive ? '1' : '0.6';
|
1165 |
card.style.zIndex = isActive ? '10' : '1';
|
1166 |
});
|
1167 |
+
|
1168 |
+
// Remove transition after animation completes for better performance
|
1169 |
+
setTimeout(() => {
|
1170 |
+
carousel.style.transition = '';
|
1171 |
+
cards.forEach(card => {
|
1172 |
+
card.style.transition = '';
|
1173 |
+
});
|
1174 |
+
}, 500);
|
1175 |
}
|
1176 |
|
1177 |
function applyPromptsAndSwitchToChat() {
|
|
|
1348 |
}
|
1349 |
</script>
|
1350 |
</body>
|
1351 |
+
</html>
|