-
Notifications
You must be signed in to change notification settings - Fork 0
/
day1.html
390 lines (300 loc) · 9.94 KB
/
day1.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Day 1 - Web Dev Intro</title>
<meta name="description" content="An introductory web development workshop for the DDJC">
<meta name="author" content="Aisha Blake">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/solarized.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<link rel="stylesheet" href="styles/main.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-markdown>
# Web Devlopment Workshop
</section>
<section data-markdown>
##HTML
HTML stands for HyperText Markup Language. It is the "hidden" code that we use to communicate
with others on the World Wide Web. When we write HTML code, we add "tags" that help to create
the structure of the page; tags tell the web browser just how to display the content of the
html document.
</section>
<section data-markdown>
### Syntax
Syntax is another word for grammar. Because computers are very literal machines,
we must use "good" syntax in our code.
</section>
<section>
<section data-markdown>
### Specific Tags
Tags are angled brackets that look like this <... >, with some letters or word inside
them. These brackets are on your keyboard, over the comma and the period. We type
words into these brackets to tell the computer what to do.
</section>
<section data-markdown>
- The `div` tag defines a division or section in an HTML document
- The `p` tag defines a paragraph
- The `img` tag defines an image
- The `a` tag defines a hyperlink
- The `ul` tag defines an unordered list
- The `li` tag defines a list item
</section>
</section>
<section data-markdown>
### Exercise
Go to `practice/ex-1/index.html` and build a webpage using the skills you just learned. Tell us a little about yourself!
</section>
<section data-markdown>
##CSS
</section>
<section>
<section data-markdown>
### The CSS Rule Set
</section>
<section data-markdown>
#### Selector
We use the selector to tell the computer what part (or parts) of our HTML we want to change with this CSS rule. A selector can be as simple as using the name of a tag or it can be very complex and specific.
```css
div {
}
```
</section>
<section data-markdown>
#### Property
The property is the thing about the selected element (or elements) that we want to change. There are _tons_ of these and I don't expect you to remember most of them. We'll talk about some very commonly-used ones to get you started.
```css
div {
background-color:
}
```
</section>
<section data-markdown>
#### Value
If the property is the aspect we want to change, the value is what we want to change it _to_.
```css
div {
background-color: blue;
}
```
</section>
<section data-markdown>
#### Bringing It All Together
- There's a colon (`:`) between properties and their values.
- Property/value pairs are separated with a semi-colon (`;`).
- We can have as many property/value pairs as we want, but we have to surround them with curly braces (`{}`).
```css
div {
background-color: blue;
color: limegreen;
font-size: 20px;
}
```
</section>
</section>
<section>
<section data-markdown>
### background
</section>
<section data-markdown>
#### What it Does
The `background` property is a quick way to change lots of different things related to the background of our web page's elements.
```css
div {
background-color: blue;
}
```
</section>
</section>
<section>
<section data-markdown>
### color
</section>
<section data-markdown>
#### What it Does
The `color` property changes the color of the _text_ inside the selected element.
```css
div {
color: limegreen;
}
```
</section>
</section>
<section>
<section data-markdown>
### width
</section>
<section data-markdown>
#### What it Does
We can use the `width` property to change the width of elements. By default, block elements like `p`s and `div`s will take up the full width of their parent elements.
```css
div {
width: 500px;
}
```
</section>
</section>
<section>
<section data-markdown>
### font-size
</section>
<section data-markdown>
#### What it Does
The `font-size` property affects the size of text.
```css
div {
font-size: 20px;
}
```
</section>
</section>
<section data-markdown>
### Exercise
Let's try using the CSS properties we've learned about!
Go to `practice/ex-2/styles.css` and add some CSS. Feel free to play around with additional HTML, too!
</section>
<section>
<section data-markdown>
### Specifying Color
</section>
<section data-markdown>
#### Keywords
Probably the easiest and fastest way to pick a color in CSS is to use a keyword. However, the available colors are limited. We can't be very exact in our color choices.
See this [list of available color names](http://www.crockford.com/wrrrld/color.html).
```css
div {
background-color: salmon;
}
```
</section>
<section data-markdown>
#### Hex Codes
Short for "hexadecimal codes", hex codes give us much more control over our color choices. Hex codes start with a pound symbol which is followed by six characters (0-9, A-F).
This [color picker](http://www.colorpicker.com/) will tell you what the hex code is for any color you choose.
```css
div {
background-color: #bcdfbb;
}
```
</section>
<section data-markdown>
#### RGBA
RGBA allows us to make the color transparent. We'll have to use four values: the amount of red, green, and blue the color we want contains (0-255), then a number from 0 to 1 to represent how transparent the color should be.
```css
div {
background-color: rgba(41, 133, 163, 0.6);
}
```
</section>
</section>
<section data-markdown>
### Exercise
Go back to `practice/ex-2/styles.css` and add in some color!
</section>
<section data-markdown>
##JavaScript
</section>
<section>
<section data-markdown>
###What is JavaScript?
</section>
<section data-markdown>
JavaScript is a programming language, so it's a little different than anything we've talked about so far. It's used to make websites interactive.
</section>
<section data-markdown>
### Semi-colons
Semi-colons (`;`) are very, very important in programming! They're like the periods of JavaScript, so don't forget about them!
</section>
</section>
<section data-markdown>
### Variables
Variable are like boxes that we can put different kinds of data in to refer to them later.
```javascript
var name = "Aisha";
var age = 25;
var isHappy = true;
```
</section>
<section data-markdown>
## Arrays
Arrays hold collections of information.
```javascript
var colors = ["red", "orange", "yellow", "green", "blue"];
```
</section>
<section data-markdown>
## Objects
Objects are a more complicated way to store data. We'll need to use these later on!
```javascript
var student =
{
name: "Ben",
age: 25,
hobbies: ["video games", "programming", "D & D"];
};
```
</section>
<section data-markdown>
## Functions
Functions allow us to package up our code and use it in other places.
```javascript
function sayHello(name) {
console.log("Hello, " + name + "!!");
}
```
</section>
<section>
<h3>Exercise</h3>
Go to [repl.it](https://repl.it/) and practice what we've just learned!
</section>
<section data-markdown>
### Closing
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<script src="js/app.js"></script>
</body>
</html>