Update index.html
Browse files- index.html +311 -314
index.html
CHANGED
|
@@ -5,370 +5,394 @@
|
|
| 5 |
<title>EduAssess Pro — Smart Exam Paper Designer</title>
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
|
| 8 |
-
<!--
|
| 9 |
<style>
|
| 10 |
:root{
|
| 11 |
-
--bg: #0f172a;
|
| 12 |
-
--
|
| 13 |
-
--
|
| 14 |
-
--accent:#22d3ee; /* cyan-400 */
|
| 15 |
-
--ring:#7c3aed; /* violet-600 */
|
| 16 |
-
--ok:#10b981; /* green-500 */
|
| 17 |
-
--warn:#f59e0b; /* amber-500 */
|
| 18 |
-
--danger:#ef4444; /* red-500 */
|
| 19 |
-
--white:#ffffff;
|
| 20 |
-
--shadow: 0 10px 30px rgba(0,0,0,.35);
|
| 21 |
-
--radius: 16px;
|
| 22 |
}
|
| 23 |
*{box-sizing:border-box}
|
| 24 |
html,body{height:100%}
|
| 25 |
body{
|
| 26 |
-
margin:0;
|
| 27 |
background:
|
| 28 |
radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.35), transparent 60%),
|
| 29 |
radial-gradient(1000px 700px at 110% 10%, rgba(34,211,238,.25), transparent 60%),
|
| 30 |
linear-gradient(180deg, #0b1022 0%, #0f172a 100%);
|
| 31 |
-
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
|
| 32 |
-
color:var(--white);
|
| 33 |
}
|
| 34 |
-
|
| 35 |
-
.wrap{
|
| 36 |
-
max-width:1100px;
|
| 37 |
-
margin:40px auto;
|
| 38 |
-
padding:24px;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
.app{
|
| 42 |
-
background: linear-gradient(180deg, rgba(255,255,255,.
|
| 43 |
-
border:1px solid rgba(148,163,184,.
|
| 44 |
-
border-radius: var(--radius);
|
| 45 |
-
box-shadow: var(--shadow);
|
| 46 |
backdrop-filter: blur(6px);
|
| 47 |
-
overflow:hidden;
|
| 48 |
-
}
|
| 49 |
-
|
| 50 |
-
.app__header{
|
| 51 |
-
display:flex; align-items:center; justify-content:space-between;
|
| 52 |
-
padding:24px;
|
| 53 |
-
border-bottom:1px solid rgba(148,163,184,.15);
|
| 54 |
-
background:
|
| 55 |
-
radial-gradient(600px 200px at 0% 0%, rgba(124,58,237,.25), transparent 60%),
|
| 56 |
-
radial-gradient(600px 200px at 100% 0%, rgba(34,211,238,.2), transparent 60%);
|
| 57 |
-
}
|
| 58 |
-
.title{
|
| 59 |
-
margin:0;
|
| 60 |
-
font-weight:800;
|
| 61 |
-
letter-spacing:.3px;
|
| 62 |
-
line-height:1.1;
|
| 63 |
-
font-size: clamp(20px, 3vw, 28px);
|
| 64 |
}
|
| 65 |
-
.
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
}
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
border-radius:12px;
|
| 75 |
-
color:var(--muted);
|
| 76 |
-
font-size:12px;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
.grid{
|
| 80 |
-
display:grid;
|
| 81 |
-
gap:18px;
|
| 82 |
-
grid-template-columns: repeat(12, 1fr);
|
| 83 |
-
padding:24px;
|
| 84 |
-
}
|
| 85 |
-
@media (max-width: 980px){
|
| 86 |
-
.grid{grid-template-columns: repeat(6, 1fr);}
|
| 87 |
-
}
|
| 88 |
-
@media (max-width: 640px){
|
| 89 |
-
.grid{grid-template-columns: repeat(4, 1fr);}
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
.card{
|
| 93 |
-
grid-column: span 12;
|
| 94 |
-
background: rgba(2,6,23,.35);
|
| 95 |
-
border:1px solid rgba(148,163,184,.14);
|
| 96 |
-
border-radius:14px;
|
| 97 |
-
overflow:hidden;
|
| 98 |
-
}
|
| 99 |
-
.card__head{
|
| 100 |
-
padding:16px 16px 0 16px;
|
| 101 |
-
}
|
| 102 |
-
.card__title{
|
| 103 |
-
margin:0;
|
| 104 |
-
font-size:16px;
|
| 105 |
-
letter-spacing:.3px;
|
| 106 |
-
color:#cbd5e1;
|
| 107 |
}
|
| 108 |
-
.
|
| 109 |
-
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
}
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
--
|
| 118 |
-
appearance:none; border:none; cursor:pointer;
|
| 119 |
-
|
| 120 |
-
border-radius:999px;
|
| 121 |
-
background: var(--btn-bg);
|
| 122 |
-
color: var(--btn-txt);
|
| 123 |
-
font-weight:700; font-size:14px; letter-spacing:.2px;
|
| 124 |
transition: transform .15s ease, box-shadow .15s ease, background .15s ease, outline-color .15s ease;
|
| 125 |
outline:2px solid transparent; outline-offset:2px;
|
| 126 |
}
|
| 127 |
-
.
|
| 128 |
-
.
|
| 129 |
|
| 130 |
-
.
|
| 131 |
-
|
| 132 |
-
|
|
|
|
| 133 |
}
|
| 134 |
|
| 135 |
-
|
| 136 |
-
.grade .btn{ --btn-bg: linear-gradient(135deg,#2563eb,#22d3ee); }
|
| 137 |
-
.subject .btn{ --btn-bg: linear-gradient(135deg,#7c3aed,#ec4899); }
|
| 138 |
-
.board .btn{ --btn-bg: linear-gradient(135deg,#22c55e,#84cc16); }
|
| 139 |
-
.test .btn{ --btn-bg: linear-gradient(135deg,#f59e0b,#ef4444); }
|
| 140 |
-
.qtype .btn{ --btn-bg: linear-gradient(135deg,#06b6d4,#6366f1); }
|
| 141 |
-
.adv .btn{ --btn-bg: linear-gradient(135deg,#14b8a6,#8b5cf6); }
|
| 142 |
-
|
| 143 |
-
/* Generate button */
|
| 144 |
.generate{
|
| 145 |
-
width:100%;
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
background: linear-gradient(135deg, #10b981, #22d3ee);
|
| 149 |
-
color:#001923;
|
| 150 |
-
font-weight:900; font-size:16px; letter-spacing:.4px;
|
| 151 |
-
border:none; cursor:pointer;
|
| 152 |
-
box-shadow: 0 10px 28px rgba(34,211,238,.25);
|
| 153 |
-
transition: transform .15s ease, box-shadow .15s ease, filter .15s;
|
| 154 |
-
}
|
| 155 |
-
.generate:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px rgba(34,211,238,.35); }
|
| 156 |
-
.generate:active{ transform: translateY(0); }
|
| 157 |
-
|
| 158 |
-
/* Result box */
|
| 159 |
-
.result{
|
| 160 |
-
display:none;
|
| 161 |
-
margin-top:16px;
|
| 162 |
-
background: rgba(2,6,23,.6);
|
| 163 |
-
border:1px solid rgba(148,163,184,.2);
|
| 164 |
-
border-radius:14px; padding:16px;
|
| 165 |
-
}
|
| 166 |
-
.result p{
|
| 167 |
-
margin:0 0 10px 0; color:#e2e8f0; text-align:center; font-weight:700;
|
| 168 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
textarea{
|
| 170 |
-
width:100%; height:
|
| 171 |
-
|
| 172 |
-
border-radius:12px; padding:12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
| 173 |
-
outline:none;
|
| 174 |
}
|
| 175 |
.open-gpt{
|
| 176 |
-
margin-top:12px;
|
| 177 |
-
|
| 178 |
-
background: linear-gradient(135deg,#8b5cf6,#22d3ee);
|
| 179 |
-
color:#06121b; font-weight:900; letter-spacing:.3px;
|
| 180 |
box-shadow: 0 10px 28px rgba(139,92,246,.35);
|
| 181 |
}
|
| 182 |
-
.footer{
|
| 183 |
-
padding:0 24px 24px 24px; color:var(--muted); font-size:12px; text-align:center;
|
| 184 |
-
}
|
| 185 |
-
|
| 186 |
-
/* Layout spans */
|
| 187 |
-
.span-6{ grid-column: span 6; }
|
| 188 |
-
.span-12{ grid-column: span 12; }
|
| 189 |
-
@media (max-width: 980px){ .span-6{ grid-column: span 12; } }
|
| 190 |
</style>
|
| 191 |
</head>
|
| 192 |
<body>
|
| 193 |
<div class="wrap">
|
| 194 |
<div class="app" role="application" aria-label="EduAssess Pro — Smart Exam Paper Designer">
|
| 195 |
-
<div class="
|
| 196 |
<div>
|
| 197 |
<h1 class="title">EduAssess Pro — Smart Exam Paper Designer</h1>
|
| 198 |
-
<p class="subtitle">
|
| 199 |
</div>
|
| 200 |
<div class="badge">Static • Hugging Face Ready</div>
|
| 201 |
</div>
|
| 202 |
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
<
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
</div>
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
<!-- Subject -->
|
| 225 |
-
<section class="card span-6 subject" aria-labelledby="subject-h">
|
| 226 |
-
<div class="card__head"><h2 id="subject-h" class="card__title">2) Select Subject</h2></div>
|
| 227 |
-
<div class="card__body" id="subject-options">
|
| 228 |
-
<button class="btn" data-type="subject" data-value="Mathematics">Mathematics</button>
|
| 229 |
-
<button class="btn" data-type="subject" data-value="Urdu">Urdu</button>
|
| 230 |
-
<button class="btn" data-type="subject" data-value="English">English</button>
|
| 231 |
-
<button class="btn" data-type="subject" data-value="Science">Science</button>
|
| 232 |
-
<button class="btn" data-type="subject" data-value="Physics">Physics</button>
|
| 233 |
-
<button class="btn" data-type="subject" data-value="Chemistry">Chemistry</button>
|
| 234 |
-
<button class="btn" data-type="subject" data-value="Biology">Biology</button>
|
| 235 |
-
<button class="btn" data-type="subject" data-value="Computer Science">Computer Science</button>
|
| 236 |
-
<button class="btn" data-type="subject" data-value="Islamiat">Islamiat</button>
|
| 237 |
-
<button class="btn" data-type="subject" data-value="Pakistan Studies">Pakistan Studies</button>
|
| 238 |
</div>
|
| 239 |
-
</
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
<button class="
|
| 246 |
-
<button class="
|
| 247 |
-
<button class="
|
| 248 |
-
<button class="
|
| 249 |
-
<button class="btn" data-type="board" data-value="Balochistan Board">Balochistan Board</button>
|
| 250 |
-
<button class="btn" data-type="board" data-value="AKUEB">AKUEB</button>
|
| 251 |
</div>
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
<!-- Test Type -->
|
| 255 |
-
<section class="card span-6 test" aria-labelledby="test-h">
|
| 256 |
-
<div class="card__head"><h2 id="test-h" class="card__title">4) Select Test Type</h2></div>
|
| 257 |
-
<div class="card__body" id="test-type-options">
|
| 258 |
-
<button class="btn" data-type="testType" data-value="Summative">Summative</button>
|
| 259 |
-
<button class="btn" data-type="testType" data-value="Formative">Formative</button>
|
| 260 |
-
<button class="btn" data-type="testType" data-value="Diagnostic">Diagnostic</button>
|
| 261 |
</div>
|
| 262 |
-
</
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
<button class="btn" data-type="questionType" data-value="MCQs">MCQs</button>
|
| 269 |
-
<button class="btn" data-type="questionType" data-value="Short Questions">Short Questions</button>
|
| 270 |
-
<button class="btn" data-type="questionType" data-value="Long Questions">Long Questions</button>
|
| 271 |
-
<button class="btn" data-type="questionType" data-value="Practical / Diagram-based Questions">Practical / Diagram</button>
|
| 272 |
-
<button class="btn" data-type="questionType" data-value="Moral / Ethical Questions">Moral / Ethical</button>
|
| 273 |
-
<button class="btn" data-type="questionType" data-value="Islamic Questions">Islamic</button>
|
| 274 |
</div>
|
| 275 |
-
</
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
<button class="
|
| 282 |
-
<button class="
|
| 283 |
-
<button class="
|
| 284 |
-
<button class="btn" data-type="difficulty" data-value="Hard">Hard</button>
|
| 285 |
-
<button class="btn" data-type="language" data-value="English">English</button>
|
| 286 |
-
<button class="btn" data-type="language" data-value="Urdu">Urdu</button>
|
| 287 |
-
<button class="btn" data-type="language" data-value="Bilingual">Bilingual</button>
|
| 288 |
</div>
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
<!-- Generate -->
|
| 292 |
-
<section class="card span-12">
|
| 293 |
-
<div class="card__body">
|
| 294 |
-
<button id="generatePromptBtn" class="generate">Generate Prompt & Open Custom GPT</button>
|
| 295 |
-
<div id="result" class="result" role="region" aria-live="polite" aria-label="Prompt Result">
|
| 296 |
-
<p id="ready-text">your prompt is Ready Now Paste it</p>
|
| 297 |
-
<textarea id="promptOutput" readonly></textarea>
|
| 298 |
-
<button id="openGptBtn" class="open-gpt">Open EduAssess Pro GPT</button>
|
| 299 |
-
</div>
|
| 300 |
</div>
|
| 301 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
|
|
|
|
|
|
|
|
|
|
| 303 |
</div>
|
| 304 |
|
| 305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
</div>
|
| 307 |
</div>
|
| 308 |
|
| 309 |
-
<!--
|
| 310 |
<script>
|
| 311 |
window.CUSTOM_GPT_URL = "https://chatgpt.com/g/g-68697e4c49508191b175d86830b34d85-eduassess-pro-smart-exam-paper-designer";
|
| 312 |
</script>
|
| 313 |
|
| 314 |
-
<!--
|
| 315 |
<script>
|
| 316 |
(function(){
|
| 317 |
const CUSTOM_GPT_URL = window.CUSTOM_GPT_URL;
|
| 318 |
-
|
|
|
|
|
|
|
| 319 |
grade:null, subject:null, board:null, testType:null,
|
| 320 |
-
questionTypes:[], bloom:
|
|
|
|
|
|
|
| 321 |
};
|
| 322 |
|
|
|
|
| 323 |
const $ = (s)=>document.querySelector(s);
|
| 324 |
const $$ = (s)=>document.querySelectorAll(s);
|
| 325 |
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
btn.
|
| 329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
}
|
| 344 |
}
|
| 345 |
|
| 346 |
-
// Attach
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
});
|
| 351 |
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
const
|
| 357 |
-
|
| 358 |
-
bloomToggle.dataset.value = on ? 'yes' : 'no';
|
| 359 |
-
options.bloom = on ? 'yes' : 'no';
|
| 360 |
});
|
| 361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 362 |
function buildPrompt(o){
|
| 363 |
-
let p = `I need a paper for ${o.grade}, on the subject of ${o.subject}, aligned with the ${o.board}. The test type is ${o.testType}. Please include the following question types: ${o.questionTypes
|
| 364 |
if(o.bloom === 'yes') p += " The questions should be based on Bloom's Taxonomy.";
|
| 365 |
if(o.difficulty) p += ` The difficulty level should be ${o.difficulty}.`;
|
| 366 |
if(o.language) p += ` The paper should be in ${o.language}.`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
return p;
|
| 368 |
}
|
|
|
|
| 369 |
function ready(o){
|
| 370 |
-
|
|
|
|
|
|
|
| 371 |
}
|
|
|
|
| 372 |
async function copy(text){
|
| 373 |
try{
|
| 374 |
if(navigator.clipboard && window.isSecureContext){ await navigator.clipboard.writeText(text); return; }
|
|
@@ -380,43 +404,16 @@
|
|
| 380 |
const resultBox = $('#result');
|
| 381 |
const promptOutput = $('#promptOutput');
|
| 382 |
const openBtn = $('#openGptBtn');
|
| 383 |
-
const generateBtn = $('#
|
| 384 |
-
|
| 385 |
-
// Difficulty & Language single-select grouping
|
| 386 |
-
function exclusiveClickSetup(attr){
|
| 387 |
-
$(`.adv`).querySelectorAll(`.btn[data-type="${attr}"]`).forEach(b=>{
|
| 388 |
-
b.addEventListener('click', ()=>{
|
| 389 |
-
// remove active from siblings of same type
|
| 390 |
-
$(`.adv`).querySelectorAll(`.btn[data-type="${attr}"]`).forEach(x=>x.classList.remove('btn--active'));
|
| 391 |
-
b.classList.add('btn--active');
|
| 392 |
-
options[attr] = b.dataset.value;
|
| 393 |
-
});
|
| 394 |
-
});
|
| 395 |
-
}
|
| 396 |
-
exclusiveClickSetup('difficulty');
|
| 397 |
-
exclusiveClickSetup('language');
|
| 398 |
-
|
| 399 |
-
// Board/Grade/Subject/Test single-select grouping
|
| 400 |
-
['grade','subject','board','testType'].forEach(attr=>{
|
| 401 |
-
document.querySelectorAll(`.btn[data-type="${attr}"]`).forEach(b=>{
|
| 402 |
-
b.addEventListener('click', ()=>{
|
| 403 |
-
document.querySelectorAll(`.btn[data-type="${attr}"]`).forEach(x=>x.classList.remove('btn--active'));
|
| 404 |
-
b.classList.add('btn--active');
|
| 405 |
-
options[attr] = b.dataset.value;
|
| 406 |
-
});
|
| 407 |
-
});
|
| 408 |
-
});
|
| 409 |
|
| 410 |
-
openBtn.addEventListener('click', ()=>{
|
| 411 |
-
window.open(CUSTOM_GPT_URL, '_blank', 'noopener,noreferrer');
|
| 412 |
-
});
|
| 413 |
|
| 414 |
generateBtn.addEventListener('click', async ()=>{
|
| 415 |
-
if(!ready(
|
| 416 |
-
alert('Please
|
| 417 |
return;
|
| 418 |
}
|
| 419 |
-
const prompt = buildPrompt(
|
| 420 |
promptOutput.value = prompt;
|
| 421 |
resultBox.style.display = 'block';
|
| 422 |
document.getElementById('ready-text').textContent = 'your prompt is Ready Now Paste it';
|
|
|
|
| 5 |
<title>EduAssess Pro — Smart Exam Paper Designer</title>
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
|
| 8 |
+
<!-- ========== Inline Styles (Colorful App, Top Label Buttons that Expand) ========== -->
|
| 9 |
<style>
|
| 10 |
:root{
|
| 11 |
+
--bg: #0f172a; --panel:#0b1224; --muted:#94a3b8; --text:#e5e7eb; --white:#fff;
|
| 12 |
+
--ring:#7c3aed; --cyan:#22d3ee; --green:#10b981; --amber:#f59e0b; --pink:#ec4899; --violet:#8b5cf6; --blue:#3b82f6;
|
| 13 |
+
--shadow: 0 14px 30px rgba(0,0,0,.35); --radius: 16px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
*{box-sizing:border-box}
|
| 16 |
html,body{height:100%}
|
| 17 |
body{
|
| 18 |
+
margin:0; color:var(--text); font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
|
| 19 |
background:
|
| 20 |
radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.35), transparent 60%),
|
| 21 |
radial-gradient(1000px 700px at 110% 10%, rgba(34,211,238,.25), transparent 60%),
|
| 22 |
linear-gradient(180deg, #0b1022 0%, #0f172a 100%);
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
+
.wrap{max-width:1100px; margin:32px auto; padding:20px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
.app{
|
| 26 |
+
background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
|
| 27 |
+
border:1px solid rgba(148,163,184,.16);
|
| 28 |
+
border-radius: var(--radius); box-shadow: var(--shadow); overflow:hidden;
|
|
|
|
| 29 |
backdrop-filter: blur(6px);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
+
.header{display:flex; align-items:center; justify-content:space-between; padding:20px 20px 10px 20px}
|
| 32 |
+
.title{margin:0; font-size: clamp(20px, 3.2vw, 28px); font-weight:800; letter-spacing:.2px}
|
| 33 |
+
.subtitle{margin:6px 0 0 0; color:var(--muted); font-size:13px}
|
| 34 |
+
.badge{border:1px dashed rgba(148,163,184,.35); padding:8px 12px; border-radius:12px; color:var(--muted); font-size:12px}
|
| 35 |
+
|
| 36 |
+
/* Top label bar */
|
| 37 |
+
.labelbar{
|
| 38 |
+
display:flex; gap:10px; overflow:auto; padding:12px 16px; border-top:1px solid rgba(148,163,184,.12);
|
| 39 |
+
border-bottom:1px solid rgba(148,163,184,.12); background:rgba(2,6,23,.45);
|
| 40 |
}
|
| 41 |
+
.label-btn{
|
| 42 |
+
appearance:none; border:none; cursor:pointer; padding:12px 16px; border-radius:999px; color:#062028; font-weight:900;
|
| 43 |
+
letter-spacing:.2px; white-space:nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.25); outline:2px solid transparent; outline-offset:2px;
|
| 44 |
+
transition: transform .15s ease, box-shadow .15s ease, filter .15s;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
+
.label-btn:hover{ transform: translateY(-2px); }
|
| 47 |
+
.label-btn.active{ outline-color: rgba(34,211,238,.5); box-shadow: 0 10px 28px rgba(34,211,238,.28); }
|
| 48 |
+
|
| 49 |
+
/* Distinct palettes per label */
|
| 50 |
+
.lb-grade { background: linear-gradient(135deg,#3b82f6,#22d3ee); }
|
| 51 |
+
.lb-subject { background: linear-gradient(135deg,#8b5cf6,#ec4899); }
|
| 52 |
+
.lb-board { background: linear-gradient(135deg,#10b981,#84cc16); }
|
| 53 |
+
.lb-test { background: linear-gradient(135deg,#f59e0b,#ef4444); }
|
| 54 |
+
.lb-qtype { background: linear-gradient(135deg,#06b6d4,#6366f1); }
|
| 55 |
+
.lb-adv { background: linear-gradient(135deg,#14b8a6,#8b5cf6); }
|
| 56 |
+
.lb-follow { background: linear-gradient(135deg,#22d3ee,#10b981); }
|
| 57 |
+
|
| 58 |
+
/* Panels */
|
| 59 |
+
.panel{
|
| 60 |
+
display:none; padding:16px; background:rgba(2,6,23,.6);
|
| 61 |
+
border-bottom:1px solid rgba(148,163,184,.14);
|
| 62 |
}
|
| 63 |
+
.panel.show{ display:block; animation: slide .18s ease; }
|
| 64 |
+
@keyframes slide{ from{opacity:.0; transform: translateY(-6px);} to{opacity:1; transform: translateY(0);} }
|
| 65 |
+
|
| 66 |
+
.group{display:flex; flex-wrap:wrap; gap:10px}
|
| 67 |
+
.opt{
|
| 68 |
+
--bg:#334155; --txt:#e2e8f0;
|
| 69 |
+
appearance:none; border:none; cursor:pointer; padding:12px 14px; min-width:118px;
|
| 70 |
+
border-radius:12px; background: var(--bg); color:var(--txt); font-weight:700; letter-spacing:.2px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
transition: transform .15s ease, box-shadow .15s ease, background .15s ease, outline-color .15s ease;
|
| 72 |
outline:2px solid transparent; outline-offset:2px;
|
| 73 |
}
|
| 74 |
+
.opt:hover{ transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.25); }
|
| 75 |
+
.opt.active{ background: linear-gradient(135deg,#10b981,#22d3ee); color:#07222c; box-shadow: 0 10px 28px rgba(16,185,129,.35); outline-color: rgba(34,211,238,.45); }
|
| 76 |
|
| 77 |
+
.row{display:grid; grid-template-columns:1fr; gap:10px; margin-top:10px}
|
| 78 |
+
.input{
|
| 79 |
+
background:#0b1224; color:var(--text); border:1px solid rgba(148,163,184,.3); border-radius:12px;
|
| 80 |
+
padding:12px 14px; outline:none; width:100%; font-weight:600;
|
| 81 |
}
|
| 82 |
|
| 83 |
+
.generate-wrap{ padding:16px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
.generate{
|
| 85 |
+
width:100%; padding:16px; border-radius:14px; border:none; cursor:pointer;
|
| 86 |
+
background: linear-gradient(135deg, #10b981, #22d3ee); color:#051e28; font-weight:900; letter-spacing:.3px;
|
| 87 |
+
box-shadow: 0 12px 30px rgba(34,211,238,.28); transition: transform .15s ease, box-shadow .15s ease;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
+
.generate:hover{ transform: translateY(-2px); box-shadow: 0 16px 36px rgba(34,211,238,.35); }
|
| 90 |
+
|
| 91 |
+
.result{ display:none; margin:0 16px 16px; background: rgba(2,6,23,.6); border:1px solid rgba(148,163,184,.2); border-radius:14px; padding:16px; }
|
| 92 |
+
.result p{ margin:0 0 10px 0; color:#e2e8f0; text-align:center; font-weight:800; }
|
| 93 |
textarea{
|
| 94 |
+
width:100%; height:140px; resize:vertical; background:#0b1224; color:#e2e8f0;
|
| 95 |
+
border:1px solid rgba(148,163,184,.25); border-radius:12px; padding:12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
|
|
|
|
|
|
| 96 |
}
|
| 97 |
.open-gpt{
|
| 98 |
+
margin-top:12px; width:100%; padding:12px 16px; border-radius:12px; border:none; cursor:pointer;
|
| 99 |
+
background: linear-gradient(135deg,#8b5cf6,#22d3ee); color:#06121b; font-weight:900; letter-spacing:.3px; display:none;
|
|
|
|
|
|
|
| 100 |
box-shadow: 0 10px 28px rgba(139,92,246,.35);
|
| 101 |
}
|
| 102 |
+
.footer{ padding:0 20px 20px; color:var(--muted); font-size:12px; text-align:center; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
</style>
|
| 104 |
</head>
|
| 105 |
<body>
|
| 106 |
<div class="wrap">
|
| 107 |
<div class="app" role="application" aria-label="EduAssess Pro — Smart Exam Paper Designer">
|
| 108 |
+
<div class="header">
|
| 109 |
<div>
|
| 110 |
<h1 class="title">EduAssess Pro — Smart Exam Paper Designer</h1>
|
| 111 |
+
<p class="subtitle">Select everything here with colorful top labels. Generate → auto-copy prompt → open Custom GPT.</p>
|
| 112 |
</div>
|
| 113 |
<div class="badge">Static • Hugging Face Ready</div>
|
| 114 |
</div>
|
| 115 |
|
| 116 |
+
<!-- ========== TOP LABEL BUTTONS (click to expand their panel below) ========== -->
|
| 117 |
+
<div class="labelbar" id="labelBar">
|
| 118 |
+
<button class="label-btn lb-grade" data-panel="p-grade">Grade</button>
|
| 119 |
+
<button class="label-btn lb-subject" data-panel="p-subject">Subject</button>
|
| 120 |
+
<button class="label-btn lb-board" data-panel="p-board">Board</button>
|
| 121 |
+
<button class="label-btn lb-test" data-panel="p-test">Test Type</button>
|
| 122 |
+
<button class="label-btn lb-qtype" data-panel="p-qtype">Question Types</button>
|
| 123 |
+
<button class="label-btn lb-adv" data-panel="p-adv">Advanced</button>
|
| 124 |
+
<button class="label-btn lb-follow" data-panel="p-follow">Follow-up Details</button>
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
<!-- ========== PANELS ========== -->
|
| 128 |
+
<div id="p-grade" class="panel">
|
| 129 |
+
<div class="group" id="grade-options">
|
| 130 |
+
<button class="opt" data-type="grade" data-value="Grade 1">Grade 1</button>
|
| 131 |
+
<button class="opt" data-type="grade" data-value="Grade 2">Grade 2</button>
|
| 132 |
+
<button class="opt" data-type="grade" data-value="Grade 3">Grade 3</button>
|
| 133 |
+
<button class="opt" data-type="grade" data-value="Grade 4">Grade 4</button>
|
| 134 |
+
<button class="opt" data-type="grade" data-value="Grade 5">Grade 5</button>
|
| 135 |
+
<button class="opt" data-type="grade" data-value="Grade 6">Grade 6</button>
|
| 136 |
+
<button class="opt" data-type="grade" data-value="Grade 7">Grade 7</button>
|
| 137 |
+
<button class="opt" data-type="grade" data-value="Grade 8">Grade 8</button>
|
| 138 |
+
<button class="opt" data-type="grade" data-value="Grade 9">Grade 9</button>
|
| 139 |
+
<button class="opt" data-type="grade" data-value="Grade 10">Grade 10</button>
|
| 140 |
+
<button class="opt" data-type="grade" data-value="Grade 11">Grade 11</button>
|
| 141 |
+
<button class="opt" data-type="grade" data-value="Grade 12">Grade 12</button>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
|
| 145 |
+
<div id="p-subject" class="panel">
|
| 146 |
+
<div class="group" id="subject-options">
|
| 147 |
+
<button class="opt" data-type="subject" data-value="Mathematics">Mathematics</button>
|
| 148 |
+
<button class="opt" data-type="subject" data-value="Urdu">Urdu</button>
|
| 149 |
+
<button class="opt" data-type="subject" data-value="English">English</button>
|
| 150 |
+
<button class="opt" data-type="subject" data-value="Science">Science</button>
|
| 151 |
+
<button class="opt" data-type="subject" data-value="Physics">Physics</button>
|
| 152 |
+
<button class="opt" data-type="subject" data-value="Chemistry">Chemistry</button>
|
| 153 |
+
<button class="opt" data-type="subject" data-value="Biology">Biology</button>
|
| 154 |
+
<button class="opt" data-type="subject" data-value="Computer Science">Computer Science</button>
|
| 155 |
+
<button class="opt" data-type="subject" data-value="Islamiat">Islamiat</button>
|
| 156 |
+
<button class="opt" data-type="subject" data-value="Pakistan Studies">Pakistan Studies</button>
|
| 157 |
+
</div>
|
| 158 |
+
</div>
|
| 159 |
+
|
| 160 |
+
<div id="p-board" class="panel">
|
| 161 |
+
<div class="group" id="board-options">
|
| 162 |
+
<button class="opt" data-type="board" data-value="PCTB (Punjab)">PCTB (Punjab)</button>
|
| 163 |
+
<button class="opt" data-type="board" data-value="FBISE (Federal)">FBISE (Federal)</button>
|
| 164 |
+
<button class="opt" data-type="board" data-value="Sindh Board">Sindh Board</button>
|
| 165 |
+
<button class="opt" data-type="board" data-value="KPK Board">KPK Board</button>
|
| 166 |
+
<button class="opt" data-type="board" data-value="Balochistan Board">Balochistan Board</button>
|
| 167 |
+
<button class="opt" data-type="board" data-value="AKUEB">AKUEB</button>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<div id="p-test" class="panel">
|
| 172 |
+
<div class="group" id="test-type-options">
|
| 173 |
+
<button class="opt" data-type="testType" data-value="Summative">Summative</button>
|
| 174 |
+
<button class="opt" data-type="testType" data-value="Formative">Formative</button>
|
| 175 |
+
<button class="opt" data-type="testType" data-value="Diagnostic">Diagnostic</button>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
|
| 179 |
+
<div id="p-qtype" class="panel">
|
| 180 |
+
<div class="group" id="question-type-options">
|
| 181 |
+
<button class="opt" data-type="questionType" data-value="MCQs">MCQs</button>
|
| 182 |
+
<button class="opt" data-type="questionType" data-value="Short Questions">Short Questions</button>
|
| 183 |
+
<button class="opt" data-type="questionType" data-value="Long Questions">Long Questions</button>
|
| 184 |
+
<button class="opt" data-type="questionType" data-value="Practical / Diagram-based Questions">Practical / Diagram</button>
|
| 185 |
+
<button class="opt" data-type="questionType" data-value="Moral / Ethical Questions">Moral / Ethical</button>
|
| 186 |
+
<button class="opt" data-type="questionType" data-value="Islamic Questions">Islamic</button>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<div id="p-adv" class="panel">
|
| 191 |
+
<div class="group">
|
| 192 |
+
<button class="opt" id="bloom-toggle" data-type="bloom" data-value="no">Bloom's Levels: No</button>
|
| 193 |
+
<button class="opt" data-type="difficulty" data-value="Easy">Easy</button>
|
| 194 |
+
<button class="opt" data-type="difficulty" data-value="Moderate">Moderate</button>
|
| 195 |
+
<button class="opt" data-type="difficulty" data-value="Hard">Hard</button>
|
| 196 |
+
<button class="opt" data-type="language" data-value="English">English</button>
|
| 197 |
+
<button class="opt" data-type="language" data-value="Urdu">Urdu</button>
|
| 198 |
+
<button class="opt" data-type="language" data-value="Bilingual">Bilingual</button>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<!-- ===== FOLLOW-UP (from GPT confirmation) ===== -->
|
| 203 |
+
<div id="p-follow" class="panel">
|
| 204 |
+
<!-- Topic/Unit -->
|
| 205 |
+
<div style="margin-bottom:12px;">
|
| 206 |
+
<div class="group" style="margin-bottom:8px;">
|
| 207 |
+
<button class="opt active" data-type="topicPreset" data-value="Unit 1–3">Topic/Unit: Unit 1–3</button>
|
| 208 |
+
<button class="opt" data-type="topicPreset" data-value="Unit 4–6">Topic/Unit: Unit 4–6</button>
|
| 209 |
+
<button class="opt" data-type="topicPreset" data-value="Full Syllabus">Topic/Unit: Full Syllabus</button>
|
| 210 |
</div>
|
| 211 |
+
<div class="row">
|
| 212 |
+
<input id="topicCustom" class="input" type="text" placeholder="Or type specific units/topics e.g., Unit 2 (Poem), Unit 3 (Reading Comprehension)">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
</div>
|
| 214 |
+
</div>
|
| 215 |
+
<!-- Number of MCQs -->
|
| 216 |
+
<div style="margin-bottom:12px;">
|
| 217 |
+
<div class="group" id="mcq-count">
|
| 218 |
+
<button class="opt" data-type="mcqs" data-value="5">MCQs: 5</button>
|
| 219 |
+
<button class="opt" data-type="mcqs" data-value="10">MCQs: 10</button>
|
| 220 |
+
<button class="opt" data-type="mcqs" data-value="15">MCQs: 15</button>
|
| 221 |
+
<button class="opt" data-type="mcqs" data-value="20">MCQs: 20</button>
|
| 222 |
+
<button class="opt" data-type="mcqs" data-value="25">MCQs: 25</button>
|
| 223 |
+
<button class="opt" data-type="mcqs" data-value="30">MCQs: 30</button>
|
|
|
|
|
|
|
| 224 |
</div>
|
| 225 |
+
<div class="row">
|
| 226 |
+
<input id="mcqCustom" class="input" type="number" min="1" step="1" placeholder="Or enter custom MCQ count e.g., 12">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
</div>
|
| 228 |
+
</div>
|
| 229 |
+
<!-- Bloom’s Level -->
|
| 230 |
+
<div style="margin-bottom:12px;">
|
| 231 |
+
<div class="group">
|
| 232 |
+
<button class="opt" data-type="bloomFollow" data-value="yes">Bloom’s Level: Yes</button>
|
| 233 |
+
<button class="opt" data-type="bloomFollow" data-value="no">Bloom’s Level: No</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
</div>
|
| 235 |
+
</div>
|
| 236 |
+
<!-- Time Duration -->
|
| 237 |
+
<div style="margin-bottom:12px;">
|
| 238 |
+
<div class="group" id="time-dur">
|
| 239 |
+
<button class="opt" data-type="duration" data-value="20 minutes">Time: 20 minutes</button>
|
| 240 |
+
<button class="opt" data-type="duration" data-value="30 minutes">Time: 30 minutes</button>
|
| 241 |
+
<button class="opt" data-type="duration" data-value="45 minutes">Time: 45 minutes</button>
|
| 242 |
+
<button class="opt" data-type="duration" data-value="60 minutes">Time: 60 minutes</button>
|
| 243 |
+
<button class="opt" data-type="duration" data-value="No time limit">Time: No time limit</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
</div>
|
| 245 |
+
<div class="row">
|
| 246 |
+
<input id="timeCustom" class="input" type="text" placeholder="Or type a custom duration e.g., 35 minutes">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
</div>
|
| 248 |
+
</div>
|
| 249 |
+
<!-- Islamic/Moral Question -->
|
| 250 |
+
<div style="margin-bottom:4px;">
|
| 251 |
+
<div class="group">
|
| 252 |
+
<button class="opt" data-type="moral" data-value="yes">Include Islamic/Moral MCQ: Yes</button>
|
| 253 |
+
<button class="opt" data-type="moral" data-value="no">Include Islamic/Moral MCQ: No</button>
|
| 254 |
+
</div>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
|
| 258 |
+
<!-- ========== GENERATE ========== -->
|
| 259 |
+
<div class="generate-wrap">
|
| 260 |
+
<button id="generate" class="generate">Generate Prompt & Open Custom GPT</button>
|
| 261 |
</div>
|
| 262 |
|
| 263 |
+
<!-- ========== RESULT ========== -->
|
| 264 |
+
<div id="result" class="result" role="region" aria-live="polite" aria-label="Prompt Result">
|
| 265 |
+
<p id="ready-text">your prompt is Ready Now Paste it</p>
|
| 266 |
+
<textarea id="promptOutput" readonly></textarea>
|
| 267 |
+
<button id="openGptBtn" class="open-gpt">Open EduAssess Pro GPT</button>
|
| 268 |
+
</div>
|
| 269 |
+
|
| 270 |
+
<div class="footer">© EduAssess Pro — Colorful top labels • Expand on click • Copy to clipboard • Auto-open Custom GPT</div>
|
| 271 |
</div>
|
| 272 |
</div>
|
| 273 |
|
| 274 |
+
<!-- ===== Config: Your Custom GPT URL ===== -->
|
| 275 |
<script>
|
| 276 |
window.CUSTOM_GPT_URL = "https://chatgpt.com/g/g-68697e4c49508191b175d86830b34d85-eduassess-pro-smart-exam-paper-designer";
|
| 277 |
</script>
|
| 278 |
|
| 279 |
+
<!-- ========== Inline App Logic (No external files) ========== -->
|
| 280 |
<script>
|
| 281 |
(function(){
|
| 282 |
const CUSTOM_GPT_URL = window.CUSTOM_GPT_URL;
|
| 283 |
+
|
| 284 |
+
// State
|
| 285 |
+
const S = {
|
| 286 |
grade:null, subject:null, board:null, testType:null,
|
| 287 |
+
questionTypes:[], bloom:'no', difficulty:null, language:null,
|
| 288 |
+
// follow-up
|
| 289 |
+
topic:null, mcqs:null, bloomFollow:null, duration:null, moral:null
|
| 290 |
};
|
| 291 |
|
| 292 |
+
// Helpers
|
| 293 |
const $ = (s)=>document.querySelector(s);
|
| 294 |
const $$ = (s)=>document.querySelectorAll(s);
|
| 295 |
|
| 296 |
+
// Label bar expand logic
|
| 297 |
+
$$('#labelBar .label-btn').forEach(btn=>{
|
| 298 |
+
btn.addEventListener('click', ()=>{
|
| 299 |
+
const id = btn.dataset.panel;
|
| 300 |
+
// toggle active class and open/close the matching panel; close others
|
| 301 |
+
$$('#labelBar .label-btn').forEach(b=>b.classList.remove('active'));
|
| 302 |
+
btn.classList.add('active');
|
| 303 |
+
document.querySelectorAll('.panel').forEach(p=>{
|
| 304 |
+
if(p.id === id){ p.classList.toggle('show'); }
|
| 305 |
+
else{ p.classList.remove('show'); }
|
| 306 |
+
});
|
| 307 |
+
});
|
| 308 |
+
});
|
| 309 |
|
| 310 |
+
// Option selection
|
| 311 |
+
function singleSelect(type, el){
|
| 312 |
+
// remove active from all of same type
|
| 313 |
+
document.querySelectorAll('.opt[data-type="'+type+'"]').forEach(b=>b.classList.remove('active'));
|
| 314 |
+
el.classList.add('active');
|
| 315 |
+
S[type] = el.dataset.value;
|
| 316 |
+
}
|
| 317 |
+
function multiToggle(arrayKey, value, el){
|
| 318 |
+
el.classList.toggle('active');
|
| 319 |
+
const arr = new Set(S[arrayKey] || []);
|
| 320 |
+
if(arr.has(value)) arr.delete(value); else arr.add(value);
|
| 321 |
+
S[arrayKey] = [...arr];
|
|
|
|
| 322 |
}
|
| 323 |
|
| 324 |
+
// Attach for main options
|
| 325 |
+
document.querySelectorAll('.opt[data-type="grade"]').forEach(b=>b.addEventListener('click',()=>singleSelect('grade',b)));
|
| 326 |
+
document.querySelectorAll('.opt[data-type="subject"]').forEach(b=>b.addEventListener('click',()=>singleSelect('subject',b)));
|
| 327 |
+
document.querySelectorAll('.opt[data-type="board"]').forEach(b=>b.addEventListener('click',()=>singleSelect('board',b)));
|
| 328 |
+
document.querySelectorAll('.opt[data-type="testType"]').forEach(b=>b.addEventListener('click',()=>singleSelect('testType',b)));
|
| 329 |
+
document.querySelectorAll('.opt[data-type="questionType"]').forEach(b=>b.addEventListener('click',()=>multiToggle('questionTypes', b.dataset.value, b)));
|
| 330 |
+
// Advanced
|
| 331 |
+
$('#bloom-toggle').addEventListener('click', (e)=>{
|
| 332 |
+
const el = e.currentTarget;
|
| 333 |
+
el.classList.toggle('active');
|
| 334 |
+
const on = el.classList.contains('active');
|
| 335 |
+
el.dataset.value = on ? 'yes' : 'no';
|
| 336 |
+
el.textContent = on ? "Bloom's Levels: Yes" : "Bloom's Levels: No";
|
| 337 |
+
S.bloom = on ? 'yes' : 'no';
|
| 338 |
+
});
|
| 339 |
+
document.querySelectorAll('.opt[data-type="difficulty"]').forEach(b=>b.addEventListener('click',()=>singleSelect('difficulty',b)));
|
| 340 |
+
document.querySelectorAll('.opt[data-type="language"]').forEach(b=>b.addEventListener('click',()=>singleSelect('language',b)));
|
| 341 |
+
|
| 342 |
+
// Follow-up
|
| 343 |
+
document.querySelectorAll('.opt[data-type="topicPreset"]').forEach(b=>b.addEventListener('click',()=>{
|
| 344 |
+
document.querySelectorAll('.opt[data-type="topicPreset"]').forEach(x=>x.classList.remove('active'));
|
| 345 |
+
b.classList.add('active');
|
| 346 |
+
S.topic = b.dataset.value;
|
| 347 |
+
}));
|
| 348 |
+
$('#topicCustom').addEventListener('input', e=>{
|
| 349 |
+
const val = e.target.value.trim();
|
| 350 |
+
if(val){ S.topic = val; document.querySelectorAll('.opt[data-type="topicPreset"]').forEach(x=>x.classList.remove('active')); }
|
| 351 |
});
|
| 352 |
|
| 353 |
+
document.querySelectorAll('.opt[data-type="mcqs"]').forEach(b=>b.addEventListener('click',()=>{
|
| 354 |
+
singleSelect('mcqs', b);
|
| 355 |
+
}));
|
| 356 |
+
$('#mcqCustom').addEventListener('input', e=>{
|
| 357 |
+
const n = parseInt(e.target.value, 10);
|
| 358 |
+
if(!isNaN(n) && n>0){ S.mcqs = String(n); document.querySelectorAll('.opt[data-type="mcqs"]').forEach(x=>x.classList.remove('active')); }
|
|
|
|
|
|
|
| 359 |
});
|
| 360 |
|
| 361 |
+
document.querySelectorAll('.opt[data-type="bloomFollow"]').forEach(b=>b.addEventListener('click',()=>singleSelect('bloomFollow', b)));
|
| 362 |
+
document.querySelectorAll('.opt[data-type="duration"]').forEach(b=>b.addEventListener('click',()=>{
|
| 363 |
+
singleSelect('duration', b);
|
| 364 |
+
}));
|
| 365 |
+
$('#timeCustom').addEventListener('input', e=>{
|
| 366 |
+
const val = e.target.value.trim();
|
| 367 |
+
if(val){ S.duration = val; document.querySelectorAll('.opt[data-type="duration"]').forEach(x=>x.classList.remove('active')); }
|
| 368 |
+
});
|
| 369 |
+
document.querySelectorAll('.opt[data-type="moral"]').forEach(b=>b.addEventListener('click',()=>singleSelect('moral', b)));
|
| 370 |
+
|
| 371 |
+
// Build prompt (includes follow-up)
|
| 372 |
function buildPrompt(o){
|
| 373 |
+
let p = `I need a paper for ${o.grade}, on the subject of ${o.subject}, aligned with the ${o.board}. The test type is ${o.testType}. Please include the following question types: ${o.questionTypes?.join(', ')}.`;
|
| 374 |
if(o.bloom === 'yes') p += " The questions should be based on Bloom's Taxonomy.";
|
| 375 |
if(o.difficulty) p += ` The difficulty level should be ${o.difficulty}.`;
|
| 376 |
if(o.language) p += ` The paper should be in ${o.language}.`;
|
| 377 |
+
|
| 378 |
+
// Follow-up details to ensure GPT answers without more questions:
|
| 379 |
+
const f = [];
|
| 380 |
+
if(o.topic) f.push(`Topic/Unit: ${o.topic}`);
|
| 381 |
+
if(o.mcqs) f.push(`Number of MCQs: ${o.mcqs}`);
|
| 382 |
+
if(o.bloomFollow) f.push(`Bloom's Level (follow-up): ${o.bloomFollow}`);
|
| 383 |
+
if(o.duration) f.push(`Time Duration: ${o.duration}`);
|
| 384 |
+
if(o.moral) f.push(`Islamic/Moral MCQ: ${o.moral}`);
|
| 385 |
+
if(f.length) p += ` Details: ${f.join('; ')}.`;
|
| 386 |
+
|
| 387 |
return p;
|
| 388 |
}
|
| 389 |
+
|
| 390 |
function ready(o){
|
| 391 |
+
// Required core + follow-up minimal set for MCQs-only flows
|
| 392 |
+
const base = !!(o.grade && o.subject && o.board && o.testType && (o.questionTypes?.length>0) && o.language);
|
| 393 |
+
return base;
|
| 394 |
}
|
| 395 |
+
|
| 396 |
async function copy(text){
|
| 397 |
try{
|
| 398 |
if(navigator.clipboard && window.isSecureContext){ await navigator.clipboard.writeText(text); return; }
|
|
|
|
| 404 |
const resultBox = $('#result');
|
| 405 |
const promptOutput = $('#promptOutput');
|
| 406 |
const openBtn = $('#openGptBtn');
|
| 407 |
+
const generateBtn = $('#generate');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
|
| 409 |
+
openBtn.addEventListener('click', ()=>{ window.open(CUSTOM_GPT_URL, '_blank', 'noopener,noreferrer'); });
|
|
|
|
|
|
|
| 410 |
|
| 411 |
generateBtn.addEventListener('click', async ()=>{
|
| 412 |
+
if(!ready(S)){
|
| 413 |
+
alert('Please complete: Grade, Subject, Board, Test Type, at least one Question Type, and Language. (Follow-up fields are recommended.)');
|
| 414 |
return;
|
| 415 |
}
|
| 416 |
+
const prompt = buildPrompt(S);
|
| 417 |
promptOutput.value = prompt;
|
| 418 |
resultBox.style.display = 'block';
|
| 419 |
document.getElementById('ready-text').textContent = 'your prompt is Ready Now Paste it';
|