-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.html
More file actions
397 lines (322 loc) · 11.9 KB
/
3.html
File metadata and controls
397 lines (322 loc) · 11.9 KB
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
391
392
393
394
395
396
397
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>We ♥ CSS</title>
<meta name="viewport" content="width=1024">
<!-- Replace path with correct path to deck.core.css. -->
<link rel="stylesheet" href="src/deck.js/core/deck.core.css" type="text/css">
<!-- Core and extension CSS files -->
<link rel="stylesheet" href="src/deck.js/extensions/navigation/deck.navigation.css">
<link rel="stylesheet" href="src/deck.js/extensions/status/deck.status.css">
<link rel="stylesheet" href="src/deck.js/extensions/hash/deck.hash.css">
<link rel="stylesheet" href="src/deck.js/extensions/menu/deck.menu.css">
<link rel="stylesheet" href="src/css/prettify.css">
<link rel="stylesheet" href="src/css/deck.coder.css">
<!-- Theme -->
<link rel="stylesheet" id='style-theme-link' href="src/css/coderdeck.css" type="text/css" >
<link rel="stylesheet" href="src/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="src/codemirror/theme/default.css">
<link href='http://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>
<!-- Replace path with correct path to Modernizr file. -->
<script src='src/jquery.min.js'></script>
<script src="src/modernizr.js"></script>
</head>
<body class="deck-container">
<script type='text/coderdeck' id='coderdeck-default'>
<html>
<head>
<script src='src/jquery.min.js'>SCRIPTEND
</head>
<body>
CODE
</body>
</html>
</script>
<script type='text/coderdeck' id='coderdeck-plain'>
<html>
<title>test</title>
<link rel="stylesheet" href="reset.css">
<body>
CODE
</body>
</html>
</script>
<script type='text/coderdeck' id='coderdeck-css-playground'>
<html>
<title>test</title>
CODE
<body>
<h1>I'm a H1 heading</h1>
<h2>I'm a H2 heading</h2>
<p>Pargraph of text <p></p>
<div class='stuff'><div> with class "stuff"</div>
<div id='my-div'><div> with id "my-div"</div>
</body>
</html>
</script>
<script type='text/coderdeck' id='coderdeck-style-example'>
<html>
<title>test</title>
<style>
CODE
</style>
<body>
<h1>I'm a H1 heading</h1>
<h2>I'm a H2 heading</h2>
<h3>Pargraph of text <p> here</p>
<div class='stuff'>I'm a div <div> with class "stuff"</div>
<div id='my-div'>I'm a <div> with id "my-div"</div>
</body>
</html>
</script>
<!-- Create any number of elements with class slide within the container -->
<article class='slide slide-subhead'>
<h1>StartUp Institute</h1>
<h2>CSS Basics</h2>
</article>
</article>
<article class='slide slide-accent'>
<h1>Let's Talk CSS</h1>
</article>
<article class="slide slide-list">
<h1>Cascading Style Sheets</h1>
<ul>
<li class="slide">
<h3>Used for “presentation” of your HTML</h3>
</li>
<li class="slide">
<h3>Controls the styles of your page</h3>
</li>
<li class="slide">
<h3>Also Controls the layout of your page (where stuff is positioned)</h3>
</li>
<li class="slide">
<h3>Can have different styles for different media formats (eg. print, screen, mobile)</h3>
</li>
</ul>
</article>
<article class="slide slide-image">
<h1>What is a style?</h1>
<img src='images/css.png'/>
</article>
<article class='slide slide-list'>
<h1>We Pick a Selector</h1>
<p class="slide">(A selector is the part of our HTML we want to style, for example, h1, h2, p or li)<br/></p>
<div class="slide example"><em> h1</em> <span class='slide'> { color:red; }</span></div>
<div class="slide example"><em> h2</em> <span class='slide'> { font-size:20px; }</span></div>
<div class="slide example"><em> a</em> <span class='slide'> { text-decoration:none; }</span></div>
<p class="slide">You can also pick id or class names, as well as multiple tags- but for now let's keep it simple</em>
</p>
</article>
<article class='slide slide-list'>
<h1>We Make a Declaration</h1>
<p class="slide">(using CSS properties and values we add formatting)<br/></p>
<div class="slide example">p<span class='slide'> { <em> color:red; </em>}</span></div>
<div class="slide example"> h2<span class='slide'> { <em> font-size:20px;</em> }</span></div>
<div class="slide example"> a <span class='slide'> { <em> text-decoration:none; </em> }</span></div>
<p class="slide">Remember google is your friend here's a quick <a href="http://www.lesliefranke.com/files/reference/csscheatsheet.html">cheat sheet</a>
</p>
</article>
<article class='slide slide-list'>
<h2>Lets Try this!</h2>
<p>try making your paragraph red </p>
<p class="notes">(for in browser exercises you will work between the <style> tags, best practice is to write in a separate document)</p>
<textarea class='coder-editor coder-editor-split coder-editor-instant' data-coder-template="coderdeck-plain" id='coderdeck-default'>
<style>
/*try adding a style here!*/
</style>
<html>
<p>This is some paragraph text.</p>
</html>
</textarea>
</article>
<article class='slide slide-accent'>
<h1>We have lots of Styles</h1>
</article>
<article class="slide slide-list">
<h1>Style Properties</h1>
<ul>
<li class="slide">
<h3>color:</h3>
</li>
<li class="slide">
<h3>background-color:</h3>
</li>
<li class="slide">
<h3>border-radius:</h3>
</li>
<li class="slide">
<h3>font: style variant weight size family</h3>
</li>
<li class="slide">
<h3>text-align:</h3>
</li>
<li class="slide">
<h3>text-indent:</h3>
</li>
<li class="slide">
<h3>opacity:</h3>
</li>
<li class="slide">
<h3>line-height</h3>
</li>
<li class="slide">
<h3>letter-spacing, word-spacing</h3>
</li>
<li>
<h3 class="slide">Remember google is your friend here's a quick <a href="http://www.lesliefranke.com/files/reference/csscheatsheet.html">cheat sheet</a>
</h3></li>
</ul>
</article>
<article class="slide slide-list">
<h1>Values</h1>
<ul>
<li class="slide">
<h3>colors: #FFF, #FFFFFF, rgb(255,255,255), rgba(255,255,255, 1), gray, black, red</h3>
</li>
<li class="slide">
<h3>numbers: 0, 25px, 1.1em, 100% <span class="notes">(em's are 'M' height - and these inherit/multiply)</span>
</h3>
</li>
</ul>
</article>
<article class='slide slide-list'>
<h2>Properties Playground</h2>
<p>Try playing with line-height, font-size, letter-spacing, & text-transform</p>
<textarea class='coder-editor coder-editor-split coder-editor-instant' data-coder-template="coderdeck-plain" id='coderdeck-default'>
<style>
p {
}
</style>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
</textarea>
</article>
<article class='slide slide-accent'>
<h1>Combining Selectors</h1>
</article>
<article class='slide slide-subhead'>
<h1>You can add styles to multiple selectors</h1>
<h3>Like all the h1, h2, & h3s</h3>
</article>
<article class="slide slide-list">
<h2> Us a comma (,) for multiple selectors</h2>
<pre><h3><em>.h1, .h2</em> { color:red; }</h3></pre>
</article>
<article class='slide slide-subhead'>
<h1>Or specify certain selectors</h1>
<h3>Like only links inside a nav</h3>
</article>
<article class="slide slide-list">
<h2> Can “Cascade” styles with spaces between selectors</h2>
<h3>HTML<pre><nav ><li> ... </li></nav></pre></h3>
<h3> CSS<pre><em>nav li </em> { color:red; } /* only p's inside of outer */</pre>
</h3>
</article>
<article class="slide slide-list">
<h2>Lots of Psudeo-classes too</h2>
<pre><em>a:hover</em> { color:blue; } /* only links we are hovering over */<br/>
<em>a:visited</em> { color:red; } /* links we've visited already */<br/>
<em>p:first-child</em> { color:red; } /* the first paragraph in a container */<br/>
</pre>
</article>
<article class='slide slide-list'>
<h2>Selector Combination Exercise</h2>
<p>Try using some combinations</p>
<textarea class='coder-editor coder-editor-split coder-editor-instant' data-coder-template="coderdeck-plain" id='coderdeck-default'>
<style>
</style>
<header>
<h1>My Site!</h1>
<nav><ul>
<li><a href='#'>Link 1</a></li>
<li><a href='#'>Link 2</a></li>
</ul></nav>
</header>
<section id='content'>
<article class='blog-post'>
<h1>Blog Post 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
</article>
<article class='blog-post'>
<h1>Blog Post 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
</article>
</section>
<footer>
<a href='#'>Link 1</a> | <a href='#'>Link 2</a>
</footer>
</textarea>
</article>
<article class='slide slide-accent'>
<h1>How do we use this in our sites?</h1>
</article>
<article class='slide slide-subhead'>
<h1>Your CSS goes in 1 document</h1>
<h3>often named style.css<h3>
</article>
<article class='slide slide-subhead'>
<h1>You link to this document in each HTML page's head</h1>
</article>
<article class='slide slide-list'>
<p><br/><img src="images/style-linking-example.gif" class='top-image'/><br/><br/></p>
</article>
<article class='slide slide-list'>
<h2>This goes in Your HTML</h2>
<pre class='prettyprint'>
<head>
<link href="stylesheet.css" rel="Stylesheet" type="text/css" />
</head>
</pre>
</article>
<article class='slide slide-accent'>
<h1>Best Practices</h1>
</article>
<article class='slide slide-subhead'>
<h1>Different Browsers<br/> = Different Styles</h1>
<h3>Every browser uses a different set of base styles.<br/>
which can cause your styles to look different in each browser</h3>
</article>
<article class='slide slide-subhead'>
<h1>Keep it Consitant</h1>
<h3>So we use either a reset or modernizer to start make our designs consistant</h3>
<h2><a href="http://necolas.github.com/normalize.css/">Normalizer.css</a><br/><a href="http://meyerweb.com/eric/tools/css/reset/">Reset</a></h2>
</article>
<article class='slide slide-list'>
<h1>Remember</h1>
<ul>
<li><h3>Styles are Separate from HTML</h3></li>
<li><h3>Usually only need 1 style sheet</h3></li>
<li><h3>Link to CSS in your HTML</h3></li>
<li><h3>Your CSS should start with a <a href='http://meyerweb.com/eric/tools/css/reset/'>RESET</a></h3></li>
</ul>
</article>
<article class='slide slide-accent'>
<h1>You are getting good at this!<br/>On to Your Lab!</h1>
</article>
<!-- Update these paths to point to the correct files. -->
<script src="src/jquery.tmpl.min.js"></script>
<script src="src/deck.js/core/deck.core.js"></script>
<!-- Code Mirror -->
<script src="src/codemirror/lib/codemirror.js"></script>
<script src="src/codemirror/mode/xml/xml.js"></script>
<script src="src/codemirror/mode/css/css.js"></script>
<script src="src/codemirror/mode/javascript/javascript.js"></script>
<script src="src/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<!-- Prettify -->
<script src="src/prettify.js"></script>
<!-- Deck Core and extensions -->
<script src="src/deck.js/extensions/status/deck.status.js"></script>
<script src="src/deck.js/extensions/navigation/deck.navigation.js"></script>
<script src='src/deck.coder.js'></script>
<script src="src/deck.js/extensions/hash/deck.hash.js"></script>
<script src="src/deck.js/extensions/menu/deck.menu.js"></script>
<script>
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>