/
scale.html
250 lines (208 loc) · 8.6 KB
/
scale.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
<!doctype html>
<!--
ScaleBook
scale.html
v1.0.0
Copyright (c) Leland Jansen 2015. All rights reserved.
-->
<html ng-app="scaleApp" ng-controller="scaleController">
<head>
<meta charset="UTF-8">
<meta name="description" content="ScaleBook is a musical scale resource by Leland Jansen. Don't let scales give you trouble.">
<meta name="author" content="Leland Jansen">
<!-- Typekit -->
<script type="text/javascript" src="//use.typekit.net/owf1riu.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<!-- Style -->
<link rel="stylesheet" type="text/css" href="style.css" />
<!-- AngularJS -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-sanitize.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-route.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-cookies.min.js"></script>
<!-- AngularJS Controller -->
<script src="ScaleBookAngular.js"></script>
<!-- JavaScript -->
<script src="ScaleBook.min.js"></script>
<!-- Page title bound using AngularJS to note name and scale name -->
<title>ScaleBook | {{noteName}} {{scale}}</title>
<script type="text/javascript">
console.log("Hello there!");
</script>
</head>
<body>
<!-- Wrap and main divs (part of sticky footer) -->
<div id="wrap">
<div id="scaleMain">
<!-- Page header -->
<!-- Top color bar (ScaleBook blue color) -->
<div id="divider" style="background-color: #3069BF; opacity: 1; margin-top: 0;"></div>
<!-- Add side margins with "scaleContent" div styling -->
<div id="scaleContent">
<!-- Header (table of three columns) -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<!-- Vertically align table text to top -->
<tbody valign="top">
<tr>
<!-- Search field and interpretation -->
<td align="left" width="49%" class="colorMedium">
<!-- Mini search form -->
<form
name="miniSearchForm"
ng-submit="submit(miniSearchField)"
>
<!-- Search field and submit button -->
<input
type="submit"
title="Search"
id="miniSearchButton"
value=""
ng-disabled="miniSearchForm.miniSearchField.$invalid"
> | <input
type="text"
name="miniSearchField"
id="miniSearchField"
ng-model="miniSearchField"
ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 350, 'blur': 0 } }"
ng-minlength="1"
ng-maxlength="100"
required
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"
placeholder="Search"
>
</form>
<!-- Interpretation -->
<!-- Hide interpretation if mini search field is pristine or the text entered exceeds the maximum allowed length -->
<span ng-hide="miniSearchForm.miniSearchField.$pristine || miniSearchForm.miniSearchField.$error.maxlength">
<span class="italics">
<span class="colorMedium">
<!-- Bound using AngularJS to miniSearchField text
miniSearchField text is run through parseUserInput function using "interpreter" filter (outputs HTML)
Output is then treated as HTML markup -->
<span ng-bind-html="miniSearchField | interpreter | trustAsHTML">
{{miniSearchField | interpreter | trustAsHTML}}
</span>
</span>
</span>
</span>
<!-- Error text if input exceeds maximum allowed length -->
<!-- Show if the text entered has exceeded the maximum allowed length -->
<span ng-show="miniSearchForm.miniSearchField.$error.maxlength">
<span class="italics">
<span class="colorRed">
Input too long.
</span>
</span>
</span>
</td>
<!-- Scale name -->
<td align="center" width="2%" style="white-space:nowrap; font-size: 35pt;" class="colorDark">
<!-- If scale is major or minor -->
<span
ng-show="
scale === 'major' ||
scale === 'minor'
">
<!-- [Note] [major/minor] -->
<!-- Bound using AngularJS to noteName specified in URL param
The noteName is formatted to a music stype (i.e. "-sharp" to "#") (outputs HTML)
Output is then treated as HTML markup -->
<span ng-bind-html="noteName | textStyle | trustAsHTML">
{{noteName | textStyle | trustAsHTML}}
</span>
<!-- Bound using AngularJS to scale specified in URL hash -->
{{scale}}
</span>
<!-- If scale is a mode -->
<span
ng-show="
scale === 'ionian' ||
scale === 'dorian' ||
scale === 'phrygian' ||
scale === 'lydian' ||
scale === 'mixolydian' ||
scale === 'aeolian' ||
scale === 'locrian'
">
<!-- [Mode] mode on [note] -->
<!-- Bound using AngularJS to scale specified in URL hash
The first letter of sclale is capitalized using "capitalizeFirstLetter" filter (outputs HTML) -->
<span ng-bind-html="scale | capitalizeFirstLetter">
{{scale | capitalizeFirstLetter}}
</span>
mode on
<!-- Bound using AngularJS to noteName specified in URL param
The noteName is formatted to a music stype (i.e. "-sharp" to "#") (outputs HTML)
Output is then treated as HTML markup -->
<span ng-bind-html="noteName | textStyle | trustAsHTML">
{{noteName | textStyle | trustAsHTML}}
</span>
</span>
<!-- If scale is not major, minor, or a mode -->
<span
ng-show="
scale !== 'major' &&
scale !== 'minor' &&
scale !== 'ionian' &&
scale !== 'dorian' &&
scale !== 'phrygian' &&
scale !== 'lydian' &&
scale !== 'mixolydian' &&
scale !== 'aeolian' &&
scale !== 'locrian'
">
<!-- [Scale] scale on [note] -->
<!-- Bound using AngularJS to scale specified in URL hash
The first letter of sclale is capitalized using "capitalizeFirstLetter" filter (outputs HTML)
Output is then treated as HTML markup -->
<span ng-bind-html="scale | capitalizeFirstLetter | trustAsHTML">
{{scale | capitalizeFirstLetter | trustAsHTML}}
</span>
scale built on
<!-- Bound using AngularJS to noteName specified in URL param
The noteName is formatted to a music stype (i.e. "-sharp" to "#") (outputs HTML)
Output is then treated as HTML markup -->
<span ng-bind-html="noteName | textStyle | trustAsHTML">
{{noteName | textStyle | trustAsHTML}}
</span>
</span>
</td>
<!-- ScaleBook text -->
<td align="right" width="49%" class="colorMedium">
<a ng-click="reset()" href="../#/" target="_self">ScaleBook</a>
</td>
</tr>
</tbody>
</table>
</div> <!-- End of "scaleContent" -->
<!-- Scale content -->
<div ng-view></div>
</div> <!-- End of "scaleMain" div -->
</div> <!-- End of "wrap" div -->
<!-- Footer (table of two columns) -->
<!-- Add side margins with "scaleContent" div -->
<div id="scaleFooter">
<div id="scaleContent">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody class="colorMedium">
<tr>
<!-- Copyright -->
<td align="left">
Copyright © <a href="http://www.lelandjansen.com/" target="_blank">Leland Jansen</a> 2015
</td>
<!-- Error report and about links -->
<td align="right">
<a href="https://github.com/lelandjansen/ScaleBook/issues" target="_blank">Report an error</a> | <a href="http://www.lelandjansen.com/project/scalebook" target="_blank">About ScaleBook</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Bottom color bar -->
<div id="divider" style="background-color: #3069BF; opacity: 1; margin-top: 11pt; margin-bottom: 0;"></div> <!-- ScaleBook blue color -->
</div>
</body>
</html>