-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorials.html
130 lines (116 loc) · 6.29 KB
/
tutorials.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Music Theory Tutorials</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bitter:400,700">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora">
<link rel="stylesheet" href="assets/css/styles.min.css">
</head>
<body style="background-color: rgb(31,31,31);">
<!-- Start: Navigation Clean -->
<div id="navbar-insert">
</div>
<script src="include/navbar.js"></script>
<!-- End: Navigation Clean -->
<!-- Start: Article Clean -->
<div class="article-clean" style="padding-bottom: 72px;">
<div class="container">
<div>
<h1>Music Theory Tutorials</h1>
<p>
This page is an index of music theory lessons and electronic music creation lessons I have created. This list will
change over time as new lessons are created.
</p>
<p style="font-style: italic"> I am not a professional, but I think most people will find valuable information in these articles.</p>
<p>
These music theory tutorials assume that the reader has an adequate grasp of musical notation and basic music reading (i.e. time signatures, rhythms, pitches, clefs, articulation, etc.)
For readers who are not yet comfortable with these topics, lesson pages covering these will be made soon (at an undetermined date). The main focus of these articles will be music theory that helps composers write their pieces.
Below is a list of the currently available lessons on this website:
</p>
<h2 style='display: block;'>Music Theory</h2>
<div id="table-of-contents" style="display:block;">
</div>
<script>
let xhrequest = new XMLHttpRequest();
let contents = document.getElementById("table-of-contents");
function article_url_builder(category, chapter_id, article_id) {
if (category != "theory" && category != "code") { // code smell right here
// i should probably recode this system so that there is an array of valid categories
// shouldn't happen
console.log("invalid article category while building urls for articles")
return "error.html"
} else {
return "article.html?category="+category+"&chapter="+chapter_id+"&article="+article_id;
}
}
function construct_articles() {
let data;
let parsed_data;
if (this.readyState == 4 && this.status == 200) {
data = this.responseText;
parsed_data = JSON.parse(data);
let chapter_index = 1;
let article_index = 1;
parsed_data.articles.theory.forEach(function(chapter){
contents.innerHTML += "<div id='chapter-"+chapter.chapter_name+"'>"+
"<h3>Chapter " + chapter_index + ": " + chapter.chapter_name + "</h3>" +
"<ul id='chapter-'" + chapter.chapter_articles + "-article-list'></ul></div>";
chapter.chapter_articles.forEach(function(article) {
document.getElementById("chapter-"+chapter.chapter_name).innerHTML += "<li><a href='" + article_url_builder("theory", chapter_index, article_index) + "'>" + article.name + "</a></li>";
article_index++;
});
chapter_index++;
}
);
}
}
xhrequest.onreadystatechange = construct_articles;
xhrequest.open("GET", "json/articles.json", true);
xhrequest.send();
</script>
</div>
</div>
</div>
<!-- End: Article Clean -->
<div style="background-color: #1f1f1f;">
<footer style="color: rgb(255,255,255);background-color: #1f1f1f;">
<div class="container">
<div class="row">
<!-- Start: Services -->
<div class="col-sm-6 col-md-3 item">
<h3>Contact</h3>
<ul>
<li>Email: nsdrozario@gmail.com</li>
</ul>
</div>
<!-- End: Services -->
<!-- Start: About -->
<div class="col-sm-6 col-md-3 item">
<h3>Information</h3>
<ul>
<li><a class='nav-item' href='about.html'>About Me</a></li>
<li><a class='nav-item' href='legal.html'>Legal</a></li>
</ul>
</div>
<!-- End: About -->
<!-- Start: Footer Text -->
<div class="col-md-6 item text">
<h3>Nathaniel D'Rozario</h3>
<p>Musician and programmer.</p>
</div>
<!-- End: Footer Text -->
</div>
<!-- Start: Copyright -->
<p class="text-center copyright">Nathaniel D'Rozario © 2020</p>
<!-- End: Copyright -->
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/script.min.js"></script>
</body>
</html>