-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
334 lines (316 loc) · 18.1 KB
/
index.html
File metadata and controls
334 lines (316 loc) · 18.1 KB
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Generate customized math worksheets for students of all levels with answer keys">
<title>Math-PDF-Generator</title>
<!-- External Dependencies -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.5/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.min.js"></script>
<!-- Main Styles -->
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!-- Hero Section -->
<section class="hero">
<div class="container">
<h1 class="hero-title fade-in-up">
<i class="fas fa-graduation-cap"></i>
Math-PDF-Generator
</h1>
<p class="hero-subtitle fade-in-up">Create professional math worksheets for any grade level with customizable difficulty and subjects</p>
</div>
</section>
<!-- Main Generator Section -->
<section class="section">
<div class="container">
<form id="pdfForm" class="generator-form">
<!-- Student Level Configuration -->
<div class="form-section card fade-in-up">
<h3 class="form-section-title">
<i class="fas fa-graduation-cap"></i>
Student Level
</h3>
<div class="form-row">
<div class="form-group">
<label for="gradeLevel" class="form-label">Grade Level</label>
<select id="gradeLevel" class="form-select">
<option value="grade1">Grade 1</option>
<option value="grade2">Grade 2</option>
<option value="grade3">Grade 3</option>
<option value="grade4">Grade 4</option>
<option value="grade5">Grade 5</option>
<option value="grade6">Grade 6</option>
<option value="grade7">Grade 7</option>
<option value="grade8">Grade 8</option>
<option value="grade9">Grade 9 (Algebra I)</option>
<option value="grade10">Grade 10 (Geometry)</option>
<option value="grade11">Grade 11 (Algebra II)</option>
<option value="grade12">Grade 12 (Pre-Calc/Calc)</option>
</select>
</div>
<div class="form-group">
<label for="difficulty" class="form-label">Difficulty Level</label>
<div class="range-group">
<input type="range" id="difficulty" class="range-input" min="1" max="3" value="2">
<div class="range-labels">
<span>Easy</span>
<span id="difficultyLabel" class="font-semibold">Medium</span>
<span>Hard</span>
</div>
</div>
</div>
</div>
</div>
<!-- Subject & Content Configuration -->
<div class="form-section card fade-in-up">
<h3 class="form-section-title">
<i class="fas fa-book"></i>
Subject & Content
</h3>
<div class="form-row">
<div class="form-group">
<label class="form-label">Subjects</label>
<div id="subjectSelection" class="topic-grid custom-scrollbar">
<label class="checkbox-label">
<input type="checkbox" id="subject-all" class="checkbox-input" checked>
<span class="checkbox-text">All Subjects</span>
</label>
</div>
</div>
<div class="form-group">
<label class="form-label">Topics</label>
<div id="topicSelection" class="topic-grid custom-scrollbar">
<label class="checkbox-label">
<input type="checkbox" id="topic-all" class="checkbox-input">
<span class="checkbox-text">All Topics</span>
</label>
</div>
</div>
</div>
<div class="form-group" id="operationsSection">
<label class="form-label">Operations</label>
<div class="operation-grid">
<label class="checkbox-label">
<input type="checkbox" id="op-addition" class="checkbox-input" value="addition" checked>
<span class="checkbox-text">Addition</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="op-subtraction" class="checkbox-input" value="subtraction" checked>
<span class="checkbox-text">Subtraction</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="op-multiplication" class="checkbox-input" value="multiplication" checked>
<span class="checkbox-text">Multiplication</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="op-division" class="checkbox-input" value="division" checked>
<span class="checkbox-text">Division</span>
</label>
</div>
</div>
</div>
<!-- Problem Settings -->
<div class="form-section card fade-in-up">
<h3 class="form-section-title">
<i class="fas fa-cog"></i>
Problem Settings
</h3>
<div class="form-row">
<div class="form-group">
<label for="problemType" class="form-label">Problem Type</label>
<select id="problemType" class="form-select">
<option value="equations" selected>Equations Only</option>
<option value="word">Word Problems Only</option>
<option value="mixed">Mixed (Alternating Pages)</option>
</select>
</div>
<div class="form-group">
<label for="answerKey" class="form-label">Answer Key</label>
<select id="answerKey" class="form-select">
<option value="separate">Separate Page</option>
<option value="none">No Answer Key</option>
</select>
</div>
</div>
</div>
<!-- Output Settings -->
<div class="form-section card fade-in-up">
<h3 class="form-section-title">
<i class="fas fa-file-pdf"></i>
Output Settings
</h3>
<!-- PDF Generation -->
<div class="form-subsection">
<h4 class="form-subsection-title">PDF Generation</h4>
<div class="form-row">
<div class="form-group">
<label for="numPDFs" class="form-label">Number of PDFs</label>
<input type="number" id="numPDFs" class="form-input" value="5" min="1" max="100">
<small class="form-help">Generate multiple unique worksheets (1-100)</small>
</div>
<div class="form-group">
<label for="numPages" class="form-label">Pages per PDF</label>
<input type="number" id="numPages" class="form-input" value="4" min="1" max="50">
<small class="form-help">Pages in each worksheet (1-50)</small>
</div>
</div>
</div>
<!-- Title & Header -->
<div class="form-subsection form-accordion">
<button type="button" class="form-accordion-toggle" aria-expanded="false">
<h4 class="form-subsection-title">Title & Header <span class="optional-tag">(Optional)</span></h4>
<i class="fas fa-chevron-down accordion-icon"></i>
</button>
<div class="form-accordion-content">
<div class="form-row">
<div class="form-group">
<label for="pdfTitle" class="form-label form-label-required">Worksheet Title</label>
<input type="text" id="pdfTitle" class="form-input" value="" placeholder="Auto-generated based on grade and subject" required>
</div>
<div class="form-group">
<label for="showTitle" class="form-label">Show Title on PDF</label>
<select id="showTitle" class="form-select">
<option value="all">All Pages</option>
<option value="first" selected>First Page Only</option>
<option value="no">No</option>
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Header Fields</label>
<div class="checkbox-grid-4">
<label class="checkbox-label">
<input type="checkbox" id="showName" class="checkbox-input">
<span class="checkbox-text">Name</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="showDate" class="checkbox-input">
<span class="checkbox-text">Date</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="showScore" class="checkbox-input">
<span class="checkbox-text">Score</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="showGrade" class="checkbox-input">
<span class="checkbox-text">Grade</span>
</label>
</div>
</div>
</div>
</div>
<!-- Page Styling -->
<div class="form-subsection form-accordion">
<button type="button" class="form-accordion-toggle" aria-expanded="false">
<h4 class="form-subsection-title">Page Styling <span class="optional-tag">(Optional)</span></h4>
<i class="fas fa-chevron-down accordion-icon"></i>
</button>
<div class="form-accordion-content">
<div class="form-row">
<div class="form-group">
<label for="pageNumberPosition" class="form-label">Page Number Position</label>
<select id="pageNumberPosition" class="form-select">
<option value="bottom-center">Bottom Center</option>
<option value="bottom-left">Bottom Left</option>
<option value="bottom-right">Bottom Right</option>
<option value="top-right">Top Right</option>
<option value="none">None (Hide)</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Display Options</label>
<div class="checkbox-group">
<label class="checkbox-label">
<input type="checkbox" id="showPageBorder" class="checkbox-input">
<span class="checkbox-text">Page Border</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="showPageNumberBox" class="checkbox-input">
<span class="checkbox-text">Page Number Box</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="showNumberCircles" class="checkbox-input">
<span class="checkbox-text">Question Number Circles</span>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Action Buttons -->
<div class="form-actions fade-in-up">
<button type="button" id="previewBtn" class="btn btn-outline btn-lg">
<i class="fas fa-eye"></i>
Preview
</button>
<button type="submit" class="btn btn-primary btn-lg">
<i class="fas fa-download"></i>
Generate Worksheets
</button>
</div>
</form>
<!-- Progress Container -->
<div id="progress-container" class="progress-container">
<div class="progress-bar">
<div id="progress-fill" class="progress-fill"></div>
</div>
<div id="progress-message" class="progress-message">Initializing...</div>
</div>
<!-- Preview Container -->
<div id="preview-container" class="preview-container">
<h3 class="preview-title">
<i class="fas fa-eye"></i>
Worksheet Preview
</h3>
<div id="preview-content" class="preview-content custom-scrollbar"></div>
</div>
</div>
</section>
<!-- PDF Preview Modal -->
<div id="pdf-preview-modal" class="pdf-preview-modal" style="display: none;">
<div class="pdf-preview-modal-content">
<div class="pdf-preview-header">
<h3>
<i class="fas fa-file-pdf"></i>
PDF Preview
</h3>
<button type="button" id="close-pdf-preview" class="pdf-preview-close">
<i class="fas fa-times"></i>
</button>
</div>
<div class="pdf-preview-body">
<iframe id="pdf-preview-iframe" class="pdf-preview-iframe"></iframe>
</div>
<div class="pdf-preview-footer">
<button type="button" id="download-from-preview" class="btn btn-primary">
<i class="fas fa-download"></i>
Download PDF
</button>
<button type="button" id="close-pdf-preview-btn" class="btn btn-outline">
<i class="fas fa-times"></i>
Close
</button>
</div>
</div>
</div>
<!-- GitHub Link (Fixed Position Bottom Left) -->
<div class="github-link">
<a href="https://github.com/sankeer28/Math-PDF-Generator-Web" class="github-link-btn" target="_blank" rel="noopener noreferrer" title="View on GitHub">
<i class="fab fa-github"></i>
</a>
</div>
<!-- Theme Toggle Button (Fixed Position) -->
<div class="theme-toggle">
<button type="button" class="theme-toggle-btn" title="Toggle theme">
<i class="fas fa-moon"></i>
</button>
</div>
<!-- Application Script (ES6 Module) -->
<script type="module" src="js/app.js"></script>
</body>
</html>