Spaces:
Running
Running
Update index.html
Browse files- index.html +91 -264
index.html
CHANGED
|
@@ -6,36 +6,34 @@
|
|
| 6 |
<title>coachproai • CourseMaster Prompt Builder</title>
|
| 7 |
<style>
|
| 8 |
:root{
|
| 9 |
-
--primary-color-start:#4F46E5;
|
| 10 |
-
--primary-color-end:#8B5CF6;
|
| 11 |
--background-color:#f8f9fc;
|
| 12 |
--container-bg:#ffffff;
|
| 13 |
-
--text-color:#1f2937;
|
| 14 |
-
--label-color:#374151;
|
| 15 |
-
--border-color:#d1d5db;
|
| 16 |
--shadow-color:rgba(0,0,0,0.08);
|
| 17 |
}
|
| 18 |
-
|
| 19 |
*{box-sizing:border-box}
|
| 20 |
-
html,body{height:100%}
|
| 21 |
body{
|
| 22 |
margin:0;
|
| 23 |
-
font-family:system-ui
|
| 24 |
background:var(--background-color);
|
| 25 |
color:var(--text-color);
|
| 26 |
-
padding:
|
| 27 |
display:flex;
|
| 28 |
-
align-items:flex-start;
|
| 29 |
justify-content:center;
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
-
|
| 32 |
.app{
|
| 33 |
width:100%;
|
| 34 |
-
max-width:
|
| 35 |
background:var(--container-bg);
|
| 36 |
-
padding:
|
| 37 |
-
border-radius:
|
| 38 |
-
box-shadow:0
|
| 39 |
position:relative;
|
| 40 |
border:1px solid var(--border-color);
|
| 41 |
}
|
|
@@ -43,15 +41,14 @@
|
|
| 43 |
content:"";
|
| 44 |
position:absolute;
|
| 45 |
inset:-2px -2px auto -2px;
|
| 46 |
-
height:
|
| 47 |
-
border-top-left-radius:
|
| 48 |
-
border-top-right-radius:
|
| 49 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 50 |
}
|
| 51 |
-
|
| 52 |
h1{
|
| 53 |
-
margin:0 0
|
| 54 |
-
font-size:
|
| 55 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 56 |
-webkit-background-clip:text;
|
| 57 |
background-clip:text;
|
|
@@ -59,128 +56,44 @@
|
|
| 59 |
font-weight:800;
|
| 60 |
text-align:center;
|
| 61 |
}
|
| 62 |
-
.subtitle{
|
| 63 |
-
|
| 64 |
-
color:#6b7280;
|
| 65 |
-
font-size:.9rem;
|
| 66 |
-
margin-bottom:18px;
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
.label{
|
| 70 |
-
color:var(--label-color);
|
| 71 |
-
font-weight:600;
|
| 72 |
-
margin-bottom:6px;
|
| 73 |
-
display:block;
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
.input, select, textarea{
|
| 77 |
-
width:100%;
|
| 78 |
-
|
| 79 |
-
border:1px solid var(--border-color);
|
| 80 |
-
border-radius:10px;
|
| 81 |
-
background:#fff;
|
| 82 |
-
color:var(--text-color);
|
| 83 |
-
transition:box-shadow .15s ease, border-color .15s ease;
|
| 84 |
}
|
| 85 |
-
.input:focus,
|
| 86 |
-
outline:none;
|
| 87 |
-
border-color:var(--primary-color-start);
|
| 88 |
box-shadow:0 0 0 4px rgba(79,70,229,.15);
|
| 89 |
}
|
| 90 |
-
|
| 91 |
-
.
|
| 92 |
-
|
| 93 |
-
.toggles{
|
| 94 |
-
display:flex;
|
| 95 |
-
flex-wrap:wrap;
|
| 96 |
-
gap:8px;
|
| 97 |
-
}
|
| 98 |
.toggle{
|
| 99 |
-
border:1px solid var(--border-color);
|
| 100 |
-
|
| 101 |
-
color:var(--text-color);
|
| 102 |
-
padding:8px 12px;
|
| 103 |
-
border-radius:10px;
|
| 104 |
-
cursor:pointer;
|
| 105 |
-
transition:transform .05s ease, box-shadow .15s ease, border-color .15s ease;
|
| 106 |
-
font-weight:600;
|
| 107 |
-
}
|
| 108 |
-
.toggle:focus{
|
| 109 |
-
outline:none;
|
| 110 |
-
box-shadow:0 0 0 4px rgba(79,70,229,.15);
|
| 111 |
}
|
| 112 |
-
.toggle[aria-pressed="true"]
|
| 113 |
-
|
| 114 |
-
color:#fff;
|
| 115 |
-
border-color:transparent;
|
| 116 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 117 |
}
|
| 118 |
-
.
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
| 122 |
.btn{
|
| 123 |
-
display:inline-flex;
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
gap:8px;
|
| 127 |
-
font-weight:700; /* bold 1.1–1.5em */
|
| 128 |
-
font-size:1.05rem;
|
| 129 |
-
border:none;
|
| 130 |
-
color:#fff;
|
| 131 |
-
padding:12px 16px;
|
| 132 |
-
border-radius:12px;
|
| 133 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 134 |
-
cursor:pointer;
|
| 135 |
-
transition:filter .15s ease, transform .05s ease, box-shadow .15s ease;
|
| 136 |
}
|
| 137 |
-
.btn:hover{filter:brightness(0.98)}
|
| 138 |
-
.btn:active{transform:translateY(1px)}
|
| 139 |
-
.btn:focus{
|
| 140 |
-
outline:none;
|
| 141 |
-
box-shadow:0 0 0 4px rgba(79,70,229,.15);
|
| 142 |
-
}
|
| 143 |
-
.btn.secondary{
|
| 144 |
-
background:#f3f4f6;
|
| 145 |
-
color:#111827;
|
| 146 |
-
border:1px solid var(--border-color);
|
| 147 |
-
}
|
| 148 |
-
|
| 149 |
.btn.hidden{display:none}
|
| 150 |
-
|
| 151 |
-
.
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
padding:14px
|
| 155 |
-
|
| 156 |
-
min-height:110px;
|
| 157 |
-
white-space:pre-wrap;
|
| 158 |
-
}
|
| 159 |
-
|
| 160 |
-
.cta-row{
|
| 161 |
-
margin-top:12px;
|
| 162 |
-
display:flex;
|
| 163 |
-
gap:10px;
|
| 164 |
-
flex-wrap:wrap;
|
| 165 |
-
}
|
| 166 |
-
|
| 167 |
-
.hint{
|
| 168 |
-
margin-top:8px;
|
| 169 |
-
color:#6b7280;
|
| 170 |
-
font-size:.9rem;
|
| 171 |
-
min-height:1.2em;
|
| 172 |
-
}
|
| 173 |
-
|
| 174 |
-
.footer{
|
| 175 |
-
margin-top:18px;
|
| 176 |
-
text-align:center;
|
| 177 |
-
color:#9ca3af;
|
| 178 |
-
font-size:.8rem;
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
@media (max-width:420px){
|
| 182 |
-
body{padding:14px}
|
| 183 |
-
.app{padding:22px}
|
| 184 |
.btn{width:100%}
|
| 185 |
.cta-row{flex-direction:column}
|
| 186 |
}
|
|
@@ -189,15 +102,13 @@
|
|
| 189 |
<body>
|
| 190 |
<main class="app" role="application" aria-labelledby="title">
|
| 191 |
<h1 id="title">CourseMaster Prompt Builder</h1>
|
| 192 |
-
<p class="subtitle"
|
| 193 |
|
| 194 |
-
<!-- Short input -->
|
| 195 |
<section class="top-input">
|
| 196 |
<label class="label" for="topic">Topic</label>
|
| 197 |
-
<input id="topic" class="input" type="text" placeholder="e.g., Personal Branding on Social Media"
|
| 198 |
</section>
|
| 199 |
|
| 200 |
-
<!-- Options -->
|
| 201 |
<section class="options" aria-label="Options">
|
| 202 |
<div class="group" role="group" aria-label="Audience">
|
| 203 |
<span class="label">Audience</span>
|
|
@@ -254,177 +165,93 @@
|
|
| 254 |
</div>
|
| 255 |
</div>
|
| 256 |
|
| 257 |
-
<div class="group
|
| 258 |
<label for="duration" class="label">Duration</label>
|
| 259 |
<input id="duration" class="input" type="text" placeholder="e.g., 8 weeks" />
|
| 260 |
-
|
| 261 |
<label for="localization" class="label">Localization</label>
|
| 262 |
<select id="localization" class="input">
|
| 263 |
-
<option>Auto</option>
|
| 264 |
-
<option>Pakistan</option>
|
| 265 |
-
<option>GCC</option>
|
| 266 |
-
<option>Global</option>
|
| 267 |
</select>
|
| 268 |
-
|
| 269 |
<label for="export" class="label">Export</label>
|
| 270 |
<select id="export" class="input">
|
| 271 |
-
<option>PDF</option>
|
| 272 |
-
<option>DOCX</option>
|
| 273 |
-
<option>HTML</option>
|
| 274 |
</select>
|
| 275 |
</div>
|
| 276 |
|
| 277 |
<div class="group" role="group" aria-label="Add-ons">
|
| 278 |
<span class="label">Add-ons</span>
|
| 279 |
<div class="toggles multi" data-name="addons">
|
| 280 |
-
<button class="toggle" type="button" aria-pressed="false"
|
| 281 |
-
<button class="toggle" type="button" aria-pressed="false"
|
| 282 |
-
<button class="toggle" type="button" aria-pressed="false"
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
</section>
|
| 286 |
|
| 287 |
-
<!-- Long textarea + primary action -->
|
| 288 |
<section class="notes">
|
| 289 |
<label class="label" for="notes">Notes</label>
|
| 290 |
-
<textarea id="notes" class="textarea" rows="6" placeholder="Special requirements, target platform, constraints, tools, etc.
|
| 291 |
-
<button id="build" class="btn start" type="button" aria-label="Build Prompt">Build Prompt</button>
|
| 292 |
</section>
|
| 293 |
|
| 294 |
-
<!-- Response / Preview -->
|
| 295 |
<section class="response">
|
| 296 |
<span class="label">Prompt Preview</span>
|
| 297 |
<pre id="out" class="out" role="status" aria-live="polite"></pre>
|
| 298 |
<div class="cta-row">
|
| 299 |
-
<button id="copy" class="btn cta hidden" type="button"
|
| 300 |
-
<button id="copyOpen" class="btn cta hidden" type="button"
|
| 301 |
</div>
|
| 302 |
-
<div class="hint" id="hint" aria-live="polite"
|
| 303 |
</section>
|
| 304 |
|
| 305 |
-
<div class="footer"
|
| 306 |
</main>
|
| 307 |
|
| 308 |
<script>
|
| 309 |
-
|
| 310 |
-
const
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
group.addEventListener("click", e => {
|
| 318 |
-
if (!e.target.classList.contains("toggle")) return;
|
| 319 |
-
const btn = e.target;
|
| 320 |
-
const isMulti = group.classList.contains("multi");
|
| 321 |
-
if (!isMulti){
|
| 322 |
-
$$(".toggle", group).forEach(b => b.setAttribute("aria-pressed","false"));
|
| 323 |
-
}
|
| 324 |
-
btn.setAttribute("aria-pressed", btn.getAttribute("aria-pressed")==="true" ? "false" : "true");
|
| 325 |
-
});
|
| 326 |
-
// Keyboard support: Space/Enter toggles
|
| 327 |
-
group.addEventListener("keydown", e => {
|
| 328 |
-
if (!e.target.classList.contains("toggle")) return;
|
| 329 |
-
if (e.key === " " || e.key === "Enter"){
|
| 330 |
-
e.preventDefault();
|
| 331 |
-
e.target.click();
|
| 332 |
}
|
|
|
|
|
|
|
| 333 |
});
|
| 334 |
});
|
| 335 |
-
|
| 336 |
-
// Assemble prompt text
|
| 337 |
function buildPrompt(){
|
| 338 |
-
const topic
|
| 339 |
-
const duration
|
| 340 |
-
const notes
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
const selected = $$(".toggle[aria-pressed='true']", group).map(b => b.textContent.trim());
|
| 347 |
-
if (selected.length > 0) prompt += `\n- ${name}: ${selected.join(", ")}`;
|
| 348 |
});
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
const
|
| 352 |
-
if
|
| 353 |
-
|
| 354 |
-
if (exp) prompt += `\n- Export Format: ${exp}`;
|
| 355 |
-
if (notes) prompt += `\n- Notes: ${notes}`;
|
| 356 |
-
|
| 357 |
-
$("#out").textContent = prompt;
|
| 358 |
$("#copy").classList.remove("hidden");
|
| 359 |
$("#copyOpen").classList.remove("hidden");
|
| 360 |
-
$("#hint").textContent
|
| 361 |
}
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
$("#build").addEventListener("click", buildPrompt);
|
| 365 |
-
|
| 366 |
-
// Enter-to-start: when in short inputs, Enter triggers build; in textarea use Ctrl/Cmd+Enter
|
| 367 |
-
["#topic","#duration"].forEach(sel=>{
|
| 368 |
-
$(sel).addEventListener("keydown", e=>{
|
| 369 |
-
if(e.key==="Enter"){ e.preventDefault(); buildPrompt(); }
|
| 370 |
-
});
|
| 371 |
});
|
| 372 |
-
$("#
|
| 373 |
-
|
|
|
|
|
|
|
| 374 |
});
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
await navigator.clipboard.writeText(text);
|
| 380 |
-
return true;
|
| 381 |
-
}catch{
|
| 382 |
-
// Fallback
|
| 383 |
-
const ta=document.createElement("textarea");
|
| 384 |
-
ta.value=text;
|
| 385 |
-
document.body.appendChild(ta);
|
| 386 |
-
ta.select();
|
| 387 |
-
try{ document.execCommand("copy"); }catch{}
|
| 388 |
-
document.body.removeChild(ta);
|
| 389 |
-
return true;
|
| 390 |
-
}
|
| 391 |
-
}
|
| 392 |
-
|
| 393 |
-
// CTA: Copy Prompt (Generate Prompt)
|
| 394 |
-
$("#copy").addEventListener("click", async () => {
|
| 395 |
-
const prompt = $("#out").textContent;
|
| 396 |
-
if (!prompt.trim()){ $("#hint").textContent = "Nothing to copy yet."; return; }
|
| 397 |
-
await copyText(prompt);
|
| 398 |
-
$("#hint").textContent = "Copied!";
|
| 399 |
-
const btn = $("#copy");
|
| 400 |
-
const prev = btn.textContent;
|
| 401 |
-
btn.textContent = "Copied!";
|
| 402 |
-
setTimeout(()=>btn.textContent=prev, 1200);
|
| 403 |
-
});
|
| 404 |
-
|
| 405 |
-
// CTA: Copy & Open in GPT
|
| 406 |
-
$("#copyOpen").addEventListener("click", async () => {
|
| 407 |
-
const prompt = $("#out").textContent;
|
| 408 |
-
if (!prompt.trim()){ $("#hint").textContent = "Build a prompt first."; return; }
|
| 409 |
-
await copyText(prompt);
|
| 410 |
-
const url = `${GPT_URL}?q=${encodeURIComponent(prompt)}`;
|
| 411 |
-
const win = window.open(url, "_blank");
|
| 412 |
-
const btn = $("#copyOpen");
|
| 413 |
-
const prev = btn.textContent;
|
| 414 |
-
if (win){ btn.textContent = "Copied! • Opening GPT…"; }
|
| 415 |
-
else { btn.textContent = "Copied! • Please allow pop-ups"; }
|
| 416 |
-
setTimeout(()=>btn.textContent=prev, 1800);
|
| 417 |
});
|
| 418 |
-
|
| 419 |
-
// Accessibility: announce when buttons become visible after first build
|
| 420 |
-
const outObserver = new MutationObserver(()=> {
|
| 421 |
-
$("#copy").setAttribute("aria-hidden", $("#copy").classList.contains("hidden") ? "true":"false");
|
| 422 |
-
$("#copyOpen").setAttribute("aria-hidden", $("#copyOpen").classList.contains("hidden") ? "true":"false");
|
| 423 |
-
});
|
| 424 |
-
outObserver.observe($("#out"), {childList:true, subtree:true});
|
| 425 |
-
|
| 426 |
-
// Focus first field on load for quick typing
|
| 427 |
-
window.addEventListener("DOMContentLoaded", ()=> $("#topic").focus());
|
| 428 |
</script>
|
| 429 |
</body>
|
| 430 |
</html>
|
|
|
|
| 6 |
<title>coachproai • CourseMaster Prompt Builder</title>
|
| 7 |
<style>
|
| 8 |
:root{
|
| 9 |
+
--primary-color-start:#4F46E5;
|
| 10 |
+
--primary-color-end:#8B5CF6;
|
| 11 |
--background-color:#f8f9fc;
|
| 12 |
--container-bg:#ffffff;
|
| 13 |
+
--text-color:#1f2937;
|
| 14 |
+
--label-color:#374151;
|
| 15 |
+
--border-color:#d1d5db;
|
| 16 |
--shadow-color:rgba(0,0,0,0.08);
|
| 17 |
}
|
|
|
|
| 18 |
*{box-sizing:border-box}
|
|
|
|
| 19 |
body{
|
| 20 |
margin:0;
|
| 21 |
+
font-family:system-ui,sans-serif;
|
| 22 |
background:var(--background-color);
|
| 23 |
color:var(--text-color);
|
| 24 |
+
padding:24px;
|
| 25 |
display:flex;
|
|
|
|
| 26 |
justify-content:center;
|
| 27 |
+
font-size:1.05rem; /* bigger base font */
|
| 28 |
+
line-height:1.5;
|
| 29 |
}
|
|
|
|
| 30 |
.app{
|
| 31 |
width:100%;
|
| 32 |
+
max-width:600px; /* wider */
|
| 33 |
background:var(--container-bg);
|
| 34 |
+
padding:36px;
|
| 35 |
+
border-radius:18px;
|
| 36 |
+
box-shadow:0 6px 20px var(--shadow-color);
|
| 37 |
position:relative;
|
| 38 |
border:1px solid var(--border-color);
|
| 39 |
}
|
|
|
|
| 41 |
content:"";
|
| 42 |
position:absolute;
|
| 43 |
inset:-2px -2px auto -2px;
|
| 44 |
+
height:8px;
|
| 45 |
+
border-top-left-radius:20px;
|
| 46 |
+
border-top-right-radius:20px;
|
| 47 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 48 |
}
|
|
|
|
| 49 |
h1{
|
| 50 |
+
margin:0 0 20px;
|
| 51 |
+
font-size:2.3em;
|
| 52 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 53 |
-webkit-background-clip:text;
|
| 54 |
background-clip:text;
|
|
|
|
| 56 |
font-weight:800;
|
| 57 |
text-align:center;
|
| 58 |
}
|
| 59 |
+
.subtitle{text-align:center;color:#6b7280;font-size:1rem;margin-bottom:22px}
|
| 60 |
+
.label{color:var(--label-color);font-weight:600;margin-bottom:8px;display:block;font-size:1rem}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
.input, select, textarea{
|
| 62 |
+
width:100%;padding:14px;border:1px solid var(--border-color);border-radius:12px;
|
| 63 |
+
background:#fff;color:var(--text-color);font-size:1rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
}
|
| 65 |
+
.input:focus,select:focus,textarea:focus{
|
| 66 |
+
outline:none;border-color:var(--primary-color-start);
|
|
|
|
| 67 |
box-shadow:0 0 0 4px rgba(79,70,229,.15);
|
| 68 |
}
|
| 69 |
+
.group{margin-bottom:22px}
|
| 70 |
+
.toggles{display:flex;flex-wrap:wrap;gap:10px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
.toggle{
|
| 72 |
+
border:1px solid var(--border-color);background:#f9fafb;color:var(--text-color);
|
| 73 |
+
padding:10px 14px;border-radius:12px;cursor:pointer;font-weight:600;font-size:1rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
+
.toggle[aria-pressed="true"]{
|
| 76 |
+
color:#fff;border-color:transparent;
|
|
|
|
|
|
|
| 77 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
| 78 |
}
|
| 79 |
+
.out{
|
| 80 |
+
background:#f9fafb;border:1px dashed var(--border-color);padding:16px;
|
| 81 |
+
border-radius:14px;min-height:130px;white-space:pre-wrap;font-size:1rem;
|
| 82 |
+
}
|
| 83 |
+
.cta-row{margin-top:14px;display:flex;gap:12px;flex-wrap:wrap}
|
| 84 |
.btn{
|
| 85 |
+
flex:1;display:inline-flex;align-items:center;justify-content:center;
|
| 86 |
+
font-weight:700;font-size:1.1rem;border:none;color:#fff;padding:14px 18px;
|
| 87 |
+
border-radius:14px;cursor:pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
background:linear-gradient(90deg,var(--primary-color-start),var(--primary-color-end));
|
|
|
|
|
|
|
| 89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
.btn.hidden{display:none}
|
| 91 |
+
.hint{margin-top:10px;color:#6b7280;font-size:1rem;min-height:1.4em}
|
| 92 |
+
.footer{text-align:center;color:#9ca3af;font-size:.9rem;margin-top:22px}
|
| 93 |
+
@media (max-width:480px){
|
| 94 |
+
body{padding:16px;font-size:1rem}
|
| 95 |
+
.app{padding:24px;border-radius:14px}
|
| 96 |
+
h1{font-size:1.8em}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
.btn{width:100%}
|
| 98 |
.cta-row{flex-direction:column}
|
| 99 |
}
|
|
|
|
| 102 |
<body>
|
| 103 |
<main class="app" role="application" aria-labelledby="title">
|
| 104 |
<h1 id="title">CourseMaster Prompt Builder</h1>
|
| 105 |
+
<p class="subtitle">Powered by <strong>coachproai</strong></p>
|
| 106 |
|
|
|
|
| 107 |
<section class="top-input">
|
| 108 |
<label class="label" for="topic">Topic</label>
|
| 109 |
+
<input id="topic" class="input" type="text" placeholder="e.g., Personal Branding on Social Media" />
|
| 110 |
</section>
|
| 111 |
|
|
|
|
| 112 |
<section class="options" aria-label="Options">
|
| 113 |
<div class="group" role="group" aria-label="Audience">
|
| 114 |
<span class="label">Audience</span>
|
|
|
|
| 165 |
</div>
|
| 166 |
</div>
|
| 167 |
|
| 168 |
+
<div class="group">
|
| 169 |
<label for="duration" class="label">Duration</label>
|
| 170 |
<input id="duration" class="input" type="text" placeholder="e.g., 8 weeks" />
|
|
|
|
| 171 |
<label for="localization" class="label">Localization</label>
|
| 172 |
<select id="localization" class="input">
|
| 173 |
+
<option>Auto</option><option>Pakistan</option><option>GCC</option><option>Global</option>
|
|
|
|
|
|
|
|
|
|
| 174 |
</select>
|
|
|
|
| 175 |
<label for="export" class="label">Export</label>
|
| 176 |
<select id="export" class="input">
|
| 177 |
+
<option>PDF</option><option>DOCX</option><option>HTML</option>
|
|
|
|
|
|
|
| 178 |
</select>
|
| 179 |
</div>
|
| 180 |
|
| 181 |
<div class="group" role="group" aria-label="Add-ons">
|
| 182 |
<span class="label">Add-ons</span>
|
| 183 |
<div class="toggles multi" data-name="addons">
|
| 184 |
+
<button class="toggle" type="button" aria-pressed="false">Include Video Support</button>
|
| 185 |
+
<button class="toggle" type="button" aria-pressed="false">Bloom Mapping</button>
|
| 186 |
+
<button class="toggle" type="button" aria-pressed="false">Assessments</button>
|
| 187 |
</div>
|
| 188 |
</div>
|
| 189 |
</section>
|
| 190 |
|
|
|
|
| 191 |
<section class="notes">
|
| 192 |
<label class="label" for="notes">Notes</label>
|
| 193 |
+
<textarea id="notes" class="textarea" rows="6" placeholder="Special requirements, target platform, constraints, tools, etc."></textarea>
|
|
|
|
| 194 |
</section>
|
| 195 |
|
|
|
|
| 196 |
<section class="response">
|
| 197 |
<span class="label">Prompt Preview</span>
|
| 198 |
<pre id="out" class="out" role="status" aria-live="polite"></pre>
|
| 199 |
<div class="cta-row">
|
| 200 |
+
<button id="copy" class="btn cta hidden" type="button">Generate Prompt</button>
|
| 201 |
+
<button id="copyOpen" class="btn cta hidden" type="button">Copy & Paste Now</button>
|
| 202 |
</div>
|
| 203 |
+
<div class="hint" id="hint" aria-live="polite"></div>
|
| 204 |
</section>
|
| 205 |
|
| 206 |
+
<div class="footer">© coachproai</div>
|
| 207 |
</main>
|
| 208 |
|
| 209 |
<script>
|
| 210 |
+
const GPT_URL='https://chat.openai.com/g/g-6864ab7c8c188191b8641483747e63c2-coursemaster-pro';
|
| 211 |
+
const $=s=>document.querySelector(s);
|
| 212 |
+
const $$=s=>Array.from(document.querySelectorAll(s));
|
| 213 |
+
$$(".toggles").forEach(g=>{
|
| 214 |
+
g.addEventListener("click",e=>{
|
| 215 |
+
if(!e.target.classList.contains("toggle"))return;
|
| 216 |
+
if(!g.classList.contains("multi")){
|
| 217 |
+
$$(".toggle",g).forEach(b=>b.setAttribute("aria-pressed","false"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
}
|
| 219 |
+
e.target.setAttribute("aria-pressed", e.target.getAttribute("aria-pressed")==="true"?"false":"true");
|
| 220 |
+
buildPrompt();
|
| 221 |
});
|
| 222 |
});
|
|
|
|
|
|
|
| 223 |
function buildPrompt(){
|
| 224 |
+
const topic=$("#topic").value.trim();
|
| 225 |
+
const duration=$("#duration").value.trim();
|
| 226 |
+
const notes=$("#notes").value.trim();
|
| 227 |
+
let p=`Create a course plan for "${topic||"<<<Add Topic>>>"}".`;
|
| 228 |
+
$$(".toggles").forEach(g=>{
|
| 229 |
+
const name=g.dataset.name;
|
| 230 |
+
const sel=$$(".toggle[aria-pressed='true']",g).map(b=>b.textContent.trim());
|
| 231 |
+
if(sel.length>0)p+=`\n- ${name}: ${sel.join(", ")}`;
|
|
|
|
|
|
|
| 232 |
});
|
| 233 |
+
if(duration)p+=`\n- Duration: ${duration}`;
|
| 234 |
+
const loc=$("#localization").value;if(loc!=="Auto")p+=`\n- Localization: ${loc}`;
|
| 235 |
+
const exp=$("#export").value;if(exp)p+=`\n- Export Format: ${exp}`;
|
| 236 |
+
if(notes)p+=`\n- Notes: ${notes}`;
|
| 237 |
+
$("#out").textContent=p;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
$("#copy").classList.remove("hidden");
|
| 239 |
$("#copyOpen").classList.remove("hidden");
|
| 240 |
+
$("#hint").textContent="Prompt ready!";
|
| 241 |
}
|
| 242 |
+
["#topic","#duration","#notes"].forEach(s=>{
|
| 243 |
+
$(s).addEventListener("input",buildPrompt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
});
|
| 245 |
+
$("#copy").addEventListener("click",async()=>{
|
| 246 |
+
const t=$("#out").textContent;
|
| 247 |
+
await navigator.clipboard.writeText(t);
|
| 248 |
+
$("#hint").textContent="Copied!";
|
| 249 |
});
|
| 250 |
+
$("#copyOpen").addEventListener("click",async()=>{
|
| 251 |
+
const t=$("#out").textContent;
|
| 252 |
+
await navigator.clipboard.writeText(t);
|
| 253 |
+
window.open(`${GPT_URL}?q=${encodeURIComponent(t)}`,"_blank");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
</script>
|
| 256 |
</body>
|
| 257 |
</html>
|