Spaces:
Running
Running
Update index.html
Browse files- index.html +72 -3
index.html
CHANGED
|
@@ -116,6 +116,14 @@
|
|
| 116 |
grid-template-columns: 340px 1fr;
|
| 117 |
gap: 32px;
|
| 118 |
align-items: start;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
}
|
| 120 |
|
| 121 |
@media (max-width: 768px) {
|
|
@@ -302,6 +310,9 @@
|
|
| 302 |
/* OUTPUT AREA */
|
| 303 |
.output-area {
|
| 304 |
min-height: 500px;
|
|
|
|
|
|
|
|
|
|
| 305 |
}
|
| 306 |
|
| 307 |
.output-header {
|
|
@@ -422,6 +433,8 @@
|
|
| 422 |
border: 1px solid var(--border);
|
| 423 |
border-radius: 12px;
|
| 424 |
overflow: hidden;
|
|
|
|
|
|
|
| 425 |
}
|
| 426 |
|
| 427 |
.level-card-header {
|
|
@@ -430,6 +443,7 @@
|
|
| 430 |
display: flex;
|
| 431 |
align-items: center;
|
| 432 |
gap: 12px;
|
|
|
|
| 433 |
}
|
| 434 |
|
| 435 |
.level-dot {
|
|
@@ -447,6 +461,11 @@
|
|
| 447 |
font-size: 15px;
|
| 448 |
font-weight: 700;
|
| 449 |
color: var(--heading);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
}
|
| 451 |
|
| 452 |
.level-card-subtitle {
|
|
@@ -454,10 +473,14 @@
|
|
| 454 |
font-size: 11px;
|
| 455 |
color: var(--muted);
|
| 456 |
margin-left: auto;
|
|
|
|
|
|
|
| 457 |
}
|
| 458 |
|
| 459 |
.level-card-body {
|
| 460 |
padding: 24px;
|
|
|
|
|
|
|
| 461 |
}
|
| 462 |
|
| 463 |
/* CONTENT SECTIONS */
|
|
@@ -490,6 +513,8 @@
|
|
| 490 |
font-size: 14px;
|
| 491 |
line-height: 1.75;
|
| 492 |
color: var(--text);
|
|
|
|
|
|
|
| 493 |
}
|
| 494 |
|
| 495 |
.section ul {
|
|
@@ -519,6 +544,11 @@
|
|
| 519 |
line-height: 1.65;
|
| 520 |
color: #c9d1d9;
|
| 521 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 522 |
}
|
| 523 |
|
| 524 |
.code-block-header {
|
|
@@ -571,6 +601,10 @@
|
|
| 571 |
display: flex;
|
| 572 |
align-items: center;
|
| 573 |
gap: 14px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 574 |
}
|
| 575 |
|
| 576 |
.system-banner-icon {
|
|
@@ -633,7 +667,16 @@
|
|
| 633 |
|
| 634 |
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
|
| 635 |
|
| 636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 637 |
.raw-view {
|
| 638 |
display: none;
|
| 639 |
background: #060810;
|
|
@@ -646,8 +689,12 @@
|
|
| 646 |
color: #c9d1d9;
|
| 647 |
white-space: pre-wrap;
|
| 648 |
word-break: break-word;
|
|
|
|
| 649 |
max-height: 600px;
|
| 650 |
overflow-y: auto;
|
|
|
|
|
|
|
|
|
|
| 651 |
}
|
| 652 |
|
| 653 |
.raw-view.visible { display: block; }
|
|
@@ -744,6 +791,9 @@
|
|
| 744 |
<span class="btn-text"></span>
|
| 745 |
</div>
|
| 746 |
</button>
|
|
|
|
|
|
|
|
|
|
| 747 |
</div>
|
| 748 |
</aside>
|
| 749 |
|
|
@@ -752,8 +802,9 @@
|
|
| 752 |
<div class="output-header">
|
| 753 |
<div class="output-title">Generated Prompt</div>
|
| 754 |
<div class="output-actions" id="outputActions" style="display:none">
|
|
|
|
| 755 |
<button class="btn-sm" onclick="toggleRaw()">β Raw</button>
|
| 756 |
-
<button class="btn-sm" onclick="copyAll()">β Copy
|
| 757 |
</div>
|
| 758 |
</div>
|
| 759 |
|
|
@@ -855,12 +906,30 @@ function toggleRaw() {
|
|
| 855 |
document.querySelector('[onclick="toggleRaw()"]').textContent = showingRaw ? 'β Structured' : 'β Raw';
|
| 856 |
}
|
| 857 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 858 |
async function copyAll() {
|
| 859 |
try {
|
| 860 |
await navigator.clipboard.writeText(rawText);
|
| 861 |
const btn = document.querySelector('[onclick="copyAll()"]');
|
| 862 |
btn.textContent = 'β Copied!';
|
| 863 |
-
setTimeout(() => btn.textContent = 'β Copy
|
| 864 |
} catch (e) {}
|
| 865 |
}
|
| 866 |
|
|
|
|
| 116 |
grid-template-columns: 340px 1fr;
|
| 117 |
gap: 32px;
|
| 118 |
align-items: start;
|
| 119 |
+
/* Prevent children from blowing out the grid */
|
| 120 |
+
width: 100%;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
/* Critical: grid children must not exceed their track */
|
| 124 |
+
.layout > * {
|
| 125 |
+
min-width: 0;
|
| 126 |
+
width: 100%;
|
| 127 |
}
|
| 128 |
|
| 129 |
@media (max-width: 768px) {
|
|
|
|
| 310 |
/* OUTPUT AREA */
|
| 311 |
.output-area {
|
| 312 |
min-height: 500px;
|
| 313 |
+
min-width: 0;
|
| 314 |
+
width: 100%;
|
| 315 |
+
overflow: hidden;
|
| 316 |
}
|
| 317 |
|
| 318 |
.output-header {
|
|
|
|
| 433 |
border: 1px solid var(--border);
|
| 434 |
border-radius: 12px;
|
| 435 |
overflow: hidden;
|
| 436 |
+
min-width: 0;
|
| 437 |
+
width: 100%;
|
| 438 |
}
|
| 439 |
|
| 440 |
.level-card-header {
|
|
|
|
| 443 |
display: flex;
|
| 444 |
align-items: center;
|
| 445 |
gap: 12px;
|
| 446 |
+
min-width: 0;
|
| 447 |
}
|
| 448 |
|
| 449 |
.level-dot {
|
|
|
|
| 461 |
font-size: 15px;
|
| 462 |
font-weight: 700;
|
| 463 |
color: var(--heading);
|
| 464 |
+
min-width: 0;
|
| 465 |
+
overflow: hidden;
|
| 466 |
+
text-overflow: ellipsis;
|
| 467 |
+
white-space: nowrap;
|
| 468 |
+
flex: 1;
|
| 469 |
}
|
| 470 |
|
| 471 |
.level-card-subtitle {
|
|
|
|
| 473 |
font-size: 11px;
|
| 474 |
color: var(--muted);
|
| 475 |
margin-left: auto;
|
| 476 |
+
white-space: nowrap;
|
| 477 |
+
flex-shrink: 0;
|
| 478 |
}
|
| 479 |
|
| 480 |
.level-card-body {
|
| 481 |
padding: 24px;
|
| 482 |
+
min-width: 0;
|
| 483 |
+
overflow: hidden;
|
| 484 |
}
|
| 485 |
|
| 486 |
/* CONTENT SECTIONS */
|
|
|
|
| 513 |
font-size: 14px;
|
| 514 |
line-height: 1.75;
|
| 515 |
color: var(--text);
|
| 516 |
+
overflow-wrap: break-word;
|
| 517 |
+
word-break: break-word;
|
| 518 |
}
|
| 519 |
|
| 520 |
.section ul {
|
|
|
|
| 544 |
line-height: 1.65;
|
| 545 |
color: #c9d1d9;
|
| 546 |
position: relative;
|
| 547 |
+
max-width: 100%;
|
| 548 |
+
width: 100%;
|
| 549 |
+
box-sizing: border-box;
|
| 550 |
+
word-break: normal;
|
| 551 |
+
white-space: pre;
|
| 552 |
}
|
| 553 |
|
| 554 |
.code-block-header {
|
|
|
|
| 601 |
display: flex;
|
| 602 |
align-items: center;
|
| 603 |
gap: 14px;
|
| 604 |
+
min-width: 0;
|
| 605 |
+
width: 100%;
|
| 606 |
+
box-sizing: border-box;
|
| 607 |
+
overflow: hidden;
|
| 608 |
}
|
| 609 |
|
| 610 |
.system-banner-icon {
|
|
|
|
| 667 |
|
| 668 |
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
|
| 669 |
|
| 670 |
+
#structuredOutput {
|
| 671 |
+
min-width: 0;
|
| 672 |
+
width: 100%;
|
| 673 |
+
overflow: hidden;
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
.level-panel {
|
| 677 |
+
min-width: 0;
|
| 678 |
+
width: 100%;
|
| 679 |
+
}
|
| 680 |
.raw-view {
|
| 681 |
display: none;
|
| 682 |
background: #060810;
|
|
|
|
| 689 |
color: #c9d1d9;
|
| 690 |
white-space: pre-wrap;
|
| 691 |
word-break: break-word;
|
| 692 |
+
overflow-wrap: break-word;
|
| 693 |
max-height: 600px;
|
| 694 |
overflow-y: auto;
|
| 695 |
+
overflow-x: hidden;
|
| 696 |
+
width: 100%;
|
| 697 |
+
box-sizing: border-box;
|
| 698 |
}
|
| 699 |
|
| 700 |
.raw-view.visible { display: block; }
|
|
|
|
| 791 |
<span class="btn-text"></span>
|
| 792 |
</div>
|
| 793 |
</button>
|
| 794 |
+
<div style="text-align:center;margin-top:12px">
|
| 795 |
+
<button class="btn-sm" style="width:100%;justify-content:center;display:flex" onclick="copyPromptSidebar(this)">β Copy Prompt Only</button>
|
| 796 |
+
</div>
|
| 797 |
</div>
|
| 798 |
</aside>
|
| 799 |
|
|
|
|
| 802 |
<div class="output-header">
|
| 803 |
<div class="output-title">Generated Prompt</div>
|
| 804 |
<div class="output-actions" id="outputActions" style="display:none">
|
| 805 |
+
<button class="btn-sm" onclick="copyPrompt(this)">β Copy Prompt</button>
|
| 806 |
<button class="btn-sm" onclick="toggleRaw()">β Raw</button>
|
| 807 |
+
<button class="btn-sm" onclick="copyAll()">β Copy Output</button>
|
| 808 |
</div>
|
| 809 |
</div>
|
| 810 |
|
|
|
|
| 906 |
document.querySelector('[onclick="toggleRaw()"]').textContent = showingRaw ? 'β Structured' : 'β Raw';
|
| 907 |
}
|
| 908 |
|
| 909 |
+
async function copyPrompt(btn) {
|
| 910 |
+
const systemName = document.getElementById('systemName').value.trim();
|
| 911 |
+
const desc = document.getElementById('systemDesc').value.trim();
|
| 912 |
+
if (!systemName) {
|
| 913 |
+
alert('Enter a system name first.');
|
| 914 |
+
return;
|
| 915 |
+
}
|
| 916 |
+
const prompt = buildPrompt(systemName, desc);
|
| 917 |
+
try {
|
| 918 |
+
await navigator.clipboard.writeText(prompt);
|
| 919 |
+
const label = btn.textContent;
|
| 920 |
+
btn.textContent = 'β Copied!';
|
| 921 |
+
setTimeout(() => btn.textContent = label, 2000);
|
| 922 |
+
} catch (e) {}
|
| 923 |
+
}
|
| 924 |
+
|
| 925 |
+
function copyPromptSidebar(btn) { copyPrompt(btn); }
|
| 926 |
+
|
| 927 |
async function copyAll() {
|
| 928 |
try {
|
| 929 |
await navigator.clipboard.writeText(rawText);
|
| 930 |
const btn = document.querySelector('[onclick="copyAll()"]');
|
| 931 |
btn.textContent = 'β Copied!';
|
| 932 |
+
setTimeout(() => btn.textContent = 'β Copy Output', 2000);
|
| 933 |
} catch (e) {}
|
| 934 |
}
|
| 935 |
|