File size: 9,960 Bytes
02f39af abb0efc 02f39af 1e3b1b0 02f39af 1f0c924 02f39af abb0efc 1e3b1b0 02f39af 1e3b1b0 02f39af 3709bb7 02f39af 85889d5 02f39af 1e3b1b0 02f39af 1e3b1b0 02f39af 1e3b1b0 02f39af 1e3b1b0 02f39af 1e3b1b0 02f39af 1e3b1b0 02f39af 1e3b1b0 02f39af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Prompt Generator for Kids Activity Hub Pro</title>
<style>
body {
font-family: sans-serif, Arial, Helvetica;
background-color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
color: #333;
}
.container {
max-width: 450px;
width: 100%;
padding: 30px;
background-color: #f9f9f9;
border-radius: 15px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
border-top: 5px solid #8A2BE2;
}
h1 {
color: #8A2BE2;
font-size: 2em; /* Approx 32px */
text-align: center;
margin-top: 0;
margin-bottom: 30px;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #6A1B9A;
}
select,
input[type="text"] {
width: 100%;
padding: 15px; /* Reduced for better aesthetics */
border: 1px solid #D1C4E9;
border-radius: 8px;
font-size: 1em; /* Approx 16px */
box-sizing: border-box;
background-color: #ffffff;
}
#prompt-display {
width: 100%;
padding: 20px;
margin-top: 20px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 1em;
background-color: #F3E5F5;
color: #6A1B9A;
min-height: 80px;
box-sizing: border-box;
white-space: pre-wrap;
word-wrap: break-word;
}
button {
width: 100%;
padding: 20px;
border: 1px solid #D1C4E9;
border-radius: 8px;
background-color: #F3E5F5;
color: #8A2BE2;
font-size: 1.5em; /* Approx 24px */
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
margin-top: 10px;
}
button:hover {
background-color: #8A2BE2;
color: #ffffff;
}
/* ===== STYLE FOR CUSTOM LANGUAGE INPUT (Initially hidden) ===== */
#custom-lang-group {
display: none;
}
</style>
</head>
<body>
<div class="container">
<h1>Kids Activity Hub pro</h1>
<form id="prompt-form">
<div class="form-group">
<label for="class-select">Select Class</label>
<select id="class-select">
<option value="Playgroup">Playgroup</option>
<option value="Nursery">Nursery</option>
<option value="KG / Prep">KG / Prep</option>
<option value="Grade 1">Grade 1</option>
<option value="Grade 2">Grade 2</option>
<option value="Grade 3">Grade 3</option>
<option value="Grade 4">Grade 4</option>
<option value="Grade 5">Grade 5</option>
</select>
</div>
<div class="form-group">
<label for="subject-select">Select Subject</label>
<select id="subject-select">
<option value="English">English</option>
<option value="Urdu">Urdu</option>
<option value="Mathematics">Mathematics</option>
<option value="Science">Science</option>
<option value="Social Studies">Social Studies</option>
<option value="Islamiat">Islamiat</option>
<option value="Art / Drawing">Art / Drawing</option>
</select>
</div>
<div class="form-group">
<label for="type-select">Select Type</label>
<select id="type-select">
<option value="General Classroom Activity">General Classroom Activity</option>
<option value="Printable Worksheet">Printable Worksheet</option>
<option value="Coloring Sheet">Coloring Sheet</option>
<option value="Tracing Sheet">Tracing Sheet</option>
<option value="Drawing Practice">Drawing Practice</option>
<option value="Story">Story</option>
<option value="Classroom Game">Classroom Game</option>
<option value="Poem">Poem</option>
</select>
</div>
<div class="form-group">
<label for="language-select">Select Language</label>
<select id="language-select">
<option value="English">English</option>
<option value="Urdu">Urdu</option>
<option value="Bilingual (Urdu and English)">Bilingual</option>
<option value="Custom">Custom</option>
</select>
</div>
<div class="form-group" id="custom-lang-group">
<label for="custom-lang-input">Enter Custom Language</label>
<input type="text" id="custom-lang-input" placeholder="e.g., Sindhi, Pashto">
</div>
<div class="form-group">
<label for="topic-input">Enter Topic (Optional)</label>
<input type="text" id="topic-input" placeholder="e.g., Addition, My Family, Plants">
</div>
<div id="prompt-display-container" class="form-group">
<label>Generated Prompt</label>
<div id="prompt-display">Your generated prompt will appear here...</div>
</div>
<button type="button" id="generate-btn">Copy Prompt & Paste</button>
</form>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const classSelect = document.getElementById('class-select');
const subjectSelect = document.getElementById('subject-select');
const typeSelect = document.getElementById('type-select');
const topicInput = document.getElementById('topic-input');
const generateBtn = document.getElementById('generate-btn');
const promptDisplay = document.getElementById('prompt-display');
const gptUrl = 'https://chatgpt.com/g/g-68b48c55bce881919e4e15321b97dc87-kids-activity-hub-pro';
// ===== NEW JAVASCRIPT ELEMENTS =====
const languageSelect = document.getElementById('language-select');
const customLangGroup = document.getElementById('custom-lang-group');
const customLangInput = document.getElementById('custom-lang-input');
// Function to generate the prompt text
function generatePromptText() {
const classVal = classSelect.value;
const subjectVal = subjectSelect.value;
const typeVal = typeSelect.value;
const topicVal = topicInput.value.trim();
let langVal = languageSelect.value;
// Check if custom language is selected and use its value
if (langVal === 'Custom') {
langVal = customLangInput.value.trim() || 'the specified custom language';
}
let prompt = `Generate a "${typeVal}" for ${classVal} for the subject of ${subjectVal}.`;
if (topicVal) {
prompt += ` The specific topic is "${topicVal}".`;
}
// Add language to the prompt
prompt += ` The activity should be in ${langVal}.`;
return prompt;
}
// Show/hide custom language input based on selection
languageSelect.addEventListener('change', () => {
if (languageSelect.value === 'Custom') {
customLangGroup.style.display = 'block';
} else {
customLangGroup.style.display = 'none';
}
});
// Update display whenever a value changes
const allInputs = [classSelect, subjectSelect, typeSelect, topicInput, languageSelect, customLangInput];
allInputs.forEach(input => {
input.addEventListener('change', () => {
promptDisplay.textContent = generatePromptText();
});
input.addEventListener('keyup', () => {
promptDisplay.textContent = generatePromptText();
});
});
// Initial prompt generation on page load
promptDisplay.textContent = generatePromptText();
// Button click event
generateBtn.addEventListener('click', () => {
const promptText = generatePromptText();
navigator.clipboard.writeText(promptText).then(() => {
const originalText = generateBtn.textContent;
generateBtn.textContent = 'Copied!';
setTimeout(() => {
generateBtn.textContent = originalText;
}, 2000);
window.open(gptUrl, '_blank');
}).catch(err => {
console.error('Failed to copy text: ', err);
alert('Failed to copy prompt. Please copy it manually.');
});
});
});
</script>
</body>
</html> |