Update index.html
Browse files- index.html +181 -88
index.html
CHANGED
|
@@ -1,24 +1,30 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>Veo3 JSON Prompt Generator Pro</title>
|
| 7 |
|
| 8 |
-
<!-- Fonts & Styles -->
|
| 9 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
|
| 12 |
<style>
|
| 13 |
:root {
|
| 14 |
--primary-color-start: #4F46E5; /* Indigo */
|
| 15 |
--primary-color-end: #8B5CF6; /* Violet */
|
| 16 |
-
--background-color: #
|
| 17 |
--container-bg: #ffffff;
|
| 18 |
--text-color: #1f2937;
|
| 19 |
--label-color: #374151;
|
| 20 |
-
--border-color: #
|
| 21 |
-
--shadow-color: rgba(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
body {
|
|
@@ -26,65 +32,76 @@
|
|
| 26 |
background-color: var(--background-color);
|
| 27 |
color: var(--text-color);
|
| 28 |
margin: 0;
|
| 29 |
-
padding: 1rem;
|
| 30 |
display: flex;
|
| 31 |
justify-content: center;
|
| 32 |
align-items: flex-start;
|
| 33 |
min-height: 100vh;
|
| 34 |
}
|
| 35 |
|
|
|
|
| 36 |
.container {
|
| 37 |
width: 100%;
|
| 38 |
-
max-width:
|
| 39 |
background-color: var(--container-bg);
|
| 40 |
-
padding:
|
| 41 |
-
border-radius:
|
| 42 |
-
box-shadow: 0
|
| 43 |
border: 1px solid #e5e7eb;
|
| 44 |
-
box-sizing: border-box;
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
-
@media (max-width: 600px) {
|
| 48 |
-
.container { padding: 1.25rem; }
|
| 49 |
}
|
| 50 |
|
|
|
|
| 51 |
h1 {
|
| 52 |
-
font-size:
|
| 53 |
font-weight: 700;
|
| 54 |
-
margin: 0 0
|
| 55 |
text-align: center;
|
| 56 |
background: linear-gradient(90deg, var(--primary-color-start), var(--primary-color-end));
|
| 57 |
-webkit-background-clip: text;
|
| 58 |
-webkit-text-fill-color: transparent;
|
|
|
|
| 59 |
}
|
| 60 |
|
| 61 |
.subtitle {
|
| 62 |
text-align: center;
|
| 63 |
-
font-size: 0.
|
| 64 |
color: #6b7280;
|
| 65 |
-
margin-bottom:
|
| 66 |
}
|
| 67 |
|
| 68 |
label {
|
| 69 |
font-weight: 600;
|
| 70 |
display: block;
|
| 71 |
-
margin-
|
| 72 |
-
margin-bottom: 0.5rem;
|
| 73 |
color: var(--label-color);
|
| 74 |
-
font-size: 0.
|
| 75 |
}
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
select, textarea, input[type="text"] {
|
| 78 |
width: 100%;
|
| 79 |
-
padding: 0.8rem 1rem;
|
| 80 |
-
margin-top: 0.2rem;
|
| 81 |
border-radius: 10px;
|
| 82 |
border: 1px solid var(--border-color);
|
| 83 |
font-size: 1rem;
|
| 84 |
font-family: 'Poppins', sans-serif;
|
| 85 |
-
|
| 86 |
-
background-color: #f9fafb;
|
| 87 |
transition: all 0.2s ease-in-out;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
|
| 90 |
select:focus, textarea:focus, input[type="text"]:focus {
|
|
@@ -94,66 +111,128 @@
|
|
| 94 |
background-color: #fff;
|
| 95 |
}
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
.row {
|
| 98 |
display: grid;
|
| 99 |
grid-template-columns: 1fr 1fr;
|
| 100 |
-
gap:
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
-
.row > div {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
|
|
|
| 105 |
.actions {
|
| 106 |
display: grid;
|
| 107 |
grid-template-columns: 1fr 1fr;
|
| 108 |
-
gap:
|
| 109 |
-
margin-top:
|
| 110 |
}
|
| 111 |
|
| 112 |
button {
|
| 113 |
-
background-image: linear-gradient(
|
| 114 |
color: #fff;
|
| 115 |
border: none;
|
| 116 |
padding: 0.9rem 1.2rem;
|
| 117 |
font-size: 1.05rem;
|
| 118 |
-
font-weight:
|
| 119 |
font-family: 'Poppins', sans-serif;
|
| 120 |
border-radius: 10px;
|
| 121 |
cursor: pointer;
|
| 122 |
width: 100%;
|
| 123 |
-
transition: transform 0.
|
| 124 |
-
box-shadow: 0 4px 15px rgba(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
-
button:
|
| 128 |
-
|
|
|
|
|
|
|
| 129 |
|
| 130 |
.secondary {
|
| 131 |
-
background: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
|
|
|
|
| 134 |
pre {
|
| 135 |
-
background:
|
| 136 |
color: #e5e7eb;
|
| 137 |
-
padding:
|
| 138 |
white-space: pre-wrap;
|
| 139 |
word-break: break-word;
|
| 140 |
border-radius: 12px;
|
| 141 |
-
margin-top:
|
| 142 |
-
font-family:
|
| 143 |
-
font-size: 0.
|
| 144 |
-
line-height: 1.
|
| 145 |
-
border: 1px solid #
|
| 146 |
}
|
| 147 |
|
| 148 |
-
.note { font-size: 0.8rem; color: #6b7280; margin-top: 0.25rem; }
|
| 149 |
-
|
| 150 |
.toast {
|
| 151 |
-
position: fixed;
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
}
|
| 155 |
|
| 156 |
-
.toast.show {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
</style>
|
| 158 |
</head>
|
| 159 |
<body>
|
|
@@ -194,13 +273,12 @@
|
|
| 194 |
</div>
|
| 195 |
</div>
|
| 196 |
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
<input type="checkbox" id="useLookPreset" checked />
|
| 201 |
Enable Character Look Preset
|
| 202 |
</label>
|
| 203 |
-
<div id="lookPresetFields" class="row" style="margin-top:
|
| 204 |
<div>
|
| 205 |
<label for="skinTone">π§π½β Skin Tone</label>
|
| 206 |
<select id="skinTone">
|
|
@@ -223,10 +301,11 @@
|
|
| 223 |
</select>
|
| 224 |
</div>
|
| 225 |
</div>
|
| 226 |
-
<div class="note">These presets add culturally-accurate wardrobe, hair, makeup, and accessories
|
| 227 |
</div>
|
| 228 |
|
| 229 |
-
|
|
|
|
| 230 |
<select id="taskFocus">
|
| 231 |
<option>Lesson Planning</option>
|
| 232 |
<option>Quiz Generator</option>
|
|
@@ -243,7 +322,7 @@
|
|
| 243 |
<option>Time-Saver Workflow</option>
|
| 244 |
<option value="custom">π οΈ Custom</option>
|
| 245 |
</select>
|
| 246 |
-
<div id="customTaskWrapper" style="display:none; margin-top:0.
|
| 247 |
<input type="text" id="customTask" placeholder="Enter your custom task focus" />
|
| 248 |
</div>
|
| 249 |
</div>
|
|
@@ -273,7 +352,7 @@
|
|
| 273 |
<label for="aspectRatio">πΌοΈ Aspect Ratio</label>
|
| 274 |
<select id="aspectRatio">
|
| 275 |
<option>16:9</option>
|
| 276 |
-
<option>9:16</option>
|
| 277 |
<option>1:1</option>
|
| 278 |
</select>
|
| 279 |
</div>
|
|
@@ -401,13 +480,12 @@
|
|
| 401 |
</div>
|
| 402 |
</div>
|
| 403 |
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
<input type="checkbox" id="useVoiceover" checked />
|
| 408 |
Enable Voiceover
|
| 409 |
</label>
|
| 410 |
-
<div id="voFields" class="row" style="margin-top:
|
| 411 |
<div>
|
| 412 |
<label for="voLanguage">π Language</label>
|
| 413 |
<select id="voLanguage">
|
|
@@ -447,8 +525,10 @@
|
|
| 447 |
</select>
|
| 448 |
</div>
|
| 449 |
</div>
|
| 450 |
-
<
|
| 451 |
-
|
|
|
|
|
|
|
| 452 |
</div>
|
| 453 |
|
| 454 |
<div class="row">
|
|
@@ -498,7 +578,7 @@
|
|
| 498 |
</div>
|
| 499 |
</div>
|
| 500 |
|
| 501 |
-
<div>
|
| 502 |
<label for="negativePrompt">π« Negative Prompt (Exclude Things)</label>
|
| 503 |
<textarea id="negativePrompt" rows="3" placeholder="e.g., no logos, no text overlays, no watermark, no extra limbs"></textarea>
|
| 504 |
<div class="note">Tip: Keep negatives short and specific for best results.</div>
|
|
@@ -619,15 +699,23 @@
|
|
| 619 |
};
|
| 620 |
}
|
| 621 |
|
| 622 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 623 |
function updateVoUiVisibility(){
|
| 624 |
const enabled = $("useVoiceover")?.checked;
|
| 625 |
if($("voFields")) $("voFields").style.display = enabled ? "grid" : "none";
|
| 626 |
-
|
|
|
|
| 627 |
}
|
| 628 |
|
| 629 |
-
}
|
| 630 |
-
|
| 631 |
function handleTaskFocusChange() {
|
| 632 |
const selected = $("taskFocus").value;
|
| 633 |
$("customTaskWrapper").style.display = selected === "custom" ? "block" : "none";
|
|
@@ -703,7 +791,7 @@
|
|
| 703 |
voice: $("voGender")?.value,
|
| 704 |
tone: $("voTone")?.value,
|
| 705 |
pace: $("voPace")?.value,
|
| 706 |
-
script: $("voScript")?.value
|
| 707 |
};
|
| 708 |
|
| 709 |
const prompt = {
|
|
@@ -741,7 +829,7 @@
|
|
| 741 |
|
| 742 |
async function copyToClipboard() {
|
| 743 |
const text = $("output").textContent || "";
|
| 744 |
-
if (!text.trim()) { showToast("Nothing to copy yet"); return; }
|
| 745 |
try {
|
| 746 |
await navigator.clipboard.writeText(text);
|
| 747 |
showToast("β
Prompt copied to clipboard!");
|
|
@@ -758,19 +846,24 @@
|
|
| 758 |
function showToast(msg) {
|
| 759 |
const t = $("toast");
|
| 760 |
t.textContent = msg; t.classList.add('show');
|
| 761 |
-
setTimeout(() => t.classList.remove('show'),
|
| 762 |
-
}
|
| 763 |
-
|
| 764 |
-
//
|
| 765 |
-
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 774 |
</script>
|
| 775 |
</body>
|
| 776 |
-
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="ur">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>Veo3 JSON Prompt Generator Pro</title>
|
| 7 |
|
|
|
|
| 8 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 11 |
<style>
|
| 12 |
:root {
|
| 13 |
--primary-color-start: #4F46E5; /* Indigo */
|
| 14 |
--primary-color-end: #8B5CF6; /* Violet */
|
| 15 |
+
--background-color: #f4f4f9; /* Lighter, softer background */
|
| 16 |
--container-bg: #ffffff;
|
| 17 |
--text-color: #1f2937;
|
| 18 |
--label-color: #374151;
|
| 19 |
+
--border-color: #ddd6fe; /* Light violet for borders */
|
| 20 |
+
--shadow-color: rgba(79, 70, 229, 0.1);
|
| 21 |
+
--input-bg: #fafaff;
|
| 22 |
+
--dark-bg: #0f172a;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* --- General Setup --- */
|
| 26 |
+
*, *::before, *::after {
|
| 27 |
+
box-sizing: border-box;
|
| 28 |
}
|
| 29 |
|
| 30 |
body {
|
|
|
|
| 32 |
background-color: var(--background-color);
|
| 33 |
color: var(--text-color);
|
| 34 |
margin: 0;
|
| 35 |
+
padding: 2rem 1rem;
|
| 36 |
display: flex;
|
| 37 |
justify-content: center;
|
| 38 |
align-items: flex-start;
|
| 39 |
min-height: 100vh;
|
| 40 |
}
|
| 41 |
|
| 42 |
+
/* --- Main Container --- */
|
| 43 |
.container {
|
| 44 |
width: 100%;
|
| 45 |
+
max-width: 800px;
|
| 46 |
background-color: var(--container-bg);
|
| 47 |
+
padding: 2.5rem;
|
| 48 |
+
border-radius: 20px;
|
| 49 |
+
box-shadow: 0 12px 35px var(--shadow-color);
|
| 50 |
border: 1px solid #e5e7eb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
}
|
| 52 |
|
| 53 |
+
/* --- Typography --- */
|
| 54 |
h1 {
|
| 55 |
+
font-size: 2.25rem;
|
| 56 |
font-weight: 700;
|
| 57 |
+
margin: 0 0 0.5rem 0;
|
| 58 |
text-align: center;
|
| 59 |
background: linear-gradient(90deg, var(--primary-color-start), var(--primary-color-end));
|
| 60 |
-webkit-background-clip: text;
|
| 61 |
-webkit-text-fill-color: transparent;
|
| 62 |
+
line-height: 1.2;
|
| 63 |
}
|
| 64 |
|
| 65 |
.subtitle {
|
| 66 |
text-align: center;
|
| 67 |
+
font-size: 0.95rem;
|
| 68 |
color: #6b7280;
|
| 69 |
+
margin-bottom: 2rem;
|
| 70 |
}
|
| 71 |
|
| 72 |
label {
|
| 73 |
font-weight: 600;
|
| 74 |
display: block;
|
| 75 |
+
margin-bottom: 0.6rem;
|
|
|
|
| 76 |
color: var(--label-color);
|
| 77 |
+
font-size: 0.9rem;
|
| 78 |
}
|
| 79 |
|
| 80 |
+
.note {
|
| 81 |
+
font-size: 0.85rem;
|
| 82 |
+
color: #6b7280;
|
| 83 |
+
margin-top: 0.5rem;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
/* --- Form Elements --- */
|
| 87 |
select, textarea, input[type="text"] {
|
| 88 |
width: 100%;
|
| 89 |
+
padding: 0.8rem 1.1rem;
|
|
|
|
| 90 |
border-radius: 10px;
|
| 91 |
border: 1px solid var(--border-color);
|
| 92 |
font-size: 1rem;
|
| 93 |
font-family: 'Poppins', sans-serif;
|
| 94 |
+
background-color: var(--input-bg);
|
|
|
|
| 95 |
transition: all 0.2s ease-in-out;
|
| 96 |
+
appearance: none; /* For custom select arrow */
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
select {
|
| 100 |
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
| 101 |
+
background-position: right 0.7rem center;
|
| 102 |
+
background-repeat: no-repeat;
|
| 103 |
+
background-size: 1.5em 1.5em;
|
| 104 |
+
padding-right: 2.5rem;
|
| 105 |
}
|
| 106 |
|
| 107 |
select:focus, textarea:focus, input[type="text"]:focus {
|
|
|
|
| 111 |
background-color: #fff;
|
| 112 |
}
|
| 113 |
|
| 114 |
+
/* --- Layout & Grouping --- */
|
| 115 |
+
.form-section {
|
| 116 |
+
margin-top: 1.5rem;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
.row {
|
| 120 |
display: grid;
|
| 121 |
grid-template-columns: 1fr 1fr;
|
| 122 |
+
gap: 1.5rem;
|
| 123 |
+
margin-top: 1.5rem;
|
| 124 |
}
|
| 125 |
|
| 126 |
+
.row > div {
|
| 127 |
+
width: 100%;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
/* Special sections for better visual grouping */
|
| 131 |
+
#lookPresetBlock, #voiceoverBlock {
|
| 132 |
+
background-color: #f9f8ff;
|
| 133 |
+
padding: 1rem 1.5rem;
|
| 134 |
+
border-radius: 12px;
|
| 135 |
+
margin-top: 1.5rem;
|
| 136 |
+
border: 1px solid var(--border-color);
|
| 137 |
+
}
|
| 138 |
+
#lookPresetBlock > label, #voiceoverBlock > label {
|
| 139 |
+
font-size: 1rem;
|
| 140 |
+
color: var(--primary-color-start);
|
| 141 |
+
}
|
| 142 |
|
| 143 |
+
/* --- Buttons & Actions --- */
|
| 144 |
.actions {
|
| 145 |
display: grid;
|
| 146 |
grid-template-columns: 1fr 1fr;
|
| 147 |
+
gap: 1rem;
|
| 148 |
+
margin-top: 2rem;
|
| 149 |
}
|
| 150 |
|
| 151 |
button {
|
| 152 |
+
background-image: linear-gradient(95deg, var(--primary-color-start), var(--primary-color-end));
|
| 153 |
color: #fff;
|
| 154 |
border: none;
|
| 155 |
padding: 0.9rem 1.2rem;
|
| 156 |
font-size: 1.05rem;
|
| 157 |
+
font-weight: 600;
|
| 158 |
font-family: 'Poppins', sans-serif;
|
| 159 |
border-radius: 10px;
|
| 160 |
cursor: pointer;
|
| 161 |
width: 100%;
|
| 162 |
+
transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
|
| 163 |
+
box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
button:hover {
|
| 167 |
+
transform: translateY(-3px);
|
| 168 |
+
box-shadow: 0 7px 20px rgba(79, 70, 229, 0.25);
|
| 169 |
}
|
| 170 |
|
| 171 |
+
button:active {
|
| 172 |
+
transform: translateY(0);
|
| 173 |
+
opacity: 0.9;
|
| 174 |
+
}
|
| 175 |
|
| 176 |
.secondary {
|
| 177 |
+
background: #374151;
|
| 178 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
|
| 179 |
+
}
|
| 180 |
+
.secondary:hover {
|
| 181 |
+
background: #1f2937;
|
| 182 |
+
box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
|
| 183 |
}
|
| 184 |
|
| 185 |
+
/* --- Output & Toast --- */
|
| 186 |
pre {
|
| 187 |
+
background: var(--dark-bg);
|
| 188 |
color: #e5e7eb;
|
| 189 |
+
padding: 1.25rem;
|
| 190 |
white-space: pre-wrap;
|
| 191 |
word-break: break-word;
|
| 192 |
border-radius: 12px;
|
| 193 |
+
margin-top: 2rem;
|
| 194 |
+
font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
|
| 195 |
+
font-size: 0.9rem;
|
| 196 |
+
line-height: 1.7;
|
| 197 |
+
border: 1px solid #374151;
|
| 198 |
}
|
| 199 |
|
|
|
|
|
|
|
| 200 |
.toast {
|
| 201 |
+
position: fixed;
|
| 202 |
+
right: 20px;
|
| 203 |
+
bottom: 20px;
|
| 204 |
+
background: linear-gradient(95deg, var(--primary-color-start), var(--primary-color-end));
|
| 205 |
+
color: #fff;
|
| 206 |
+
padding: 12px 18px;
|
| 207 |
+
border-radius: 10px;
|
| 208 |
+
opacity: 0;
|
| 209 |
+
transform: translateY(15px);
|
| 210 |
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
|
| 211 |
+
transition: opacity .2s ease, transform .2s ease;
|
| 212 |
+
font-size: 0.95rem;
|
| 213 |
+
font-weight: 500;
|
| 214 |
+
z-index: 1000;
|
| 215 |
}
|
| 216 |
|
| 217 |
+
.toast.show {
|
| 218 |
+
opacity: 1;
|
| 219 |
+
transform: translateY(0);
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
/* --- Responsive (Mobile-Friendly) Design --- */
|
| 223 |
+
@media (max-width: 768px) {
|
| 224 |
+
body { padding: 1rem 0.5rem; }
|
| 225 |
+
.container { padding: 1.5rem; }
|
| 226 |
+
h1 { font-size: 1.75rem; }
|
| 227 |
+
|
| 228 |
+
.row, .actions {
|
| 229 |
+
grid-template-columns: 1fr;
|
| 230 |
+
gap: 1.25rem;
|
| 231 |
+
}
|
| 232 |
+
.form-section, .row, #lookPresetBlock, #voiceoverBlock {
|
| 233 |
+
margin-top: 1.25rem;
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
</style>
|
| 237 |
</head>
|
| 238 |
<body>
|
|
|
|
| 273 |
</div>
|
| 274 |
</div>
|
| 275 |
|
| 276 |
+
<div id="lookPresetBlock">
|
| 277 |
+
<label>
|
| 278 |
+
<input type="checkbox" id="useLookPreset" checked style="margin-right: 8px; vertical-align: middle;">
|
|
|
|
| 279 |
Enable Character Look Preset
|
| 280 |
</label>
|
| 281 |
+
<div id="lookPresetFields" class="row" style="margin-top:1rem;">
|
| 282 |
<div>
|
| 283 |
<label for="skinTone">π§π½β Skin Tone</label>
|
| 284 |
<select id="skinTone">
|
|
|
|
| 301 |
</select>
|
| 302 |
</div>
|
| 303 |
</div>
|
| 304 |
+
<div class="note">These presets add culturally-accurate wardrobe, hair, makeup, and accessories.</div>
|
| 305 |
</div>
|
| 306 |
|
| 307 |
+
<div class="form-section">
|
| 308 |
+
<label for="taskFocus">π Scene Title / Task Focus</label>
|
| 309 |
<select id="taskFocus">
|
| 310 |
<option>Lesson Planning</option>
|
| 311 |
<option>Quiz Generator</option>
|
|
|
|
| 322 |
<option>Time-Saver Workflow</option>
|
| 323 |
<option value="custom">π οΈ Custom</option>
|
| 324 |
</select>
|
| 325 |
+
<div id="customTaskWrapper" style="display:none; margin-top:0.75rem;">
|
| 326 |
<input type="text" id="customTask" placeholder="Enter your custom task focus" />
|
| 327 |
</div>
|
| 328 |
</div>
|
|
|
|
| 352 |
<label for="aspectRatio">πΌοΈ Aspect Ratio</label>
|
| 353 |
<select id="aspectRatio">
|
| 354 |
<option>16:9</option>
|
| 355 |
+
<option selected>9:16</option>
|
| 356 |
<option>1:1</option>
|
| 357 |
</select>
|
| 358 |
</div>
|
|
|
|
| 480 |
</div>
|
| 481 |
</div>
|
| 482 |
|
| 483 |
+
<div id="voiceoverBlock">
|
| 484 |
+
<label>
|
| 485 |
+
<input type="checkbox" id="useVoiceover" checked style="margin-right: 8px; vertical-align: middle;">
|
|
|
|
| 486 |
Enable Voiceover
|
| 487 |
</label>
|
| 488 |
+
<div id="voFields" class="row" style="margin-top:1rem;">
|
| 489 |
<div>
|
| 490 |
<label for="voLanguage">π Language</label>
|
| 491 |
<select id="voLanguage">
|
|
|
|
| 525 |
</select>
|
| 526 |
</div>
|
| 527 |
</div>
|
| 528 |
+
<div class="form-section">
|
| 529 |
+
<label for="voScript">π Voiceover Script (optional)</label>
|
| 530 |
+
<textarea id="voScript" rows="3" placeholder="Write your VO script here... or leave empty to generate later"></textarea>
|
| 531 |
+
</div>
|
| 532 |
</div>
|
| 533 |
|
| 534 |
<div class="row">
|
|
|
|
| 578 |
</div>
|
| 579 |
</div>
|
| 580 |
|
| 581 |
+
<div class="form-section">
|
| 582 |
<label for="negativePrompt">π« Negative Prompt (Exclude Things)</label>
|
| 583 |
<textarea id="negativePrompt" rows="3" placeholder="e.g., no logos, no text overlays, no watermark, no extra limbs"></textarea>
|
| 584 |
<div class="note">Tip: Keep negatives short and specific for best results.</div>
|
|
|
|
| 699 |
};
|
| 700 |
}
|
| 701 |
|
| 702 |
+
function updateLookUiVisibility() {
|
| 703 |
+
const type = $("characterType")?.value;
|
| 704 |
+
const usePreset = $("useLookPreset")?.checked;
|
| 705 |
+
const showBlock = usePreset && !isProduct(type);
|
| 706 |
+
const showHeadCover = showBlock && isFemaleChar(type);
|
| 707 |
+
|
| 708 |
+
if ($("lookPresetFields")) $("lookPresetFields").style.display = showBlock ? "grid" : "none";
|
| 709 |
+
if ($("headCoverWrap")) $("headCoverWrap").style.display = showHeadCover ? "block" : "none";
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
function updateVoUiVisibility(){
|
| 713 |
const enabled = $("useVoiceover")?.checked;
|
| 714 |
if($("voFields")) $("voFields").style.display = enabled ? "grid" : "none";
|
| 715 |
+
const voScriptParent = $("voScript")?.parentElement;
|
| 716 |
+
if(voScriptParent) voScriptParent.style.display = enabled ? "block" : "none";
|
| 717 |
}
|
| 718 |
|
|
|
|
|
|
|
| 719 |
function handleTaskFocusChange() {
|
| 720 |
const selected = $("taskFocus").value;
|
| 721 |
$("customTaskWrapper").style.display = selected === "custom" ? "block" : "none";
|
|
|
|
| 791 |
voice: $("voGender")?.value,
|
| 792 |
tone: $("voTone")?.value,
|
| 793 |
pace: $("voPace")?.value,
|
| 794 |
+
script: ($("voScript")?.value || "").trim()
|
| 795 |
};
|
| 796 |
|
| 797 |
const prompt = {
|
|
|
|
| 829 |
|
| 830 |
async function copyToClipboard() {
|
| 831 |
const text = $("output").textContent || "";
|
| 832 |
+
if (!text.trim() || text.trim() === "{}") { showToast("Nothing to copy yet"); return; }
|
| 833 |
try {
|
| 834 |
await navigator.clipboard.writeText(text);
|
| 835 |
showToast("β
Prompt copied to clipboard!");
|
|
|
|
| 846 |
function showToast(msg) {
|
| 847 |
const t = $("toast");
|
| 848 |
t.textContent = msg; t.classList.add('show');
|
| 849 |
+
setTimeout(() => t.classList.remove('show'), 2000);
|
| 850 |
+
}
|
| 851 |
+
|
| 852 |
+
// --- Initialize & Attach Listeners ---
|
| 853 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 854 |
+
$("taskFocus").addEventListener('change', handleTaskFocusChange);
|
| 855 |
+
$("characterType").addEventListener('change', updateLookUiVisibility);
|
| 856 |
+
$("useLookPreset").addEventListener('change', updateLookUiVisibility);
|
| 857 |
+
$("useVoiceover").addEventListener('change', updateVoUiVisibility);
|
| 858 |
+
|
| 859 |
+
// Initial UI setup
|
| 860 |
+
handleTaskFocusChange();
|
| 861 |
+
updateLookUiVisibility();
|
| 862 |
+
updateVoUiVisibility();
|
| 863 |
+
|
| 864 |
+
// Generate a starter prompt on page load
|
| 865 |
+
generatePrompt();
|
| 866 |
+
});
|
| 867 |
</script>
|
| 868 |
</body>
|
| 869 |
+
</html>
|