-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCreatingTheUI.html
313 lines (284 loc) · 10.4 KB
/
CreatingTheUI.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Creating the User Interface</title>
<meta name="description" content="This session introduces the Jade templating language and Jade templates to build up views. Additionally, this demo introduces Bootstrap and how to use it in combination with Jade.">
<meta name="author" content="">
<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="../../_layouts/reveal.js/css/reveal.css">
<link rel="stylesheet" href="../../_layouts/reveal.js/css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="../../_layouts/reveal.js/lib/css/zenburn.css">
<!-- Custom styles -->
<link rel="stylesheet" href="../../_layouts/custom.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 ) ? '../../_layouts/reveal.js/css/print/pdf.css' : '../../_layouts/reveal.js/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="../../_layouts/reveal.js/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-state="title">
<h1>Creating the User Interface</h1>
</section>
<section data-state="agenda">
<h2>Agenda</h2>
<ol>
<li>Introduction to Jade</li>
<li>Implementing Bootstrap</li>
<li>Demo: Using Jade Templates with Bootstrap</li>
<li>Demo: Creating the chat UI</li>
</ol>
</section>
<section>
<section data-state="head">
<h2>Introduction to Jade</h2>
</section>
<section>
<h2>Templating with Jade?</h2>
<ul>
<li>Jade is a templating language to simplify writing HTML</li>
<li>SuppJade syntax and keywords map directly to HTML</li>
<li>Jade adds the ability to separate and extend your HTML
<ul>
<li>Helps prevent code repeat</li>
<li>Ensures clean HTML is generated</li>
<li>Allows you to insert values into HTML through templates</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Templating with Jade</h2>
<table style="width: 100%">
<thead>
<tr>
<th style="width:50%; padding:5px;">Simple Tags</th>
<th style="width:50%; padding:5px;">Output</th>
</tr>
</thead>
<tbody>
<tr>
<td><pre><code class="html" data-trim>
div
address
i
strong
</code></pre></td>
<td><pre><code class="html" data-trim>
<div>
<address></address>
<i></i>
<strong></strong>
</div>
</code></pre></td>
</tr>
</tbody>
</table>
</section>
<section>
<h2>Templating with Jade</h2>
<table>
<thead>
<tr>
<th>Tags with Attributes</th>
<th>Output</th>
</tr>
</thead>
<tbody>
<tr>
<td><pre><code class="html" data-trim>
h1(id="title") Welcome to Jade
button(class="btn", data-action="bea").
Be Awesome
</code></pre></td>
<td><pre><code class="html" data-trim>
<h1 id="title">Welcome to Jade</h1>
<button data-action="bea"
class="btn">Be Awesome</button>
</code></pre></td>
</tr>
</tbody>
</table>
</section>
<section>
<h2>Templating with Jade?</h2>
<p>
The extends keyword allows a template to extend a layout or parent template. It can then override certain pre-defined blocks of content.
</p>
<p>
The block keyword allows you to establish a block or replace the content of pre-defined blocks.
</p>
</section>
</section>
<section>
<section data-state="head">
<h2>Implementing Bootstrap</h2>
</section>
<section>
<h2>Bootstrap – Why use it?</h2>
<ul>
<li>CSS can be tricky</li>
<li>Cross browser support can be a challenge</li>
<li>Solves basic tasks (e.g. page layout without tables)</li>
<li>Bootstrap 3 makes it easier</li>
</ul>
</section>
<section>
<h2>Bootstrap Features</h2>
<div style="width:50%; float:left;">
<ul>
<li>Theme Support</li>
<li>Responsive</li>
<li>Grid system</li>
<li>Components
<ul>
<li>Pagination</li>
<li>Buttons</li>
<li>Modal</li>
</ul>
</li>
<li>Great Visual Studio support</li>
</ul>
</div>
<div style="width:50%; float:left;">
<img data-src="images/bootstrap-features.png" alt="Down arrow">
</div>
</section>
<section>
<h2>Bootstrap Grid System</h2>
<ul>
<li>Bootstrap works on a grid</li>
<li>The grid has 12 columns</li>
<li>There are four grids; one for each screen size
<ul>
<li>Large (1200px and higher)</li>
<li>Medium (992px-1200px)</li>
<li>Small (768px-991px)</li>
<li>Extra small (less than 768px)</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Bootstrap Grid System</h2>
<table style="font-size:64%;margin-top:2%">
<thead>
<tr>
<th></th>
<th>Extra small devices Phones (<768px)</th>
<th>Small devices Tablets (>=768px)</th>
<th>Medium devices Desktops (>=992px)</th>
<th>Large devices Desktops (>=1200px)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Grid behavior</td>
<td>Horizontal at all times</td>
<td colspan="3">Collapsed to start, horizontal above breakpoints</td>
</tr>
<tr>
<td>Container width</td>
<td>None (auto)</td>
<td>750px</td>
<td>970px</td>
<td>1170px</td>
</tr>
<tr>
<td>Class prefix</td>
<td>.col-xs-</td>
<td>.col-sm-</td>
<td>.col-md-</td>
<td>.col-lg-</td>
</tr>
<tr>
<td># of columns</td>
<td colspan="4">12</td>
</tr>
<tr>
<td>Column width</td>
<td>Auto</td>
<td>60px</td>
<td>78px</td>
<td>95px</td>
</tr>
<tr>
<td>Gutter width</td>
<td colspan="4">30px (15px on each side of a column)</td>
</tr>
</tbody>
</table>
<p>
<strong>Always 12 columns</strong>
</p>
</section>
<section>
<h2>Bootstrap Components</h2>
<img data-src="images/bootstrap-components.png" alt="Down arrow">
</section>
<section>
<h2>Bootstrap – Visual Studio Support</h2>
<ul>
<li>CSS Class IntelliSense</li>
<li>Updated templates and MVC scaffolding to use Bootstrap classes</li>
<li>Web Essentials - Missing class detection</li>
</ul>
<img data-src="images/bootstrap-visual-studio-support.png" alt="Down arrow">
</section>
<section>
<h2><a href="http://getbootstrap.com/">http://getbootstrap.com/</a></h2>
<img data-src="images/get-bootstrap.png" alt="Down arrow">
</section>
</section>
<section data-state="demo">
<h2>Demo</h2>
<h3>Using Jade Templates with Bootstrap</h3>
</section>
<section data-state="demo">
<h2>Demo</h2>
<h3>Creating the chat UI</h3>
</section>
<section style="text-align: left;" data-state="the-end">
<img data-src="../../_layouts/MicrosoftLogo.png" />
<p><small style="font-size:0.4em;">© 2016 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
</small></p>
</section>
</div>
<script src="../../_layouts/reveal.js/lib/js/head.min.js"></script>
<script src="../../_layouts/reveal.js/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: '../../_layouts/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '../../_layouts/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '../../_layouts/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '../../_layouts/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '../../_layouts/reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: '../../_layouts/reveal.js/plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>