Spaces:
Running
Running
Update index.html
Browse files- index.html +29 -12
index.html
CHANGED
|
@@ -105,7 +105,7 @@
|
|
| 105 |
font-weight: bold;
|
| 106 |
}
|
| 107 |
|
| 108 |
-
/* Prompt Display Styling
|
| 109 |
#prompt-display-container {
|
| 110 |
margin-top: 20px;
|
| 111 |
}
|
|
@@ -121,7 +121,7 @@
|
|
| 121 |
box-sizing: border-box;
|
| 122 |
white-space: pre-wrap;
|
| 123 |
word-wrap: break-word;
|
| 124 |
-
font-family: monospace;
|
| 125 |
}
|
| 126 |
|
| 127 |
.cursor {
|
|
@@ -164,6 +164,9 @@
|
|
| 164 |
border: none;
|
| 165 |
background-color: transparent;
|
| 166 |
}
|
|
|
|
|
|
|
|
|
|
| 167 |
|
| 168 |
@media (max-width: 480px) {
|
| 169 |
.container { padding: 20px; border-radius: 12px; }
|
|
@@ -179,12 +182,24 @@
|
|
| 179 |
|
| 180 |
<form id="prompt-form">
|
| 181 |
<div class="section">
|
| 182 |
-
<label for="combined-input-box">1. Grade, Subject
|
| 183 |
-
<textarea id="combined-input-box" placeholder="e.g., Grade 8, Science,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
</div>
|
| 185 |
|
| 186 |
<div class="section">
|
| 187 |
-
<label for="plan-type-select">
|
| 188 |
<select id="plan-type-select">
|
| 189 |
<option value="Daily Lesson Plan">Daily Lesson Plan</option>
|
| 190 |
<option value="Weekly Plan">Weekly Plan</option>
|
|
@@ -208,7 +223,7 @@
|
|
| 208 |
</div>
|
| 209 |
|
| 210 |
<div class="section">
|
| 211 |
-
<label for="sessions-select">
|
| 212 |
<select id="sessions-select">
|
| 213 |
<option value="1">1</option>
|
| 214 |
<option value="2">2</option>
|
|
@@ -220,7 +235,7 @@
|
|
| 220 |
</div>
|
| 221 |
|
| 222 |
<div class="section">
|
| 223 |
-
<label for="duration-select">
|
| 224 |
<select id="duration-select">
|
| 225 |
<option value="30">30 minutes</option>
|
| 226 |
<option value="40" selected>40 minutes</option>
|
|
@@ -230,7 +245,7 @@
|
|
| 230 |
</div>
|
| 231 |
|
| 232 |
<div class="section">
|
| 233 |
-
<label for="profile-select">
|
| 234 |
<select id="profile-select">
|
| 235 |
<option value="Beginner">Beginner</option>
|
| 236 |
<option value="Average" selected>Average</option>
|
|
@@ -250,8 +265,9 @@
|
|
| 250 |
|
| 251 |
<script>
|
| 252 |
document.addEventListener('DOMContentLoaded', () => {
|
| 253 |
-
//
|
| 254 |
const combinedInput = document.getElementById('combined-input-box');
|
|
|
|
| 255 |
const planTypeSelect = document.getElementById('plan-type-select');
|
| 256 |
const tailoredPlanOptions = document.getElementById('tailored-plan-options');
|
| 257 |
const unitInput = document.getElementById('unit-input');
|
|
@@ -268,6 +284,7 @@
|
|
| 268 |
// --- PROMPT GENERATION LOGIC ---
|
| 269 |
function generatePromptText() {
|
| 270 |
const combined = combinedInput.value.trim();
|
|
|
|
| 271 |
const planType = planTypeSelect.value;
|
| 272 |
const sessions = sessionsSelect.value;
|
| 273 |
const duration = durationSelect.value;
|
|
@@ -276,11 +293,11 @@
|
|
| 276 |
const week = weekInput.value.trim();
|
| 277 |
|
| 278 |
if (!combined) {
|
| 279 |
-
return "Please enter Grade, Subject,
|
| 280 |
}
|
| 281 |
|
| 282 |
// Construct the base prompt using the combined input
|
| 283 |
-
let prompt = `
|
| 284 |
|
| 285 |
// Add optional details based on plan type selection
|
| 286 |
if (planType === 'Weekly Plan' || planType === 'Daily Lesson Plan') {
|
|
@@ -327,7 +344,7 @@
|
|
| 327 |
}
|
| 328 |
|
| 329 |
// --- EVENT LISTENERS ---
|
| 330 |
-
const allInputs = [combinedInput, planTypeSelect, sessionsSelect, durationSelect, profileSelect, unitInput, weekInput];
|
| 331 |
|
| 332 |
planTypeSelect.addEventListener('change', toggleTailoredOptions);
|
| 333 |
|
|
|
|
| 105 |
font-weight: bold;
|
| 106 |
}
|
| 107 |
|
| 108 |
+
/* Prompt Display Styling */
|
| 109 |
#prompt-display-container {
|
| 110 |
margin-top: 20px;
|
| 111 |
}
|
|
|
|
| 121 |
box-sizing: border-box;
|
| 122 |
white-space: pre-wrap;
|
| 123 |
word-wrap: break-word;
|
| 124 |
+
font-family: monospace;
|
| 125 |
}
|
| 126 |
|
| 127 |
.cursor {
|
|
|
|
| 164 |
border: none;
|
| 165 |
background-color: transparent;
|
| 166 |
}
|
| 167 |
+
#tailored-plan-options {
|
| 168 |
+
display: none; /* Initially hidden, controlled by JS */
|
| 169 |
+
}
|
| 170 |
|
| 171 |
@media (max-width: 480px) {
|
| 172 |
.container { padding: 20px; border-radius: 12px; }
|
|
|
|
| 182 |
|
| 183 |
<form id="prompt-form">
|
| 184 |
<div class="section">
|
| 185 |
+
<label for="combined-input-box">1. Grade, Subject & Topic (Input)</label>
|
| 186 |
+
<textarea id="combined-input-box" placeholder="e.g., Grade 8, Science, Topic: Gravity and Motion"></textarea>
|
| 187 |
+
</div>
|
| 188 |
+
|
| 189 |
+
<div class="section">
|
| 190 |
+
<label for="board-select">2. Select Curriculum / Board</label>
|
| 191 |
+
<select id="board-select">
|
| 192 |
+
<option value="Punjab Textbook Board">Punjab Textbook Board</option>
|
| 193 |
+
<option value="Sindh Textbook Board">Sindh Textbook Board</option>
|
| 194 |
+
<option value="Federal Board">Federal Board</option>
|
| 195 |
+
<option value="Agha Khan Board">Agha Khan Board</option>
|
| 196 |
+
<option value="Cambridge (O/A Level)">Cambridge (O/A Level)</option>
|
| 197 |
+
<option value="Self-designed">Self-designed</option>
|
| 198 |
+
</select>
|
| 199 |
</div>
|
| 200 |
|
| 201 |
<div class="section">
|
| 202 |
+
<label for="plan-type-select">3. Select Plan Type</label>
|
| 203 |
<select id="plan-type-select">
|
| 204 |
<option value="Daily Lesson Plan">Daily Lesson Plan</option>
|
| 205 |
<option value="Weekly Plan">Weekly Plan</option>
|
|
|
|
| 223 |
</div>
|
| 224 |
|
| 225 |
<div class="section">
|
| 226 |
+
<label for="sessions-select">4. Sessions Per Week</label>
|
| 227 |
<select id="sessions-select">
|
| 228 |
<option value="1">1</option>
|
| 229 |
<option value="2">2</option>
|
|
|
|
| 235 |
</div>
|
| 236 |
|
| 237 |
<div class="section">
|
| 238 |
+
<label for="duration-select">5. Session Duration (Minutes)</label>
|
| 239 |
<select id="duration-select">
|
| 240 |
<option value="30">30 minutes</option>
|
| 241 |
<option value="40" selected>40 minutes</option>
|
|
|
|
| 245 |
</div>
|
| 246 |
|
| 247 |
<div class="section">
|
| 248 |
+
<label for="profile-select">6. Student Profile</label>
|
| 249 |
<select id="profile-select">
|
| 250 |
<option value="Beginner">Beginner</option>
|
| 251 |
<option value="Average" selected>Average</option>
|
|
|
|
| 265 |
|
| 266 |
<script>
|
| 267 |
document.addEventListener('DOMContentLoaded', () => {
|
| 268 |
+
// Get all necessary elements
|
| 269 |
const combinedInput = document.getElementById('combined-input-box');
|
| 270 |
+
const boardSelect = document.getElementById('board-select');
|
| 271 |
const planTypeSelect = document.getElementById('plan-type-select');
|
| 272 |
const tailoredPlanOptions = document.getElementById('tailored-plan-options');
|
| 273 |
const unitInput = document.getElementById('unit-input');
|
|
|
|
| 284 |
// --- PROMPT GENERATION LOGIC ---
|
| 285 |
function generatePromptText() {
|
| 286 |
const combined = combinedInput.value.trim();
|
| 287 |
+
const board = boardSelect.value;
|
| 288 |
const planType = planTypeSelect.value;
|
| 289 |
const sessions = sessionsSelect.value;
|
| 290 |
const duration = durationSelect.value;
|
|
|
|
| 293 |
const week = weekInput.value.trim();
|
| 294 |
|
| 295 |
if (!combined) {
|
| 296 |
+
return "Please enter Grade, Subject, and Topic in the box above to generate the prompt.";
|
| 297 |
}
|
| 298 |
|
| 299 |
// Construct the base prompt using the combined input
|
| 300 |
+
let prompt = `Generate a comprehensive ${planType} for a class with the following details: "${combined}". The curriculum should follow the ${board}. The student profile is ${profile}. The plan should accommodate ${sessions} sessions per week, with each session lasting ${duration} minutes.`;
|
| 301 |
|
| 302 |
// Add optional details based on plan type selection
|
| 303 |
if (planType === 'Weekly Plan' || planType === 'Daily Lesson Plan') {
|
|
|
|
| 344 |
}
|
| 345 |
|
| 346 |
// --- EVENT LISTENERS ---
|
| 347 |
+
const allInputs = [combinedInput, boardSelect, planTypeSelect, sessionsSelect, durationSelect, profileSelect, unitInput, weekInput];
|
| 348 |
|
| 349 |
planTypeSelect.addEventListener('change', toggleTailoredOptions);
|
| 350 |
|