-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
308 lines (285 loc) · 12 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Math Sheets</title>
<meta name="description" content="Generate PDF worksheets of simple math problems in the browser." />
<link rel="canonical" href="https://www.mathsheets.net" />
<!-- Open Graph meta -->
<meta property="og:title" content="Math Sheets" />
<meta
property="og:description"
content="Generate simple math worksheets in the browser and print using generated PDF files."
/>
<meta property="og:image" content="https://www.mathsheets.net/meta.png" />
<meta property="og:url" content="https://www.mathsheets.net" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
</head>
<body>
<div class="container">
<div class="window">
<div class="title-bar">
<div class="title-bar-text">Math Sheets</div>
<div class="title-bar-controls">
<button aria-label="Help"></button>
<button aria-label="Close"></button>
</div>
</div>
<div class="window-body">
<p>Generate PDF worksheets of simple math problems in the browser.</p>
<p>
A tribute to all those worksheets created by my dad for my siblings and I to do during summer vacations back
in the late 90s/early 00s (hence the Windows 98 theme). Thanks Dad!
</p>
<p>
This website is open-source and is licensed under the MIT license. Have any comments or bugs to report? File
an issue on <a href="https://github.com/sphars/math-sheets" target="_blank">GitHub</a>.
</p>
<noscript>
<p>
<b>NOTE:</b> JavaScript is currently disabled and this website will not work as intended. For an optimal
experience, please enable JavaScript in your browser settings.
</p>
</noscript>
<section class="field-row window-actions">
<button id="credits">Credits</button>
<button>OK</button>
</section>
</div>
</div>
<div class="main-wrapper">
<div class="window">
<div class="title-bar">
<div class="title-bar-text">Generator Options</div>
<div class="title-bar-controls">
<button aria-label="Minimize"></button>
<button aria-label="Maximize"></button>
<button aria-label="Close"></button>
</div>
</div>
<div class="window-body spaced">
<p>
Use the options below to specify what kind of problems to generate. Note that some options are still a
work in progress and are disabled at the moment.
</p>
<form id="input-form">
<fieldset>
<legend>Operator</legend>
<div class="field-row">
<input type="radio" name="operator" id="operator-add" value="+" checked />
<label for="operator-add">Addition (+)</label>
</div>
<div class="field-row">
<input type="radio" name="operator" id="operator-subtract" value="-" />
<label for="operator-subtract">Subtraction (−)</label>
</div>
<div class="field-row">
<input type="radio" name="operator" id="operator-multiply" value="*" />
<label for="operator-multiply">Multiplication (×)</label>
</div>
<div class="field-row">
<input type="radio" name="operator" id="operator-divide" value="/" />
<label for="operator-divide">Division (÷)</label>
</div>
<div class="field-row">
<input type="radio" name="operator" id="operator-mix" value="mix" />
<label for="operator-mix">Mix</label>
</div>
</fieldset>
<fieldset class="operands-fields">
<legend>Operand Values</legend>
<fieldset>
<legend>Upper/Dividend</legend>
<div class="field-row">
<label for="upper-min">Minimum</label>
<input
required
type="number"
id="upper-min"
name="upper-min"
min="0"
max="999"
step="1"
value="1"
/>
</div>
<div class="field-row">
<label for="upper-max">Maximum</label>
<input
required
type="number"
id="upper-max"
name="upper-max"
min="0"
max="1000"
step="1"
value="10"
/>
</div>
</fieldset>
<fieldset>
<legend>Lower/Divisor</legend>
<div class="field-row">
<label for="lower-min">Minimum</label>
<input
required
type="number"
id="lower-min"
name="lower-min"
min="0"
max="999"
step="1"
value="1"
/>
</div>
<div class="field-row">
<label for="lower-max">Maximum</label>
<input
required
type="number"
id="lower-max"
name="lower-max"
min="0"
max="1000"
step="1"
value="10"
/>
</div>
</fieldset>
</fieldset>
<fieldset>
<legend>Options</legend>
<div class="field-row">
<label for="num-problems">Number of problems</label>
<input required type="number" id="num-problems" name="num-problems" min="1" max="1000" step="1" />
</div>
<div class="field-row">
<input type="checkbox" id="desc-order" name="desc-order" />
<label for="desc-order">Operands in descending order</label>
</div>
<div class="field-row">
<input type="checkbox" id="no-negatives" name="no-negatives" />
<label for="no-negatives">No negative answers</label>
</div>
<div class="field-row">
<input type="checkbox" id="ints-only" name="ints-only" />
<label for="ints-only">Integer (whole number) answers (Division only)</label>
</div>
<div class="field-row">
<input type="checkbox" id="long-div-notation" name="long-div-notation" />
<label for="long-div-notation">Long division notation (Division only)</label>
</div>
<div class="field-row">
<label for="seed">Seed</label>
<input required type="number" id="seed" name="seed" min="0" max="100000000" step="1" value="" />
<button type="button" id="reseed">New Seed</button>
</div>
</fieldset>
</form>
<section class="field-row window-actions">
<button type="submit" id="form-submit" form="input-form">Generate</button>
<button type="reset" form="input-form">Reset</button>
</section>
</div>
</div>
<!-- print preview -->
<div class="window">
<div class="title-bar">
<div class="title-bar-text">Print Preview</div>
<div class="title-bar-controls">
<button aria-label="Minimize"></button>
<button aria-label="Maximize"></button>
<button aria-label="Close"></button>
</div>
</div>
<div class="window-body spaced">
<p>
Due to differences in HTML vs PDF rendering, the PDF will not look quite the same as what you see below.
But it'll be pretty close.
</p>
<div class="fields">
<div class="field-row">
<label for="font-select">Font</label>
<select name="font-select" id="font-select"></select>
</div>
<div class="field-row">
<input type="checkbox" name="with-header" id="with-header" />
<label for="with-header">Show header</label>
</div>
<div class="field-row">
<input type="checkbox" name="with-answers" id="with-answers" />
<label for="with-answers">With answers</label>
</div>
</div>
<!-- TODO: rename to print-preview -->
<div class="text-area" id="page-wrapper">
<div id="page" class="d-none">
<div id="page-header" class="hidden">
<div>Name: <span class="line-bottom"></span></div>
<div>Date: <span class="line-bottom"></span></div>
</div>
<div id="page-content"></div>
<div id="page-footer">Created with mathsheets.net</div>
</div>
</div>
<section class="field-row window-actions">
<button id="save-config">Save Config</button>
<button id="pdf-button" disabled>Print</button>
</section>
</div>
<div class="status-bar">
<p class="status-bar-field"><span id="status-pages"></span></p>
</div>
</div>
</div>
<div class="window" id="bg-switcher">
<div class="title-bar">
<div class="title-bar-text">Background</div>
<div class="title-bar-controls">
<button aria-label="Help"></button>
</div>
</div>
<div class="window-body">
<select title="Switch the background tiles">
<option value="none">none</option>
</select>
</div>
</div>
</div>
<dialog>
<div class="window">
<div class="title-bar">
<div class="title-bar-text">Credits</div>
<div class="title-bar-controls">
<button aria-label="Close"></button>
</div>
</div>
<div class="window-body">
<p>This site was made with the following</p>
<ul>
<li><a href="https://jdan.github.io/98.css/" target="_blank">98.css</a> for the awesome CSS library</li>
<li><a href="https://github.com/parallax/jsPDF" target="_blank">jsPDF</a> for generating PDFs</li>
<li>
<a href="https://github.com/simonbengtsson/jsPDF-AutoTable" target="_blank">jsPDF-AutoTable</a> for using
tables in the PDF
</li>
<li>
<a href="https://windowswallpaper.miraheze.org/wiki/Windows_95" target="_blank">Windows Wallpaper Wiki</a>
(and Microsoft, I guess) for the Windows 98 background tiles
</li>
</ul>
<section class="window-actions">
<button>Close</button>
</section>
</div>
</div>
</dialog>
<script src="src/main.ts" type="module"></script>
</body>
</html>