-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
677 lines (614 loc) · 26.8 KB
/
index.html
File metadata and controls
677 lines (614 loc) · 26.8 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Theming in Drupal 8: un soplo de aire fresco.</title>
<meta name="description" content="Slides de la charla «Theming in Drupal 8: un soplo de aire fresco.» para la DrupalCamp Spain 2015">
<meta name="author" content="Pako Garcia">
<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/ymbra.css" id="theme">
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="lib/css/prism.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">
<span class="hashtag"><i class="fa fa-twitter"></i>#DrupalCampSpain2015</span>
<span class="twitter_account">@pakmanlh</span>
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section class="intro" data-background="images/climate-cold-glacier-iceberg-large.jpg">
<h1>Theming in Drupal 8</h1>
<h2>«un soplo de aire fresco»</h2>
</section>
<aside class="notes">
comentar que se pretende dar a conocer las ventajas y los avances en la capa de theming en Drupal 8
que permitirán hacer la vida a los desarrolladores frontend mucho más fácil.
</aside>
<section>
<h2>¿Quien soy? ¿De dónde vengo?</h2>
<h3>Pako Garcia</h3>
<p>
<small><a href="http://ymbra.com">Vegan Frontend developer at <img src="images/logo-ymbra.png" class="logo-ymbra"></a><br><a href="http://twitter.com/pakmanlh"> @pakmanlh</a> in the internets</small>
</section>
<section>
<h2>¿A todos nos gustan los ponies?</h2>
<p>
<img src="images/ponie.png" />
</p>
</section>
<section>
<h2>Recomendaciones del chef:</h2>
<ul>
<li><strong>10:30 to 11:30</strong><br> Render API en Drupal 7 & 8 <br> <em>Jose Luis Bellido</em></li>
<li><strong>12:00 to 13:00</strong><br> Drupal 8 Frontend for Backenders <br> <em>Lauri Eskola</em></li>
</ul>
</section>
<!-- Example of nested vertical slides -->
<section>
<section data-background="images/broken-car-vehicle-rust.jpeg">
<h1 style="background: none"><i class="fa fa-quote-left"></i>Cualquier tiempo pasado fue mejor<i class="fa fa-quote-right"></i></h1>
<h3 class="fragment" style="color: white">¿seguro?</h3>
</section>
<section>
<h1>Divitis</h1>
<h3>Marcado enriquecido <sup>tm</sup></h3>
<pre><code data-trim contenteditable>
<div class="foo bar baz whatever">
<div class="foo bar baz whatever">
<div class="foo bar baz whatever">
<h1 class="pane-title">Hola! soy el marcado de Drupal</h1>
<div class="node node-type node-viewmode-argh">
Otro div más, porque no...
</div>
</div>
</div>
</div>
</code></pre>
</section>
<section>
<h1>sobrecarga css</h1>
</section>
<section id="csslove">
<small>27 archivos css en Stark de Drupal 7</small>
<pre><code data-trim contenteditable class="max">
<style media="all">
@import url("sites/modules/system/system.base.css?mz4mz0");
@import url("sites/modules/system/system.menus.css?mz4mz0");
@import url("sites/modules/system/system.messages.css?mz4mz0");
@import url("sites/modules/system/system.theme.css?mz4mz0");</style>
<style media="all">
@import url("sites/modules/contextual/contextual.css?mz4mz0");
</style>
<style media="all">
@import url("sites/modules/aggregator/aggregator.css?mz4mz0");
@import url("sites/modules/book/book.css?mz4mz0");
@import url("sites/modules/comment/comment.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/date/date_api/date.css?mz4mz0");
@import url("sites/modules/field/theme/field.css?mz4mz0");
@import url("sites/modules/node/node.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/picture/picture_wysiwyg.css?mz4mz0");
@import url("sites/modules/poll/poll.css?mz4mz0");
@import url("sites/modules/search/search.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/search_krumo/search_krumo.css?mz4mz0");
@import url("sites/modules/user/user.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/video_filter/video_filter.css?mz4mz0");
@import url("sites/modules/forum/forum.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/views/css/views.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/admin_menu/admin_menu.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/admin_menu/admin_menu.uid1.css?mz4mz0");
</style>
<style media="all">
@import url("sites/sites/all/modules/contrib/ctools/css/ctools.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/panels/css/panels.css?mz4mz0");
@import url("sites/sites/all/modules/contrib/panels/plugins/layouts/twocol_stacked/twocol_stacked.css?mz4mz0");
@import url("sites/sites/all/themes/mothership/mothership/templates/panels//mothership-html5page/mothership-html5page.admin.css?mz4mz0");
</style>
<style media="all">
@import url("sites/themes/stark/layout.css?mz4mz0");
</style>
</code></pre>
</section>
<section>
<h1>sobrecarga css</h1>
<h3>5 classes para cada uno de los campos</h3>
<pre><code>
<div class="field field-something field-even_more another-field-cause-im-drupal">
El valor relevante
</div>
</code></pre>
</section>
<section>
<h1>Uso masivo de phptemplate</h1>
<h3>más de 5000 líneas de PHP en plantillas sin despeinarnos.</h3>
</section>
<section>
<h1>y demás lindezas</h1>
<ul>
<li>Theme functions</li>
<li>Difícil comprensión para no-expertos</li>
<li>Poco interés por el CSS</li>
<li>...</li>
</ul>
</section>
</section>
<section data-background="images/sea-beach-sun-sunshine-large.jpg">
<h4>pero...</h4>
<h1>drupal 8 está aquí!</h1>
<p class="fragment" style="color: white">
...o casi.
</p>
</section>
<section>
<section>
<h1>Cambios en la capa de theme</h1>
</section>
<section>
<h2 class="minus">Template process layer</h2>
<p class="fragment">…es historia!</p>
<aside class="notes">
<p>5:00 - 8:00</p>
<ul>
<li>El principal motivo de esta capa era para insertar cadenas en HTML</li>
<li>Drupal 8 prefiere el proceso perezoso renderizándolo lo más tarde posible y pudiendo así ser alterado también desde la plantilla directamente.</li>
</ul>
</aside>
</section>
<section>
<h2 class="minus">Theme functions</h2>
<p class="fragment">…están siendo convertidas a plantillas…<br>
<span class="fragment">(y en otros formatos).</span>
</p>
<p class="fragment">Solamente quedan 12! <a href="http://dgo.to/2348381">http://dgo.to/2348381</a></p>
<aside class="notes">
<p>8:00 - 11:00</p>
<li>Las funciones de theme son tan de Drupal 7</li>
<li>El marcado pertenece a las plantillas, no a las variables de tipo String</li>
<li>Restan 12 por convertir.</li>
</aside>
</section>
<section>
<h3>Adiós theme(), hola <br>render arrays</h3>
<small>Drupal 7:</small>
<pre><code class="language-php">
$variables['list'] = theme('item_list', array(
'items' => $items,
));
</code></pre>
<small>Drupal 8:</small>
<pre><code class="language-php">
$variables['list'] = [
'#theme' => 'item_list',
'#items' => $items,
];
</code></pre>
<aside class="notes">
<p>14:00 - 16:00</p>
<p>En vez de la variable <strong>list</strong> siendo una cadena de HTML, es un render array que es pasado a la plantilla y renderizado desde allí.</p>
</aside>
</section>
<section>
<h2 class="plus">Theme suggestion hooks</h2>
<small>Drupal 7:</small>
<pre class="fragment"><code data-trim class="language-php">
/**
* Implements hook_preprocess_HOOK() for node templates.
*/
function MYTHEME_preprocess_node(&$variables) {
$variables['theme_hook_suggestions'][] = 'node__' . 'my_first_suggestion';
$variables['theme_hook_suggestions'][] = 'node__' . 'my_second_more_specific_suggestion';
}
</code></pre>
<small class="fragment">Drupal 8:</small>
<pre class="fragment"><code data-trim class="language-php">
/**
* Implements hook_theme_suggestions_HOOK_alter() for node templates.
*/
function MYTHEME_theme_suggestions_node_alter(array &$suggestions, array $variables) {
$suggestions[] = 'node__' . 'my_first_suggestion';
$suggestions[] = 'node__' . 'my_second_suggestion';
}
</code></pre>
<aside class="notes">
<p>11:00 - 14:00</p>
<li>In Drupal 7 you could manipulate theme suggestions during preprocess, but by this point it might already be too late, or you've already done unnecessary preprocessing.</li>
<li>Drupal 8 splits out the manipulation of theme hook (template) suggestions into separate hooks.</li>
<li>You can see template suggestions in action when we talk about Twig debug in a few minutes.</li>
</aside>
</section>
</section>
<section>
<section>
<h2>Atributos</h2>
<div>
<small>Todos los atributos de la etiqueta:</small>
<pre><code class="language-twig"><div{{ attributes }}></code></pre>
</div>
<div class="fragment current-show">
<small>Cuidado con el primer espacio en blanco:</small>
<pre><code class="language-twig"><div {{ attributes }}></code></pre>
</div>
<div class="fragment">
<small>Este espacio se sumará quedando un código feo</small>
<pre class="language-twig"><code class="language-twig"><div✖{{ attributes }}></code></pre>
</div>
<aside class="notes">
<p>16:00 - 19:00</p>
<p>Attributes contain the attributes and also know how to print them properly. If you are printing the entire set of attributes, don't prepend a space.
</aside>
</section>
<section>
<h2>Atributos II</h2>
<div class="fragment">
<small>Dividiendo el atributo class</small>
<pre><code class="language-twig"><div class="myclass {{ attributes.class }}"{{ attributes|without('class') }}></code></pre>
</div>
<aside class="notes">
<p>16:00 - 19:00</p>
<p>Attributes contain the attributes and also know how to print them properly. If you are printing the entire set of attributes, don't prepend a space.
</aside>
</section>
<section>
<h2>Atributos III</h2>
<div>
Manipulación de Class:
<pre><code class="language-twig"><div{{ attributes.addClass('hola').removeClass('adiós') }}></code></pre>
</div>
<div class="fragment">
Testing:
<pre><code class="language-twig">{% if attributes.hasClass('field-label-inline') %}
{# Realizar algún código personalizado para la etiqueta inline. #}
{% endif %}</code></pre>
</div>
<aside class="notes">
<p>19:00 - 21:00</p>
</aside>
</section>
<section>
<h2>Atributos IV</h2>
<div>
Establecer un atributo:
<pre><code class="language-twig"><div{{ attributes.setAttribute('id', 'eye-d') }}></code></pre>
</div>
<div>
Borrar un atributo:
<pre><code class="language-twig"><div{{ attributes.removeAttribute('id') }}></code></pre>
</div>
<aside class="notes">
<p>21:00 - 21:30</p>
</aside>
</section>
<section>
<h3>Imprime lo que quieras, cuando quieras</h3>
<div>
<div class="fragment l-fifty">
<h4>Drupal 7:</h4>
<pre><code class="language-php">
// Ocultamos los comentarios y los links
// para imprimirlos después.
hide($content['comments']);
hide($content['links']);
print render($content);
// Render llama a show() en el elemento.
print render($content['links']);
// Para devolver los enlaces con el contenido.
show($content['links']);
// Imprime el contenido con enlaces pero todavía
// sin comentarios :(
print render($content);
</code></pre>
</div>
<div class="fragment l-fifty">
<h4>Drupal 8:</h4>
<pre><code class="language-twig">{# Imprime el contenido sin comentarios ni enlaces #}
{{ content|without('comments', 'links') }}
{# Imprime solamente los enlaces #}
{{ content.links }}
{# Imprime todo sin los comentarios! #}
{{ content|without('comments') }}
{# Imprime todo YUJU :) #}
{{ content }}
</code></pre>
</div>
</div>
<aside class="notes">
<p>21:30 - 23:00</p>
</aside>
</section>
</section>
<section>
<section class="twig">
<h2 class="plus">Uy sí, y Twig!</h2>
<p class="fragment">Creo que lo habréis notado… 😉</p>
<aside class="notes">
<p>23:00 - 25:00</p>
<ul>
<li>Twig is a flexible, fast, and secure template engine for PHP.</li>
<li>The Twig engine and initial integration code was committed during BADCamp in November 2012.</li>
<li>The conversions of .tpl.php to .html.twig files were committed during DrupalCon Portland in May 2013 and Twig is now the default template engine for Drupal 8.</li>
</ul>
</aside>
</section>
<section>
<small>services.yml:</small>
<pre><code class="language-yaml">parameters:
twig.config:
debug: true</code></pre>
<small>Ejemplo de código:</small>
<pre><code data-trim class="language-markup">
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'block' -->
<!-- FILE NAME SUGGESTIONS:
* block--bartik-powered.html.twig
* block--system-powered-by-block.html.twig
* block--system.html.twig
x block.html.twig
-->
<!-- BEGIN OUTPUT from 'core/modules/block/templates/block.html.twig' -->
<div class="block block-system contextual-region" id="block-bartik-powered" role="complementary">
<div data-contextual-id="block:block=bartik_powered:"></div>
<div class="content">
<span>Powered by <a href="http://drupal.org">Drupal</a></span>
</div>
</div>
<!-- END OUTPUT from 'core/modules/block/templates/block.html.twig' -->
</code></pre>
<aside class="notes">
<p>25:00 - 27:00</p>
</aside>
</section>
<section>
<h3>Drupal 7.33+ también!!</h3>
<small>settings.php:</small>
<pre><code class="language-php">$conf['theme_debug'] = TRUE;</code></pre>
<small>Example output:</small>
<pre><code data-trim class="language-markup">
<!-- THEME DEBUG -->
<!-- CALL: theme('block') -->
<!-- FILE NAME SUGGESTIONS:
* block--system--powered-by.tpl.php
* block--system.tpl.php
* block--footer.tpl.php
x block.tpl.php
-->
<!-- BEGIN OUTPUT from 'modules/block/block.tpl.php' -->
<div id="block-system-powered-by" class="block block-system">
<div class="content">
<span>Powered by <a href="https://www.drupal.org">Drupal</a></span>
</div>
</div>
<!-- END OUTPUT from 'modules/block/block.tpl.php' -->
</code></pre>
<aside class="notes">
<p>27:00 - 28:00</p>
</aside>
</section>
<section>
<h2>Twig magic</h2>
<pre><code data-trim class="language-php">
// Valor de un Array.
$bocadillo['tofu'];
// Propiedad de un objeto.
$bocadillo->tofu;
// También para el método mágico.
$bocadillo->__isset('tofu'); && $bocadillo->__get('tofu');
// Para un método de un objeto.
$bocadillo->tofu();
// Para un objeto obtenido con la convención get.
$bocadillo->getTofu();
// Objeto is convención método.
$bocadillo->isTofu();
// Método dinámico.
$bocadillo->__call('tofu');
</code></pre>
<p><code class="language-twig">{{ bocadillo.tofu }}</code></p>
<aside class="notes">
<p>38:00 - 40:00</p>
<p>Show Kint demo.</p>
<ul>
<li>checks if <code>sandwich</code> is an array and <code>cheese</code> a valid element;</li>
<li>if not, and if <code>sandwich</code> is an object, checks that <code>cheese</code> is a valid property;</li>
<li>if not, and if <code>sandwich</code> is an object, checks that <code>cheese</code> is a valid method;</li>
<li>if not, and if <code>sandwich</code> is an object, checks that <code>getBar</code> is a valid method;</li>
<li>if not, and if <code>sandwich</code> is an object, checks that <code>isBar</code> is a valid method;</li>
<li>if not, returns a <code>null</code> value.</li>
</ul>
</aside>
</section>
<section id="autoescape" class="title-slide">
<h2>Autoescape</h2>
<div class="fragment">
<pre><code data-trim class="language-php">
$user->field_first_name = "<script>alert('XSS')</script>";
</code></pre>
</div>
<div>
<div class="fragment">
<small>Drupal 7:</small>
<pre><code data-trim class="language-php">MAL <span> <?php print $user->field_first_name; ?></span></code></pre>
<pre><code data-trim class="language-php">BIEN <span> <?php print check_plain($user->field_first_name); ?></span></code></pre>
</div>
<div class="fragment">
<small>Drupal 8:</small>
<pre><code data-trim class="language-twig">BIEN <span>{{ user.field_first_name }}</span></code></pre>
<pre><code data-trim class="language-twig">MAL <span> {{ user.field_first_name|raw }}</span></code></pre>
</div>
</div>
</section>
<section>
<h3>Extender «bloques» con Twig</h3>
<p><small>Definimos una «zona variante» </small><br><strong>page.html.twig</strong></p>
<pre><code data-trim class="language-twig">
{% block variante %}
{% endblock %}
</code></pre>
</section>
<section>
<h3>Extender «bloques» con Twig</h3>
<p><small>Heredamos toda la página, <br>modificando <strong>solamente</strong> ese trozo </small><br><strong>page--front.html.twig</strong></p>
<pre><code data-trim class="language-twig">
{% extends "page.html.twig" %}
{% block variante %}
<h4>Contenido específico de la página principal.</h4>
{% endblock %}
</code></pre>
<p><small></small></p>
</section>
<section>
<h2>Modificar marcado del menu</h2>
<p><small>Usando una <a href="http://twig.sensiolabs.org/doc/tags/macro.html">macro</a> recursivo de Twig en</small> <strong>menu.html.twig</strong></p>
<h3 class="fragment">Ejemplo!</h3>
</section>
<section>
<h2>Modificar marcado del paginador</h2>
<p><small>Modificando</small> <strong>pager.html.twig</strong></p>
<h3 class="fragment">Ejemplo!</h3>
</section>
</section>
<section>
<section>
<h1><i class="fa fa-briefcase"></i> Classy</h1>
<h3>un nuevo base theme <em>amigo</em></h4>
<aside class="notes">
Comentar el motivo por el cual se ha quitado todas las clases de core directamente. Para fomentar la posible escalabilidad futura con otro nuevo classy 2.
</aside>
</section>
<section>
<small>Drupal 7</small>
<h2>Theme Stark</h2>
<h3 class="fragment">HTML + class="foo"</h3>
<span class="fragment"><small>Drupal 8</small>
<h2 >Theme Stark + <i class="fa fa-briefcase"></i> Classy</h2></span>
<h3 class="fragment">HTML + class="foo"</h3>
</section>
<section>
<h2>¿Nuestro theme?</h2>
<h3 class="fragment">Usando solamente <i class="fa fa-bullseye"></i>
Core</h3>
<pre class="fragment"><code data-trim class="language-twig"><div> {{{ code }} </div> </code></pre>
<h3 class="fragment">Con <i class="fa fa-briefcase"></i> Classy como Basetheme</h3>
<pre class="fragment"><code data-trim class="language-twig"><div class="node node—contentype"> {{{ code }} </div> </code></pre>
</section>
<section>
<h2><i class="fa fa-briefcase"></i> Classy <i class="fa fa-folder-open-o"></i>
</h2>
<h3>Organización por tipos de plantillas</h3>
<img src="images/classy_folder.jpg">
</section>
<section>
<h2>Definir <i class="fa fa-briefcase"></i> Classy como Basetheme
</h2>
<small>*.info.yml</small>
<pre ><code data-trim class="language-twig">base theme: classy</code></pre>
</section>
</section>
<section>
<section>
<h1><i class="fa fa-cog"></i>
Configurando un Theme</h1>
</section>
<section>
<h2>¿Dónde viven ahora?</h2>
<h3>[root]/themes/[theme_name]</h3>
</section>
<section>
<h2>Archivos de configuración</h2>
<ul class="config_theme_files">
<li class="fragment"><i class="fa fa-info-circle"></i> [our_theme].info.yml</li>
<li class="fragment"><i class="fa fa-book"></i> [our_theme].libraries.yml</li>
<li class="fragment"><i class="fa fa-file-photo-o"></i> [our_theme].breakpoints.yml</li>
<li class="fragment"><i class="fa fa-gears"></i> [our_theme].theme.yml</li>
</ul>
<h3 class="fragment">Ejemplo!</h3>
</section>
</section>
<section>
<section>
<h1>Mejoras en CSS</h1>
<h3><a href="https://drupal.org/node/1887918">Nueva arquitectura CSS (1887918)</a></h3>
<pre ><code data-trim class="language-twig">
.notification {
/* Estilos generales para todas las notificaciones. */
}
.notification--info {
/* Ajustes de color concretos. */
} </code></pre>
</section>
<section>
<h1>Mejoras en CSS</h1>
<h3><a href="https://drupal.org/node/1887918">Nueva arquitectura CSS (1887918)</a></h3>
<pre ><code data-trim class="language-twig">
/* Componente botón */
.button {
/* estilos */
}
/* Clase modificadora del botón */
.button--primary {
/* Modificadores y añadidos. */
} </code></pre>
<pre><code>
<!-- La variante se creará aplicando ambas class, componente y modificador. -->
<button class="button button--primary">Guardar</button>
</code></pre>
</section>
<section>
<h1>Mejoras en CSS</h1>
<h3><a href="https://www.drupal.org/node/1190252">CSSLint como arma (1190252)</a></h3>
<p>Herramienta para mejorar la calidad del código.</p>
<p><a href="https://github.com/CSSLint/csslint/wiki">https://github.com/CSSLint/csslint/wiki</a></p>
<p><a href="https://github.com/lewisnyman/drupalcore-frontend-toolkit">Drupal Core Frontend toolkit</a></p>
<p><a href="http://lewisnyman.co.uk/drupalcore-frontend-toolkit/">Status</a></p>
</section>
</section>
<section>
<section>
<h2>Gracias!</h2>
<h1>That's all folks</h1>
<h3>¿Preguntas?</h3>
<p><img src="images/questions.png" style="float: right; width: 40%; margin-top: -2em"><i class="fa fa-envelope-o"></i>
pako@ymbra.com<br>
<i class="fa fa-twitter-square"></i>
@pakmanlh</p>
</section>
</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: false,
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, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>