-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
733 lines (679 loc) · 36 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
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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>CSS</title>
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/railscasts.min.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- Cover Image -->
<section>
<img src="https://codepen.io/netsi1964/pen/QEVKzz/image/large.png" alt="CSS Is Awesome">
</section>
<!-- Title Slide -->
<section>
<h1>CSS</h1>
<p>How to style your own website easily by using CSS <b>other</b> people spend ages making.</p>
</section>
<!-- Roadmap -->
<section>
<h2>Roadmap</h2>
<div class="fragment">
<strong>Part 1</strong>
Intro to HTML / CSS
<hr />
</div>
<div class="fragment">
<strong>Part 2</strong>
Frameworks
<hr />
</div>
<div class="fragment">
<strong>Part 3</strong>
Examples
<hr />
</div>
<div class="fragment">
<strong>Part 4</strong>
????
<hr />
</div>
</section>
<!-- Part 1; HTML / CSS -->
<section>
<!-- Root -->
<section>
<h2>1. What is HTML / CSS?</h2>
<img src="https://i.ytimg.com/vi/FGMD41faCSs/maxresdefault.jpg" alt="HTML5, CSS3 and JS6" />
</section> <!-- /root -->
<!-- HTML -->
<section>
<h2>HTML</h2>
<pre><code data-trim>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>My First Webpage</title>
</head>
<body>
<h1>Welcome to my first webpage!</h1>
</body>
</html>
</code></pre>
</section> <!-- /html -->
<!-- CSS -->
<section>
<h2>CSS</h2>
<pre><code data-trim>
body {
background-color: #ee6e73;
color: black;
font-family: monospace;
}
h1 {
color: white;
}
</code></pre>
</section> <!-- /css -->
</section>
<!-- /Part 1 -->
<!-- Part 2: Frameworks -->
<section>
<section>
<h2>2. CSS that other people make</h2>
<p class="fragment">a.k.a Frameworks</p>
<blockquote style="width: 100%;" class="fragment" cite="https://en.wikipedia.org/wiki/CSS_framework">
A CSS framework is a pre-prepared software framework that is meant to allow for easier, more standards-compliant web design using the Cascading Style Sheets language.
</blockquote>
</section>
<section>
<div class="card light z-depth-5">
<div class="card-content">
<h2>2. Frameworks</h2>
<blockquote cite="me" style="width: 100%;">
A CSS framework is a collection of CSS (and sometimes JS) files that make it easier to keep web pages styled consistently.
</blockquote>
</div>
</div>
</section>
</section>
<section>
<section>
<h2>Bootstrap</h2>
<img src="http://getbootstrap.com/docs/4.1/assets/brand/bootstrap-social.png" alt="Bootstrap" />
</section>
<section>
<h2>Bulma</h2>
<img src="https://bulma.io/images/bulma-banner.png" alt="Bulma" />
</section>
<section>
<h2>Materialize CSS</h2>
<img src="https://camo.qiitausercontent.com/7f815936d4171efe73193afad8220864e748ddbc/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f36343637372f38393430383237642d623262322d373134372d343331352d3563613238376634373061382e706e67" alt="Materialize CSS" />
</section>
</section>
<!-- /Part 2 -->
<!-- Part 3; Example -->
<section>
<h2>An Example Website</h2>
<div class="fragment">
Small "About Me" website.
<hr />
</div>
<div class="fragment">
Contains basic details about myself.
<hr />
</div>
<div class="fragment">
Provides a contact form.
<hr />
</div>
<div class="fragment">
Has to look nice. <small style="vertical-align: baseline;" class="fragment">(I'm shallow like that)</small>
<hr />
</div>
</section>
<section>
<section>
<h2>Step 1. HTML only</h2>
<pre><code data-trim>
<!DOCTYPE html>
<html lang="en">
<head>
<title>All about me!</head>
</head>
<body>
<h1>Freya Broderick</h1>
<h2>Education</h2>
<ul>
<li>BSc Computer Science, UCC</li>
<li>MSc in Pizza, School of NetSoc</li>
<li>PhD in Giving Hugs, School of Life</li>
</ul>
<h2>Work Experience</h2>
<ul>
<li>SysAdmin, UCC NetSoc</li>
<li>Programmer, in general</li>
</ul>
<h2>Contact Me</h2>
<form>
<label for="name">Your Name:</label><input type="text" id="name" name="name" />
<label for="message">Message:</label><textarea id="message" name="message"></textarea>
<input type="submit" />
</form>
</body>
</html>
</code></pre>
<a href="examples/1.html" target="_blank">View</a>
</section>
<section>
<h2>Step 2. Let's add Bulma</h2>
<pre><code data-trim>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>All about me!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
</head>
</code></pre>
<a href="examples/2.html" target="_blank">View</a>
</section>
<section>
<h2>Step 3. Titles</h2>
<pre><code data-trim>
<h1 class="title">Freya Broderick</h1>
...
<h2 class="title">Education</h2>
...
<h2 class="title">Work Experience</h2>
...
<h2 class="title">Contact Me</h2>
...
</code></pre>
<a href="examples/3.html" target="_blank">View</a>
</section>
<section>
<h2>Step 4. Container</h2>
<pre><code data-trim>
<body>
<div class="container">
<h1>Freya Broderick</h1>
...
</div>
</body>
</code></pre>
<a href="examples/4.html" target="_blank">View</a>
</section>
<section>
<h2>Step 5. Form</h2>
<pre><code data-trim>
<form>
<div class="field">
<label class="label" for="name">Your Name:</label>
<div class="control">
<input class="input" type="text" id="name" name="name" />
</div>
</div>
<div class="field">
<label class="label" for="message">Message:</label>
<div class="control">
<textarea class="textarea" id="message" name="message"></textarea>
</div>
</div>
<input class="button is-primary is-pulled-right" type="submit" />
</form>
</code></pre>
<a href="examples/5.html" target="_blank">View</a>
</section>
<section>
<h2>Step 6. Content</h2>
<pre><code data-trim>
<h1 class="title">Freya Broderick</h1>
<div class="content">
...
</div>
<h2 class="title">Education</h2>
<div class="content">
...
</div>
<h2 class="title">Work Experience</h2>
<div class="content">
...
</div>
</code></pre>
<a href="examples/bulma.html" target="_blank">View</a>
</section>
</section>
<section>
<section>
<h2>Bulma</h2>
<pre><code data-trim>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>All about me!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
</head>
<body>
<div class="container">
<h1 class="title">Freya Broderick</h1>
<h2 class="title">Education</h2>
<div class="content">
<ul>
<li>BSc Computer Science, UCC</li>
<li>MSc in Pizza, School of NetSoc</li>
<li>PhD in Giving Hugs, School of Life</li>
</ul>
</div>
<h2 class="title">Work Experience</h2>
<div class="content">
<ul>
<li>SysAdmin, UCC NetSoc</li>
<li>Programmer, in general</li>
</ul>
</div>
<h2 class="title">Contact Me</h2>
<form>
<div class="field">
<label class="label" for="name">Your Name:</label>
<div class="control">
<input class="input" type="text" id="name" name="name" />
</div>
</div>
<div class="field">
<label class="label" for="message">Message:</label>
<div class="control">
<textarea class="textarea" id="message" name="message"></textarea>
</div>
</div>
<input class="button is-primary is-pulled-right" type="submit" />
</form>
</div>
</body>
</html>
</code></pre>
<a href="examples/bulma.html" target="_blank">View</a>
</section>
<section>
<h2>Bootstrap</h2>
<pre><code data-trim>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>All about me!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
</head>
<body>
<div class="container">
<h1 class="title">Freya Broderick</h1>
<h2 class="title">Education</h2>
<div class="content">
<ul>
<li>BSc Computer Science, UCC</li>
<li>MSc in Pizza, School of NetSoc</li>
<li>PhD in Giving Hugs, School of Life</li>
</ul>
</div>
<h2 class="title">Work Experience</h2>
<div class="content">
<ul>
<li>SysAdmin, UCC NetSoc</li>
<li>Programmer, in general</li>
</ul>
</div>
<h2 class="title">Contact Me</h2>
<form>
<div class="field">
<label class="label" for="name">Your Name:</label>
<div class="control">
<input class="input" type="text" id="name" name="name" />
</div>
</div>
<div class="field">
<label class="label" for="message">Message:</label>
<div class="control">
<textarea class="textarea" id="message" name="message"></textarea>
</div>
</div>
<input class="button is-primary is-pulled-right" type="submit" />
</form>
</div>
</body>
</html>
</code></pre>
<a href="examples/bootstrap.html" target="_blank">View</a>
</section>
<section>
<h2>Materialize CSS</h2>
<pre><code data-trim>
<!DOCTYPE html>
<html lang="en">
<head>
<title>All about me! (Materialize)</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div class="container">
<h1>Freya Broderick</h1>
<h2>Education</h2>
<ul class="collection">
<li class="collection-item">BSc Computer Science, UCC</li>
<li class="collection-item">MSc in Pizza, School of NetSoc</li>
<li class="collection-item">PhD in Giving Hugs, School of Life</li>
</ul>
<h2>Work Experience</h2>
<ul class="collection">
<li class="collection-item">SysAdmin, UCC NetSoc</li>
<li class="collection-item">Programmer, in general</li>
</ul>
<h2>Contact Me</h2>
<form>
<div class="input-field">
<input type="text" id="name" name="name" />
<label for="name">Your Name</label>
</div>
<div class="input-field">
<textarea class="materialize-textarea" id="message" name="message"></textarea>
<label for="message">Message</label>
</div>
<input class="btn teal lighten-1 right" type="submit" />
</form>
</div>
<!--JavaScript at end of body for optimized loading-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</body>
</html>
</code></pre>
<a href="examples/materialize.html" target="_blank">View</a>
</section>
</section>
<!-- /Example -->
<!-- Extras -->
<section>
<section>
<h2>X1. Grid System</h2>
<div class="fragment">
Most, if not all, CSS Frameworks come with a row and column based grid system.
<hr />
</div>
<div class="fragment">
Using this, you can create responsive layouts that take up x/12 of the width allowed at all times.
<hr />
</div>
</section>
<section>
<h2>X1. Grid System</h2>
<img src="https://steemitimages.com/0x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1518242896/toi3jwvoox0pvztukcrl.png" alt="Bulma.io Grid System" />
</section>
<section>
<h2>X1. Grid System</h2>
<pre><code data-trim>
<div class="container">
...
<div class="columns">
<div class="column is-5">
<h2 class="title">Education</h2>
...
</div>
<div class="column is-7">
<h2 class="title">Work Experience</h2>
...
</div>
</div>
...
</div>
</code></pre>
<a href="examples/bulma-grid.html" target="_blank">View</a>
</section>
</section>
<section>
<h2>Other Things You Can Expect</h2>
<div class="fragment">
Alerts / Notifications
<hr />
</div>
<div class="fragment">
Cards / Panels
<hr />
</div>
<div class="fragment">
Navbars / Tabs
<hr />
</div>
<div class="fragment">
And More!
<hr />
</div>
</section>
<!-- /Extras -->
<!-- SCSS -->
<section>
<section>
<h2>4. ????</h2>
<blockquote class="fragment" style="width: 100%;">Isn't this all a hell of a lot of work for people?</blockquote>
</section>
<section>
<h2>4. CSS Preprocessors</h2>
<p>Well what if we could do programming stuff in CSS?</p>
</section>
<section>
<h2>4. CSS Preprocessors</h2>
<img src="https://cdn-images-1.medium.com/max/1600/1*gug9RW82pyTaW6kgY_Mvtw.png" alt="Sass CSS Logo" />
</section>
</section>
<section>
<section>
<h2>4. Sass</h2>
<p class="fragment">Syntactically Awesome Style Sheets</p>
<blockquote class="fragment" style="width: 100%;">
Sass is the most mature, stable, and powerful professional grade CSS extension language in the world.
</blockquote>
</section>
<section>
<h2>What Can It Do?</h2>
<div class="fragment">
<strong>Variables:</strong>
<code><var>$color</var>: #002366;</code>
<hr />
</div>
<div class="fragment">
<strong>Imports:</strong>
<code>@import "other";</code>
<hr />
</div>
<div class="fragment">
<strong>Maths:</strong>
<code><var>width</var>: 600px/960px * 100%;</code>
<hr />
</div>
<div class="fragment">
<strong>More:</strong>
Arrays, Dictionaries, Loops, Nesting
<hr />
</div>
</section>
</section>
<section>
<section>
<h2>Let's Make A Rainbow; HTML</h2>
<pre><code data-trim>
<!DOCTYPE html>
<html lang="en">
<head>
<title>A Sassy Rainbow</title>
</head>
<body>
<div class="stripe is-red"></div>
<div class="stripe is-orange"></div>
<div class="stripe is-yellow"></div>
<div class="stripe is-green"></div>
<div class="stripe is-blue"></div>
<div class="stripe is-indigo"></div>
<div class="stripe is-violet"></div>
</body>
</html>
</code></pre>
</section>
<section>
<h2>Let's Make A Rainbow; SCSS</h2>
<pre><code data-trim data-lang="scss">
// Normal CSS Works here too
* {
margin: 0;
padding: 0;
}
// Define the colours in a map
$stripes: (
"red": #F00,
"orange": #FF7F00,
"yellow": #FF0,
"green": #0F0,
"blue": #00F,
"indigo": #4B0082,
"violet": #9400D3,
);
// Define the colour bands
.stripe {
height: calc(100vh / 7);
text-align: center;
p {
color: white;
}
// For loop for defining the colour schemes
@each $name, $color in $stripes {
&.is-#{$name} {
background-color: #{$color};
}
}
}
</code></pre>
</section>
</section>
<section>
<h2>Let's Break It Down; Maps</h2>
<pre><code data-trim data-lang="scss">
// Define the colours in a map
$stripes: (
"red": #F00,
"orange": #FF7F00,
"yellow": #FF0,
"green": #0F0,
"blue": #00F,
"indigo": #4B0082,
"violet": #9400D3,
);
</code></pre>
</section>
<section>
<section>
<h2>Let's Break It Down; Nesting</h2>
<pre><code data-trim data-lang="scss">
// Define the colour bands
.stripe {
height: calc(100vh / 7);
text-align: center;
p {
color: white;
}
}
</code></pre>
</section>
<section>
<h2>Let's Break It Down; Nesting</h2>
<pre><code data-trim data-lang="scss">
.stripe {
height: calc(100vh / 7);
text-align: center;
}
.stripe p {
color: white;
}
</code></pre>
</section>
</section>
<section>
<h2>Let's Break It Down; Loops</h2>
<pre><code data-trim data-lang="scss">
// Define the colour bands
.stripe {
...
// For loop for defining the colour schemes
@each $name, $color in $stripes {
&.is-#{$name} {
background-color: #{$color};
}
}
}
</code></pre>
</section>
<section>
<section>
<h2>Putting it all together</h2>
<pre><code data-trim>
# Install Sass
gem install sass # Ruby
npm install -g sass # JS
brew install sass/sass/sass # Dart
# Compile the SCSS into CSS
sass rainbow.scss rainbow.css
</code></pre>
</section>
<section>
<h2>Putting it all together</h2>
<pre><code data-trim>
<head>
<title>A Sassy Rainbow</title>
<link href="rainbow.css" rel="stylesheet" />
</head>
</code></pre>
<a href="examples/scss/rainbow.html" target="_blank">View</a>
</section>
</section>
<section>
<h2>What are your questions?</h2>
<pre><code data-trim data-lang="ruby">
your_questions.each do |question|
self.answer question
end
</code></pre>
</section>
<section>
<h1>Thank you!</h1>
<br />
<h3>Slides:</h3> <a href="http://freyamade.netsoc.co/techtalks/css" target="_blank">freyamade.netsoc.co/techtalks/css</a>
<br />
<h3>Code:</h3> <a href="https://github.com/freyamade/netsoc-css-talk" target="_blank">freyamade/netsoc-css-talk</a>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
controls: true,
history: true,
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
]
});
</script>
</body>
</html>