/
index.html
561 lines (527 loc) · 23 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
<!--
Google IO 2012/2013 HTML5 Slide Template
Authors: Eric Bidelman <ebidel@gmail.com>
Luke Mahé <lukem@google.com>
URL: https://code.google.com/p/io-2012-slides
-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">-->
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--This one seems to work all the time, but really small on ipad-->
<!--<meta name="viewport" content="initial-scale=0.4">-->
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" media="all" href="theme/css/default.css">
<link rel="stylesheet" media="all" href="theme/css/webcomponents.css">
<link rel="stylesheet" media="all" href="bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="theme/css/phone.css">
<base target="_blank"> <!-- This amazingness opens all links in a new tab. -->
<script data-main="js/slides" src="js/require-1.0.8.min.js"></script>
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="elements/about-me.html">
<link rel="import" href="elements/layout-container.html">
<link rel="import" href="elements/my-panel.html">
<link rel="import" href="elements/audio-with-eq.html">
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<slide class="logoslide nobackground">
<article class="flexbox vcenter">
<img class="webcomponents" src="images/geekTalks/logo.svg" />
<img class="wc-parts customelements" src="images/geekTalks/icon-customelements.png" />
<img class="wc-parts htmlimports" src="images/geekTalks/icon-htmlimports.png" />
<img class="wc-parts templates" src="images/geekTalks/icon-templates.png" />
<img class="wc-parts shadowdom" src="images/geekTalks/icon-shadowdom.png" />
</article>
<footer style="color: #fff; font-size:30px;">http://webslides.github.io/</footer>
</slide>
<slide class="about-slide">
<hgroup>
<h2><about-me></h2>
</hgroup>
<article>
<about-me username="IvanZmerzlyi" contacts photo info></about-me>
</article>
</slide>
<slide class="title-slide segue nobackground">
<div class="logos auto-fadein">
<img class="webcomponents" src="images/geekTalks/logo.svg" />
<span class="separator"> / </span>
<img class="polymer" src="images/geekTalks/polymer-m-logo.jpg" />
</div>
<hgroup class="auto-fadein">
<h1 data-config-title><!-- populated from slide_config.json --></h1>
<h2 data-config-subtitle><!-- populated from slide_config.json --></h2>
</hgroup>
<aside class="note">
<section>
<p>
От валидации форм до переноса бизнес логики на клиент.
Мы уже разрабатываем не сайты а веб приложения.
Которые изо дня в день, становяться все сложнее.
</p>
</section>
</aside>
</slide>
<slide class="big-task">
<hgroup class="centered">
<h2>Ключевое правило при разработке сложных вещей?</h2>
</hgroup>
<article class="flexbox vcenter">
<img src="images/geekTalks/mks.jpg" alt="Сложная вещь" title="Сложная вещь">
</article>
<aside class="note">
<section>
<p>
Вопрос для аудитории
</p>
</section>
</aside>
</slide>
<slide class="big-task-answer">
<hgroup class="centered">
<h2>!!! Никогда не делайте сложных вещей !!!</h2>
</hgroup>
<article class="flexbox vcenter">
<img src="images/geekTalks/satellite-expanded.jpg" alt="Сложная вещь состоит из более простых" title="Сложная вещь состоит из более простых">
</article>
<aside class="note">
<section>
<p>
Часто сложное состоит из более простого.
И можно собрать сложный проект из простых компонентов.
Расмотрим пример сайта.
</p>
</section>
</aside>
</slide>
<slide class="twitter-screenshot">
<article class="flexbox vcenter">
<img style="max-width: 100%" src="images/geekTalks/twitter-page.jpg" alt=""/>
</article>
<footer class="source"><a href="https://twitter.com/addyosmani">https://twitter.com/addyosmani</a></footer>
<aside class="note">
<section>
<p>
Мы можем выделить четкие компоненты из которых может состоять веб приложение.
</p>
</section>
</aside>
</slide>
<slide class="twitter-page">
<div class="holder">
<div class="screenshot">
<img style="max-width: 100%" src="images/geekTalks/twitter-page.jpg" />
</div>
<div class="components-list">
<h3 style="margin-bottom: 10px;">Компоненты страницы</h3>
<ul class="build">
<li>Главное меню</li>
<li>Профиль автора</li>
<li>Tab панель</li>
<li>Список твитов</li>
<li>Близкие по духу</li>
<li>Актуальные темы</li>
<li>...</li>
</ul>
</div>
</div>
<div class="holder">
<ul class="build" style="list-style: none">
<li>
<div>Главное меню</div>
<ul class="build">
<li>Блок ссылок</li>
<li>Блок логотипа</li>
<li>Блок поиска</li>
<li>Кнопка профиля</li>
<li>Кнопка Твитнуть</li>
</ul>
</li>
</ul>
</div>
</slide>
<slide class="page-code">
<hgroup>
<h2>Как можно представить код страницы</h2>
</hgroup>
<article>
<pre class="prettyprint" data-lang="html">
<header><br>
<b> <top-menu></top-menu></b><br>
</header><br>
<aside><br>
<b> <profile-card></profile-card></b><br>
</aside><br>
<main><br>
<b> <tab-panel></tab-panel></b><br>
<b> <tweets-container></tweets-container></b><br>
</main><br>
<aside><br>
<b> <whotofollow-block></whotofollow-block></b><br>
<b> <trends-block></trends-block></b><br>
</aside>
</pre>
<div class="build">
<h2>Веб-компоненты — это возможность добавлять свои элементы в браузер</h2>
</div>
</article>
</slide>
<slide class="webcomponents-list">
<hgroup>
<h2>Веб-компоненты</h2>
<h3>набор стандартов</h3>
</hgroup>
<article>
<ul>
<li>Custom Elements</li>
<li>Shadow DOM</li>
<li>HTML Templates</li>
<li>HTML Imports</li>
</ul>
</article>
<aside class="web-animation flexbox vcenter build">
<div>
<img class="webcomponents" src="images/geekTalks/logo.svg" />
<img class="wc-parts customelements" src="images/geekTalks/icon-customelements.png" />
<img class="wc-parts htmlimports" src="images/geekTalks/icon-htmlimports.png" />
<img class="wc-parts templates" src="images/geekTalks/icon-templates.png" />
<img class="wc-parts shadowdom" src="images/geekTalks/icon-shadowdom.png" />
</div>
</aside>
</slide>
<slide class="customelementsSpec">
<hgroup>
<h2>Custom Elements</h2>
</hgroup>
<article>
Позволяет описывать для новых элементов свои свойства, методы, объявлять свой DOM, подобие конструктора и многое другое.
<br/>
<br/>
Открывают такие нужные для веб компонентов возможности:
<br/>
<br/>
<ul>
<li>Определить новые HTML/DOM элементы</li>
<li>Создания элементов, которые расширяються от других элементов</li>
<li>Логично связать вместе пользовательские функции в одном теге</li>
<li>Расширить API существующих элементов DOM</li>
</ul>
</article>
<aside class="note">
<section>
<p>
Самая важная по моему мнению часть веб компонентов.
</p>
</section>
</aside>
</slide>
<slide class="customelementsSpecExample">
<hgroup>
<h2>Создание собственых элементов</h2>
</hgroup>
<article>
<div>
<pre class="prettyprint" data-lang="js">
var MyCustomProto = Object.create(HTMLElement.prototype);<br/>
MyCustomProto.createdCallback = function() {<br/>
this.innerHTML = "My Custom Element";<br/>
this.addEventListener('click', function(e) {<br/>
alert('MyCustomElement click callback!');<br/>
});<br/>
};<br/>
document.registerElement("my-custom", {<br/>
prototype: MyCustomProto<br/>
});<br/>
</pre>
<pre class="prettyprint" data-lang="html">
<my-custom></my-custom>
</pre>
<a href="http://jsfiddle.net/DangelZM/k3dr03rf/">Example</a>
</div>
</article>
</slide>
<slide class="customelementsSpecExample2">
<hgroup>
<h2>Расширение встроенных элементов</h2>
</hgroup>
<article>
<div>
<pre class="prettyprint" data-lang="js">
var MyButtonProto = Object.create(HTMLButtonElement.prototype);<br/>
MyButtonProto.createdCallback = function() {<br/>
this.innerHTML = "My Button Element";<br/>
this.addEventListener('click', function(e) {<br/>
alert('MyButtonElement click callback!');<br/>
});<br/>
};<br/>
document.registerElement("my-button", {<br/>
prototype: MyButtonProto,<br/>
extends: 'button'<br/>
});<br/>
</pre>
<pre class="prettyprint" data-lang="html">
<button is="my-button"></button> // !!!
</pre>
<a href="http://jsfiddle.net/DangelZM/etoyw2qx/">Example</a>
</div>
</article>
</slide>
<slide class="life-cycle">
<hgroup>
<h2>Жизненный цикл</h2>
</hgroup>
<article>
<div style="line-height: 40px;">
В прототипе своего элемента мы можем задать специальные методы,
которые будут вызываться при создании, добавлении и удалении элемента из DOM:
</div>
<br/>
<table>
<tr>
<td>createdCallback</td><td>Элемент создан</td>
</tr>
<tr>
<td>attachedCallback</td><td>Элемент добавлен в документ</td>
</tr>
<tr>
<td>detachedCallback</td><td>Элемент удалён из документа</td>
</tr>
<tr>
<td>attributeChangedCallback(name, prevValue, newValue)</td><td>Атрибут добавлен, изменён или удалён</td>
</tr>
</table>
</article>
</slide>
<slide class="shadowDom">
<hgroup>
<h2>Shadow DOM</h2>
</hgroup>
<article>
Инструмент инкапсуляции HTML/CSS.
<br/><br/>
<div style="line-height: 30px;">
Это внутренний DOM элемента, который существует отдельно от внешнего документа.
В нём могут быть свои ID, свои стили и так далее. Причём снаружи его, без применения специальных техник,
не видно, поэтому не возникает конфликтов. <br/><br/>
Отличный пример — элементы <b><audio></b> и <b><video></b>. В коде мы размещаем один тег, а браузер отображает
несколько элементов (слайдеры, кнопки, окно проигрывателя). В Chrome эти и некоторые другие элементы используют
Shadow DOM.
</div>
<br/><br/>
<div>
<audio controls="controls"></audio><br/><br/>
<input type="range" min="1" max="100"/><br/><br/>
<input type="date"/>
</div>
</article>
</slide>
<slide class="templatesSpec">
<hgroup>
<h2>HTML Templates</h2>
</hgroup>
<article>
Фрагменты HTML, которые программист собирается использовать в будущем.
<br/><br/>
<div style="line-height: 30px;">
В web components шаблоны — это фрагменты DOM.
Браузер парсит их содержимое, но не выполняет до тех пор, пока мы не вставим его в документ.
То есть браузер не будет загружать картинки, аудио и видео, не будет выполнять скрипты.<br/><br/>
Тег <b><template></b> не призван заменить системы шаблонизации.
В нём нет хитрых операторов итерации, привязок к данным.<br/><br/>
Его основная особенность — это возможность вставки «живого» содержимого, вместе со скриптами.
</div>
</article>
</slide>
<slide class="importsSpec">
<hgroup>
<h2>HTML Imports</h2>
</hgroup>
<article>
Импорт задуман как часть платформы Web Components и дает возможность
вставить один документ в другой при помощи <br/>HTML-тега <b><link rel="import"></b>
<br/><br/>
<div style="line-height: 30px;">
Предполагается, что главный документ может импортировать файлы-определения,
в которых будут все необходимые HTML, JS и CSS для элементов, а затем использовать их.
</div>
</article>
</slide>
<slide class="vendors">
<hgroup class="centered">
<h2>Ситуация с подержкой</h2>
</hgroup>
<article class="flexbox vcenter">
<img style="max-width: 100%;" src="images/geekTalks/support.jpg">
<footer class="source"><a href="http://jonrimmer.github.io/are-we-componentized-yet/">http://jonrimmer.github.io/are-we-componentized-yet/</a></footer>
</article>
</slide>
<slide class="libraries">
<hgroup>
<h2>Libraries</h2>
</hgroup>
<article>
<ul>
<li>
<a href="http://www.polymer-project.org/">
<img src="images/geekTalks/icon-polymer.png" />
<p>Polymer by Google</p>
</a>
</li>
<li>
<a href="http://x-tags.org/">
<img src="images/geekTalks/icon-xtags.png" />
<p>X-Tags by Mozilla</p>
</a>
</li>
<li>
<a href="http://bosonic.github.io/">
<img src="images/geekTalks/icon-bosonic.png" />
<p>Bosonic</p>
</a>
</li>
</ul>
</article>
</slide>
<slide class="polymer-title nobackground">
<article class="flexbox vcenter">
<div style="position: relative; padding-left: 120px; height: 120px;">
<img style="position: absolute; top: 0;left: 0;" class="polymer-logo" src="images/geekTalks/polymer-m-logo.jpg" />
<span style="font-size: 80px; line-height: 120px; padding-left: 30px;">Polymer</span>
</div>
</article>
</slide>
<slide class="about-polymer">
<hgroup>
<h2>Что такое Polymer?</h2>
</hgroup>
<article>
<div style="font-size: 30px;line-height: 45px; color: 333;">
<b>Polymer</b> это библиотека (сами разработчики называют это, набором полифилов и синтаксического сахара)
для создания и использования веб-компонент.
</div>
</article>
</slide>
<slide class="polymer-catalog">
<hgroup class="centered">
<h2>Polymer Catalog</h2>
</hgroup>
<article class="flexbox vcenter">
<img style="max-width: 100%" src="images/geekTalks/polymer-catalog.jpg">
<footer class="source">
<a href="https://elements.polymer-project.org/">
https://elements.polymer-project.org/
</a>
</footer>
</article>
</slide>
<slide class="links">
<hgroup class="centered">
<h2>Полезные ссылки</h2>
</hgroup>
<article class="flexbox vcenter">
<ul>
<li><a href="http://webcomponents.org/">Сайт Webcomponents.org</a></li>
<li><a href="https://www.polymer-project.org/1.0/">Сайт библиотеки Polymer</a></li>
<li><a href="https://elements.polymer-project.org/">Каталог Polymer елементов</a></li>
<li><a href="http://cds-polymer.appspot.com/">Пример приложения "Контакты"</a></li>
</ul>
</article>
</slide>
<slide class="polymer-example">
<hgroup class="centered">
<h2>Example</h2>
</hgroup>
<article class="flexbox vcenter">
<pre class="prettyprint" data-lang="html">
<my-panel class="primary" header="My custom panel" settings closeable>...</my-panel><br/>
<my-panel class="success" header="Success panel" closeable>...</my-panel><br/>
<my-panel class="info" header="Info panel">...</my-panel><br/>
<my-panel class="warning" header="Warning panel">...</my-panel><br/>
<my-panel class="danger" header="Danger panel" closeable>...</my-panel><br/>
</pre>
<layout-container class="row">
<my-panel class="box b2 primary" header="My custom panel" settings closeable>
<h1>My custom panel</h1>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Vestibulum vestibulum gravida lectus vel tincidunt.
Etiam consequat bibendum enim quis venenatis. In hac habitasse platea dictumst.
</my-panel>
<my-panel class="box b2 success" header="Success panel" closeable>
<h1>Success panel</h1>
Phasellus eu nulla id ex posuere cursus. Nam eleifend venenatis tempus.
Praesent ullamcorper tellus et nisl pellentesque, sit amet fermentum sapien lobortis.
</my-panel>
<my-panel class="box b2 info" header="Info panel">
<h1>Info panel</h1>
Phasellus eu nulla id ex posuere cursus. Nam eleifend venenatis tempus.
Praesent ullamcorper tellus et nisl pellentesque, sit amet fermentum sapien lobortis.
</my-panel>
</layout-container>
<layout-container class="row">
<my-panel class="box b1 warning" header="Warning panel">
<h1>Warning panel</h1>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Vestibulum vestibulum gravida lectus vel tincidunt.
Etiam consequat bibendum enim quis venenatis. In hac habitasse platea dictumst.
</my-panel>
<my-panel class="box b2 danger" header="Danger panel" closeable>
<h1>Danger panel</h1>
Phasellus eu nulla id ex posuere cursus. Nam eleifend venenatis tempus.
Praesent ullamcorper tellus et nisl pellentesque, sit amet fermentum sapien lobortis.
Suspendisse tristique magna non purus fringilla dictum sit amet nec erat.
</my-panel>
</layout-container>
</article>
</slide>
<slide class="polymer-example">
<hgroup class="centered">
<h2>Example2</h2>
</hgroup>
<article class="flexbox vcenter">
<pre class="prettyprint" data-lang="html" style="font-size: 16px;">
<audio-with-eq class="ui-blue" source="music/LillyWood-PrayerInC.mp3" color="#369"></audio-with-eq>><br/>
<audio-with-eq class="ui-red" source="music/Royksopp-Here_she_comes_again.mp3" color="#AC0303"></audio-with-eq><br/>
<audio-with-eq class="ui-dark" source="music/Rasmus-In_shadow.mp3" color="#555"></audio-with-eq>
</pre>
<div style="display: flex;flex-direction: row">
<div style="flex: 1;">
<audio-with-eq class="ui-blue" song="Lilly Wood - Prayer In C" source="music/LillyWood-PrayerInC.mp3" color="#369"></audio-with-eq>
</div>
<div style="flex: 1;margin-left: 20px;">
<audio-with-eq class="ui-red" song="Royksopp - Here she comes again" source="music/Royksopp-Here_she_comes_again.mp3" color="#AC0303"></audio-with-eq>
</div>
<div style="flex: 1;margin-left: 20px;">
<audio-with-eq class="ui-dark" song="Rasmus - In shadow" source="music/Rasmus-In_shadow.mp3" color="#555"></audio-with-eq>
</div>
</div>
</article>
</slide>
<slide class="fill nobackground" style="background-image: url(images/geekTalks/disco_background.png)">
<div style="position: absolute;top:0;left:0;right:0;bottom:0;background: #222; opacity: 0.5"></div>
<hgroup style="position: relative; z-index: 1">
<h2 class="white auto-fadein" style="font-size: 80px; line-height: 80px; text-shadow: 5px 5px 0 #000;">
COMPONENTIZE <br/><span style="font-size: 100px;line-height: 100px;">THE WEB!!!</span>
</h2>
</hgroup>
</slide>
<slide class="thank-you-slide segue nobackground">
<article class="flexbox vleft auto-fadein">
<h2><thank-you> !!!</h2>
</article>
<p class="auto-fadein">
<about-me class="white" username="IvanZmerzlyi" contacts></about-me>
</p>
</slide>
<slide class="backdrop"></slide>
</slides>
<!--[if IE]>
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<script>CFInstall.check({mode: 'overlay'});</script>
<![endif]-->
</body>
</html>