-
Notifications
You must be signed in to change notification settings - Fork 2
/
play.html
255 lines (232 loc) · 17.4 KB
/
play.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
<!DOCTYPE HTML>
<!--
AMC Problem Generator
Copyright (C) 2021
THIS PROGARM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
THE FERE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
VERSION 2.1
THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL
BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE
GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS.
-->
<html lang="en" dir="ltr" id="html">
<link rel="icon" href="img/icon.png" type="image/x-icon">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P98FJ92R7Z"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-P98FJ92R7Z');
</script>
<!-- script imports -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/confetti.browser.min.js"></script>
<script src="js/draw.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<!-- Primary Meta Tags -->
<title>AMC Trainer!</title>
<meta name="title" content="AMC Trainer!">
<meta name="description" content="A FREE interactive 👆 trainer which generates math problems for your specific AMC level 📈 (such as AMC 8/10/12/AIME).">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale: 0.50, maximum-scale: 1.50, target-densityDpi=device-dpi">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://www.amctrainer.com/">
<meta property="og:title" content="AMC Trainer!">
<meta property="og:description" content="A FREE interactive 👆 trainer which generates math problems for your specific AMC level 📈 (such as AMC 8/10/12/AIME).">
<meta property="og:image" content="https://www.amctrainer.com/img/amctrainercard.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://www.amctrainer.com/">
<meta property="twitter:title" content="AMC Trainer!">
<meta property="twitter:description" content="A FREE interactive 👆 trainer which generates math problems for your specific AMC level 📈 (such as AMC 8/10/12/AIME).">
<meta property="twitter:image" content="https://www.amctrainer.com/img/amctrainercard.png">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.1/css/all.css" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200&display=swap" rel="stylesheet">
</head>
<body id="body" onresize="getHeight()" onload="initialFunction()" class="body">
<div style="position: absolute; left: 0px; top: 5px;" class="container">
<img src="img/report.svg" alt= "Report an error" id="reportButtonImg" class="headerButton" style="position: absolute; left: 90px;" onclick="parent.open('https://artofproblemsolving.com/community/c1967976h2362114p19241124')">
<img src="img/help.svg" alt="Information regarding this website, AMC Trainer. This also includes sources and credits attributed." id="infoButtonImg" class="headerButton"onclick="document.getElementById('infoButton').style.display='block'" class="modalButton">
<div id="infoButton" style="position: fixed; z-index: 15" class="modal">
<div class="modalContent animateZoom">
<header class="container">
<span onclick="closeModal()" style="position: absolute; right: 0; top: 0; border-top-right-radius: 12px; border-bottom-left-radius: 12px; font-size: 36px;" class="modalButton" id="closeModal">×</span>
<h2>Credits</h2>
</header>
<div class="container">
<p>
<i>The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions and the solutions on this page are directly taken from the Art of Problem Solving AoPS Wiki.</i>
</p>
</div>
</div>
</div>
</div>
<div id="streak" class="text" style="position: absolute; right: 100px; width: 50px; height: 50px; top: 1rem; margin: 0 1rem; font-weight: bold; font-size: 1.1rem;"></div>
<div class="fas fa-fire" id="fire-icon" style="cursor: default; position: absolute; width: 30px; top: 5px; right: 90px; color: orange; font-size: 40px;" onclick="document.getElementById('streakModal').style.display = 'block'"></div>
<div id="streakModal" class="streak-modal animateZoom">
<div class="modalContent streak-modal-content" style="display: flex; align-items: center; justify-content: center;">
<span onclick="closeModal()" style="position: absolute; right: 0; top: 0; border-top-right-radius: 12px; border-bottom-left-radius: 12px; font-size: 36px;" class="modalButton" id="closeModal">×</span>
<p class="fas fa-fire" style="color: orange; font-size: 10vh; position: absolute; text-align: center; top: -15%"></p>
<p class="streak-count" id="streak-count" style="font-size: 10vh; text-align: center; margin-top: 18rem;"></p>
</div>
</div>
<img src="img/settings.svg" alt="Personalize AMC Trainer to suit your preferences." id="settingsButtonImg" class="settings headerButton" style="top: 5px; right: 5px;" onclick="document.getElementById('settingsButton').style.display = 'block'" class="modalButton" id="closeModal">
<div style="position: fixed; z-index: 15;" id="settingsButton" class="modal">
<main class="modalContent animateZoom">
<span onclick="closeModal()" style="position: absolute; right: 0; top: 0; border-top-right-radius: 12px; border-bottom-left-radius: 12px; font-size: 36px;" class="modalButton" id="closeModal">×</span>
<div class="settings-navigation">
<div class="logo">
<img class="logoIcon" src="img/icon.png" style="width: 80px; height: 80px; margin-left: 2.5rem; margin-top: 1rem;" />
<h5>AMC Trainer Settings</h5>
</div>
<div class="links">
<div class="link">
<h1 class="tabButton modalButton" onclick="changeTab(this, event, 'Options')">Options</h1>
</div>
<div class="link">
<h1 class="tabButton modalButton" onclick="changeTab(this, event, 'Colors')">Colors</h1>
</div>
<div class="link">
<h1 class="tabButton modalButton" onclick="changeTab(this, event, 'Customization')">Customization</h1>
</div>
</div>
<br><br>
<div>
<input class="button saveButton" onclick="saveSettings()" type="submit" value="save" aria-label="Save your settings.">
</div>
</div>
<main class="settings-content">
<div id="Options" class="container tab">
<br><br>
<h2>Level</h2>
<select id="levelDropdown" class="ddl button">
<div class="level-option-container">
<option value=8>AMC 8</option>
<option value=10>AMC 10</option>
<option value=12>AMC 12</option>
<option value=AIME>AIME</option>
<option value="All" selected="selected">All</option>
</div>
</select>
<br><br>
<h2>Subject</h2>
<div class="text" style="left: 0px; margin-left: none; padding-left: 0px; text-align: left;">Coming soon!</div>
<br><br>
<h2>Difficulty</h2>
<div class="text" style="left: 0px; margin-left: none; padding-left: 0px; text-align: left;">Coming soon!</div>
<br><br>
</div>
<div id="Colors" class="container tab">
<br><br>
<h2>Text Color</h2>
<select class="ddl button" id="textColor" value="black">
<option selected="selected" value=black>Black</option>
<option value=white>White</option>
</select>
<br><br>
<h2>Background/Button Color</h2>
<input class="button ddl;" type="color" id="g1" name="g1" value="#63b7dd" aria-label="Set the first color of the background and button color gradient.">
<input class="button ddl;" type="color" id="g2" name="g2" value="#63ddc7" aria-label="Set the second color of the background and button color gradient.">
<br><br>
<h2 style="background-color: #91fe9e">Logo Color</h2>
<select class="ddl button" id="logoColor" value="Blue">
<option value=red>Red</option>
<option value=orange>Orange</option>
<option value=yellow>Yellow</option>
<option value=green>Green</option>
<option selected="selected" value=blue>Blue</option>
<option value=purple>Purple</option>
<option value=white>White</option>
<option value=black>Black</option>
</select>
<br><br>
</div>
<div id="Customization" class="container tab">
<br><br>
<h2>Zen Mode</h2>
<select class="ddl button" id="zenModeOption" value="Off">
<option class="ddlOption" value=Off>Off</option>
<option class="ddlOption" value=On>On</option>
</select>
<br><br>
<h2>Image Wiggle</h2>
<select class="ddl button" id="imgWiggle" value="On">
<option class="ddlOption" value=On>On</option>
<option class="ddlOption" value=Off>Off</option>
</select>
<br><br>
<h2><button class= "newFeature">NEW</button> Font Family</h2>
<select class="ddl button" id="fontFamily" value="sans-serif">
<option style="font-family: 'Poppins' !important;" value="Poppins">Poppins</option>
<option style="font-family: Arial !important;" value="Arial">Arial</option>
<option style="font-family: Arial Black !important;" value="Arial Black">Arial Black</option>
<option style="font-family: Verdana !important;" value="Verdana">Verdana</option>
<option style="font-family: Tahoma !important;" value="Tahoma">Tahoma</option>
<option style="font-family: Trebuchet MS !important;" value="Trebuchet MS">Trebuchet MS</option>
<option style="font-family: Impact !important;" value="Impact">Impact</option>
<option style="font-family: Times New Roman !important;" value="Times New Roman">Times New Roman</option>
<option style="font-family: Didot !important;" value="Didot">Didot</option>
<option style="font-family: Georgia !important;" value="Georgia">Georgia</option>
<option style="font-family: American Typewriter !important;" value="American Typewriter">American Typewriter</option>
<option style="font-family: Andalé Mono !important;" value="Andalé Mono">Andale Mono</option>
<option style="font-family: Courier !important;" value="Courier">Courier</option>
<option style="font-family: Lucida Console !important;" value="Lucida Console">Lucida Console</option>
<option style="font-family: Monaco !important;" value="Monaco">Monaco</option>
<option style="font-family: Bradley Hand !important;" value="Bradley Hand">Bradley Hand</option>
<option style="font-family: Brush Script MT !important;" value="Brush Script MT">Brush Script MT</option>
<option style="font-family: Luminari !important;" value="Luminari">Luminari</option>
<option style="font-family: Comic Sans MS !important;" value="Comic Sans MS">Comic Sans MS</option>
<option style="font-family: Roboto !important;" value="Roboto">Roboto</option>
</select>
<br><br>
</div>
</div>
</main>
</div>
</div>
</div><script src="js/tab.js"></script>
<img src="img/logo_blue.png" alt="The logo for the AMC Trainer website." class="logoIcon" id="logo">
<p style="position: absolute; z-index: 10;" id="Problems">
<button type="button" onclick="document.getElementById('ans').value = ''; get_new_problem(); clearScreen();" style="position: fixed; right: 10%; bottom: 10%; width: 12%; height: 7%; border-radius: 1rem; font-size: 1.6em;" id="new_problem" class="button"><img src="img/arrow-right.svg"></button>
</p>
<strong>
<p class="text" id="problem_id" style="font-size: 24px;"></p>
</strong>
<p class="text" id="problem"></p>
<br>
<p class="text" id="check_ans" style="position: relative; justify-content: center; left: 50%; right: 50%; transform: translateX(-50%); z-index: 10; display: none;">
<input class="input button" style="position: absolute; margin-left: 0px; margin-right: 200px; cursor: text;" autocomplete="off" type="text" id="ans" name="ans" value="" aria-label="Enter your answer for the given problem. Acceptable answers include the letter for AMC 8, AMC 10, and AMC 12. For AIME, please enter the 3 digit representation of your answer.">
<script src="js/script.js"></script>
<button class="button" style="position: absolute; margin-left: 200px; margin-right: 0px; text-align: center;" type="button" id="get_ans" onclick="check_ans(0);">Submit</button>
<span class="text" id="if_correct" style="display: none;"></span>
<span onclick="giveUp()" style="cursor: pointer; position: absolute; margin-top: 5px; margin-left: 420px; text-align: center; font-size: 1.4em; ">🏁</span>
</p>
<p class="text">
<span style="display: none;" id="get_solution"></span>
</p>
<br><br>
<img src="img/draw.svg" alt="A drawing tool to allow for an on-screen whiteboard with various colors." class="text headerButton" style="right:9px; top: 80px;" onclick="toggle()">
<div id="draw" style="width: 100%; height: 100%; display: none;">
<canvas style="position: absolute; top: 0; left: 0; z-index: 5;" cursor: pointer; id="can"></canvas>
<div class="chooseColor" style="top:170px;background:#FF4136;" id="red" onclick="color(this);"></div>
<div class="chooseColor" style="top:230px;background:#FF851B;" id="orange" onclick="color(this);"></div>
<div class="chooseColor" style="top:290px;background:#FFDC00;" id="yellow" onclick="color(this);"></div>
<div class="chooseColor" style="top:350px;background:#2ECC40;" id="green" onclick="color(this);"></div>
<div class="chooseColor" style="top:410px;background:#0074D9;" id="blue" onclick="color(this);"></div>
<div class="chooseColor" style="top:470px;background:#800080;" id="purple" onclick="color(this);"></div>
<div class="chooseColor" style="top:530px;background:#000000;" id="black" onclick="color(this);">✔</div>
<div class="chooseColor" style="top:600px;background:#FFFFFF; color: black; border: 2px solid black;" id="white" onclick="color(this);"></div>
<img src="img/eraser.svg" class="text chooseColor" style="top:660px; border-radius: 0%; border: none; width: 40px; height: 50px; transform: rotate(45deg);" alt="Erase all drawings on the screen." id="eraser" onclick="erase();"/>
<img src="img/trash.svg" class="text" id="clr" onclick="clearScreen()" style="z-index: 10; position:absolute;top:740px;right:10px; font-size: 40px; width: 50px; cursor: pointer;">
<img src="img/corner-down-left.svg" class="text" id="undo" onclick="undo()" aria-label="Undo" style="z-index: 10; position:absolute;top:800px;right:15px; font-size: 40px; width: 50px; cursor: pointer;">
<img src="img/corner-down-right.svg" class="text" id="redo" onclick="redo()" aria-label="Redo" style="z-index: 10; position:absolute;top:850px;right:15px; font-size: 40px; width: 50px; cursor: pointer;">
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
</body>
</html>