This repository has been archived by the owner on Mar 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
211 lines (198 loc) · 10.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Creating Games with JavaScript</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:200,400,700">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<style>
/* Animations */
@-webkit-keyframes shake {
0% { -webkit-transform: translateX(0); }
25% { -webkit-transform: translateX(10px); }
50% { -webkit-transform: translateX(0); }
75% { -webkit-transform: translateX(10px); }
100% { -webkit-transform: translateX(0); }
}
@keyframes shake {
0% { -webkit-transform: translateX(0); transform: translateX(0); }
25% { -webkit-transform: translateX(10px); transform: translateX(10px); }
50% { -webkit-transform: translateX(0); transform: translateX(0); }
75% { -webkit-transform: translateX(10px); transform: translateX(10px); }
100% { -webkit-transform: translateX(0); transform: translateX(0); }
}
@-webkit-keyframes pulse {
0% { box-shadow: 0 1px 12px rgba(51, 204, 255, 0.2); }
50% { box-shadow: 0 0 12px rgba(51, 204, 255, 0.9); }
100% { box-shadow: 0 0 12px rgba(51, 204, 255, 0.2); }
}
@keyframes pulse {
0% { box-shadow: 0 1px 12px rgba(51, 204, 255, 0.2); }
50% { box-shadow: 0 0 12px rgba(51, 204, 255, 0.9); }
100% { box-shadow: 0 0 12px rgba(51, 204, 255, 0.2); }
}
/* Global styles */
body { font-size: 16px; font-family: Lato, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, sans-serif; }
.container { max-width: 1000px !important; }
.container-full { position: relative; padding: 30px 0; }
.container-full .container { max-width: 100%; }
.inverse { background: black; color: white; }
a, a:hover, a:active { color: inherit; text-decoration: none !important; display: inline-block; border-bottom: 1px solid #222; -webkit-transition: border-bottom-color 0.3s; transition: border-bottom-color 0.3s; }
a:hover, a:active { border-bottom-color: transparent; }
nav a, nav a:hover, nav a:active { border-bottom: 0; }
/* Navigation Bar */
.navbar-static-top { margin-bottom: 0; }
/* Intro Section */
.jumbotron { margin-bottom: 0; background-image: radial-gradient(rgb(100, 100, 100) 0, black 100%); }
h1 { padding: 30px 0 0; margin-bottom: 0; }
h1 span { display: block; }
#cg { color: #ea9999; }
#js { color: #fbde2d; font-family: Consolas, Courier New, Courier, monospace; font-size: 80%; }
#link { display: inline-block; font-family: Consolas, Courier New, Courier, monospace; margin-bottom: 30px; font-size: 1em; width: 100%; text-align: left; }
#js::before { content: '// '; }
#intro a, #intro a:hover, #intro a:active { color: inherit; text-decoration: none; display: inline-block; border-bottom: 1px solid white; -webkit-transition: border-bottom-color 0.3s; transition: border-bottom-color 0.3s; }
#intro a:hover, #intro a:active { border-bottom-color: transparent; }
/* Subheadings */
h2 { color: black; margin: 0 auto 20px; padding: 0; }
h2 a, h2 a:hover, h2 a:active { display: inline-block; width: 100%; padding: 10px 0; border-bottom: 0; }
h2::after { content: ''; display: block; background: rgba(135, 135, 135, 0.5); width: 100%; height: 1px; margin: 0 0 15px; -webkit-transition: background 0.3s; transition: background 0.3s; }
:target h2::after, h2:hover::after, h2:active::after { background: #007cd6; }
/* Footer */
#fin { background: #222; padding: 20px 0; }
footer.container-full { //padding: 20px 0; }
footer a { border-bottom-color: white; }
/* Larger displays */
@media (min-width: 768px) {
#link { text-align: center; }
a { transition: text-decoration 0.5s; }
#js { font-size: 50%; }
.container-full { padding: 50px 0; }
h1 span:hover { -webkit-animation: shake 0.5s ease-in-out; animation: shake 0.5s ease-in-out; }
#fin { background-image: radial-gradient(rgb(100, 100, 100) 0, black 100%); }
}
</style>
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">CGJS</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="#intro">Home</a></li>
<li><a href="#overview">Overview</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Lessons <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#l1">Lesson 1</a></li>
<li><a href="#l2">Lessons 2 & 3</a></li>
<li><a href="#l4">Lesson 4</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div id="intro" class="jumbotron inverse">
<div class="container">
<div class="row">
<div class="col-md-offset-3 col-md-6">
<h1>
<span id="cg">Creating Games</span>
<span id="js">with JavaScript</span>
</h1>
<span id="link"><a href="http://git.io/cgjs-15">git.io/cgjs-15</a></span>
</div>
</div>
<div class="row text-center">
<div class="col-md-offset-3 col-md-6">
<p>Victoria School 2015 Choice Elective</p>
<p><a href="https://twitter.com/demoneaux">Benjamin Tan</a> | <a href="https://twitter.com/wei2912">Ng Wei En</a></p>
</div>
</div>
</div>
</div>
<div id="overview" class="container-full"><div class="container">
<div class="row">
<h2 class="col-md-12"><a href="#overview">Overview</a></h2>
<p class="col-md-12 lead">
Ever wondered how games worked?
</p>
<p class="col-md-12">
In this course, we teach JavaScript, a popular web programming language, and guide students through creating their own games, including the classic Tic-Tac-Toe game. By the end of this course, every student will gain a basic understanding of programming (in particular the JavaScript programming language and associated technologies) and be able to write simple games.
</p>
<p class="col-md-12">
<sup>*</sup> Students are warned that this choice elective is quite intensive and will make use of math.
</p>
</div>
</div></div>
<div id="l1" class="container-full" style="background: #f5f5f5"><div class="container">
<div class="row">
<h2 class="col-md-12"><a href="#l1">Lesson 1: “Hello, World!”</a></h2>
<p class="col-md-12 lead">
In this lesson, we will introduce the JavaScript programming language, and cover the basics, including statements, variables, primitive types and various operators. Of course, we’ll conclude with the customary “Hello, World!” tutorial.
</p>
<div class="col-md-12">
<ul>
<li><a href="https://wei2912.github.io/cgjs/helloworld">Slides</a></li>
<li><a href="http://sublimetext.com/3">Sublime Text 3 — Text editor</a></li>
<li><a href="http://jsbin.com/">JSBin — Online JS coding platform</a></li>
<li><a href="https://developer.mozilla.org/en-US/">Mozilla Developer Network — Documentation</a></li>
<li><a href="http://git.io/vqTnL">Exercises</a></li>
</ul>
</div>
</div>
</div></div>
<div id="l2" class="container-full"><div class="container">
<div class="row">
<h2 class="col-md-12"><a href="#l2">Lessons 2 & 3: Guess the Number</a></h2>
<p class="col-md-12 lead">
In this lesson, we will cover more JavaScript fundamentals such as branches and loops, objects and functions. Then, we’ll put all these together to create a simple Guess the Number game.
</p>
<div class="col-md-12">
<ul>
<li><a href="https://wei2912.github.io/cgjs/guessthenum">Slides</a></li>
<li><a href="http://git.io/vLUCA">Demo</a></li>
<li><a href="http://jsbin.com/coxekodaso/edit?js,output">Template</a></li>
<li><a href="http://git.io/vLUlp">Exercises</a></li>
</ul>
</div>
</div>
</div></div>
<div id="l4" class="container-full" style="background: #f5f5f5"><div class="container">
<div class="row">
<h2 class="col-md-12"><a href="#l4">Lesson 4: Tic-Tac-Toe (Logic)</a></h2>
<p class="col-md-12 lead">
In this lesson, we will teach about arrays and prototypes. We’ll then go through and write a program to cover the logic of a simple Tic-Tac-Toe game.
</p>
<div class="col-md-12">
<ul>
<li><a href="https://wei2912.github.io/cgjs/tictactoe">Slides</a></li>
<li><a href="http://git.io/vYpj0">Demo</a></li>
<li><a href="http://jsbin.com/luqitaxari/edit?js,console">Template</a></li>
</ul>
</div>
</div>
</div></div>
<div id="fin" class="container-full inverse"><div class="container">
<footer class="row">
<p class="col-md-12 text-center">
<strong>Creating Games with JavaScript</strong> is a Victoria School 2015 Choice Elective.<br>
© 2015 by <a href="https://twitter.com/demoneaux">Benjamin Tan</a> and <a href="https://twitter.com/wei2912">Ng Wei En</a>
</p>
</footer>
</div></div>
<script src="resources/bootstrap.js"></script>
</body>
</html>