-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
205 lines (203 loc) · 7.08 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
<!doctype html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-K9PKMZQ9');
</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#9197f7" />
<title>Ear Trainer</title>
<meta
name="description"
content="Ear training app with challenges for chords, intervals, progressions, and scales."
/>
<meta property="og:url" content="https://eartrainer.xyz" />
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Ear training app with challenges for chords, intervals, progressions, and scales."
/>
<meta property="og:image" content="/images/logo.png" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:domain" content="eartrainer.xyz" />
<meta property="twitter:url" content="https://eartrainer.xyz" />
<meta
name="twitter:description"
content="Ear training app with challenges for chords, intervals, progressions, and scales."
/>
<meta name="twitter:image" content="" />
<meta property="og:title" content="Ear Trainer" />
<meta name="twitter:title" content="Ear Trainer" />
<link rel="icon" type="image/png" href="/images/logo.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
href="https://fonts.googleapis.com/css2?family=Audiowide&family=Lexend:[email protected]&display=swap"
as="style"
onload="this.onload=null;this.rel='stylesheet'"
/>
<noscript>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Audiowide&family=Lexend:[email protected]&display=swap"
/>
</noscript>
<link
rel="preload"
href="src/styles.css"
as="style"
onload="this.onload=null;this.rel='stylesheet'"
/>
<noscript><link rel="stylesheet" href="src/styles.css" /></noscript>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript
><iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-K9PKMZQ9"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-BGYCTS8RQJ"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-BGYCTS8RQJ');
</script>
<script>
const mode = localStorage.getItem('mode');
if (
mode === 'dark' ||
(!mode &&
window.matchMedia &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.body.classList.add('sl-theme-dark');
}
</script>
<div class="row">
<h1>Ear Trainer</h1>
<div class="switch-mode">
<sl-icon name="sun"></sl-icon>
<sl-switch size="small">Switch theme mode</sl-switch>
<sl-icon name="moon-fill"></sl-icon>
</div>
</div>
<sl-tab-group>
<sl-tab slot="nav" panel="get-started" active> Get started </sl-tab>
<sl-tab slot="nav" panel="training" type="chords">Training</sl-tab>
<sl-tab slot="nav" panel="settings"> Settings </sl-tab>
<sl-tab-panel name="training">
<div class="grid">
<div class="challenge-container">
<sl-radio-group class="challenge-type" value="chords" size="small">
<sl-radio-button value="chords">Chords</sl-radio-button>
<sl-radio-button value="intervals">Intervals</sl-radio-button>
<sl-radio-button value="progressions"
>Progressions</sl-radio-button
>
<sl-radio-button value="scales">Scales</sl-radio-button>
</sl-radio-group>
</div>
<sl-button class="new-challenge">New challenge</sl-button>
<sl-button class="play-challenge">
Play
<sl-icon name="volume-up"></sl-icon>
</sl-button>
<sl-select class="answer" label="Answer"></sl-select>
<p class="result"></p>
<div class="piano-container">
<sl-button class="toggle-piano">Hide piano</sl-button>
<custom-piano-keys
oct-count="3"
mark-color="#f13c68"
></custom-piano-keys>
</div>
<div class="score-field started">
<p class="name">Started</p>
<p class="value"></p>
</div>
<div class="score-field completed">
<p class="name">Completed</p>
<p class="value"></p>
</div>
<div class="score-field correct">
<p class="name">Correct</p>
<p class="value"></p>
</div>
<div class="score-field average">
<p class="name">Average</p>
<p class="value"></p>
</div>
</div>
</sl-tab-panel>
<sl-tab-panel name="settings">
<div class="column">
<sl-select class="level" label="Difficulty" placement="bottom">
<sl-option value="easy">Easy</sl-option>
<sl-option value="medium">Medium</sl-option>
<sl-option value="hard">Hard</sl-option>
</sl-select>
<sl-range
class="speed"
label="Playback speed"
help-text="Seconds per note/chord (faster to slower)"
min="0.5"
max="2"
step="0.1"
value="1"
></sl-range>
</div>
</sl-tab-panel>
<sl-tab-panel name="get-started">
<b>Make sure sound is on!</b>
<ol>
<li>
<sl-icon name="1-circle-fill"></sl-icon
><span>Click on "Training"</span>
</li>
<li>
<sl-icon name="2-circle-fill"></sl-icon
><span>Select a type of challenge</span>
</li>
<li>
<sl-icon name="3-circle-fill"></sl-icon
><span>Press "Play" to hear the sound</span>
</li>
<li>
<sl-icon name="4-circle-fill"></sl-icon
><span>Pick an answer, see if you're right</span>
</li>
<li>
<sl-icon name="5-circle-fill"></sl-icon
><span>Start a new challenge</span>
</li>
</ol>
</sl-tab-panel>
</sl-tab-group>
<script type="module" src="/src/main.ts"></script>
</body>
</html>