-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
502 lines (479 loc) · 16.3 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
<!DOCTYPE html lang="fr">
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="static/reveal.js/dist/reveal.css" />
<link rel="stylesheet" href="static/slideshow.css" />
<link
rel="stylesheet"
href="static/reveal.js/plugin/highlight/zenburn.css"
/>
<!-- <link rel="stylesheet" href="static/reveal.js/plugin/highlight/zenburn.css"> -->
<title>L’écran et le papier</title>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>L’écran et le papier</h1>
<p>
une histoire croisée de CSS pour l’impression<br />par Paged.js ×
WeasyPrint
</p>
</section>
<section>
<ol>
<li>Poser les termes</li>
<li>Bâtir les spécifications</li>
<li>Prendre des chemins différents</li>
<li>Construire ensemble</li>
</ol>
</section>
<section>
<h2>Poser les termes</h2>
</section>
<section>
<h3>Cher public, qui es-tu ?</h3>
</section>
<section>
<h3>Cher public, qui sommes-nous ?</h3>
</section>
<section>
<h3>De quoi qu’on parle ?</h3>
</section>
<section>
<img alt="w3c logo" src="static/images/WWW-LetShare.svg" />
<p>1991 <br />(Tim Berners-Lee)</p>
</section>
<section>
<figure>
<blockquote>
The WorldWideWeb (W3) is a wide-area hypermedia information
retrieval initiative aiming to give universal access to a large
universe of documents
</blockquote>
<figcaption>Tim Berners-Lee</figcaption>
</figure>
</section>
<section>
<h3>HTML</h3>
<p><em>circa</em> 1991</p>
</section>
<section>
<h3>Exemple de HTML</h3>
<pre style="font-size: 0.6em"><code>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Le titre de la page</title>
</head>
<body>
<h1>Le titre principal</h1>
<section>
<p>Un paragraphe dans une <strong>section</strong>.</p>
</section>
<section>
<p id="un-id">Un paragraphe dans une section, avec <em>un id</em>.</p>
</section>
<section>
<p class="une-classe">Un paragraphe dans une section, avec <em>une classe</em>.</p>
</section>
<section class="une-classe">
<p>
Un paragraphe dans une <strong>section</strong>.
<em>La section a la même classe que le paragraphe précédent</em>.
</p>
</section>
</body>
</html>
</code></pre>
</section>
<section>
<h3>Résultat de HTML</h3>
<iframe src="static/html.html"></iframe>
</section>
<section>
<h3>CSS</h3>
<p><em>circa</em> 1996</p>
</section>
<section>
<p>HTML / CSS</p>
<h3>Séparation du contenu et de la présentation</h3>
<aside class="notes">
So, the main characteristic of the web is the separation of content,
the semantic structure of a document and the presentation, the
visual rendering. <br />
This is really a revolution for graphic designers, who have been
used to designing layouts for print media for debate.
</aside>
</section>
<section>
<h3>Exemple de CSS</h3>
<pre style="font-size: 0.6em"><code>
h1 {
color: pink;
}
section {
border: 3px solid cyan;
margin: 1em;
}
p {
font-size: 20pt;
}
#un-id {
color: #72ed7e;
}
.une-classe {
border: 3px solid purple;
}
</code></pre>
</section>
<section>
<h3>Résultat de CSS</h3>
<iframe src="static/html-css.html"></iframe>
</section>
<section>
<h3>Responsive</h3>
<p><em>circa</em> 2010</p>
</section>
<section>
<p>Responsive design with CSS media queries</p>
<img
alt="a image showing the same content on different screens"
src="static/images/responsive.png"
style="display: block; margin-top: 1em; margin-bottom: 2em"
/>
<code>@media screen and (min-width: 1080px){...}</code>
</section>
<section>
<h3>JavaScript</h3>
<p><em>circa 1996</em></p>
</section>
<section>
<h3>Exemple de JavaScript</h3>
<pre style="font-size: 0.6em"><code>
Array.prototype.random = function () {
return this[Math.floor((Math.random()*this.length))];
}
var paragraph = document.getElementById("un-id");
paragraph.textContent += "Je viens du JS !";
for(var i = 0; i < 4; i++) {
var div = document.createElement('div');
div.style.cssText = "background: " + ["pink", "cyan", "#77a832", "#6d65db", "#dbae65", "#cd65db"].random() + "; border: 5px solid red;";
div.style.cssText += "position: absolute; top: " + Math.random() * 70 + "%; left: " + Math.random() * 50 + "%; width: 30%; padding: 0 1em";
div.innerHTML = '<p>FORMATION -30% EN CLIQUANT ICI</p><p>Réveillez le mâle alpha qui sommeile en vous</p>';
document.body.appendChild(div);
}
</code></pre>
</section>
<section>
<h3>Résultat de JavaScript</h3>
<iframe src="static/html-css-js.html"></iframe>
</section>
<section>
<h2>Bâtir les spécifications</h2>
</section>
<section
data-background-color="white"
data-background-size="contain"
data-background="static/images/css-proposal.png"
></section>
<section
data-background-color="white"
data-background-size="contain"
data-background="static/images/css-proposal.png"
>
<blockquote>
<p>
Current browsers consider the computer screen to be the primary
presentation target, but [CSS] has the potential of supporting
many output media, e.g. <strong>paper</strong>, speech and
braille.
</p>
</blockquote>
</section>
<section>
<h3>Créer un PDF avec le navigateur</h3>
</section>
<section
data-background-color="black"
data-background-size="contain"
data-background="static/images/firefox-03-print.png"
></section>
<section
data-background-color="black"
data-background-size="contain"
data-background="static/images/firefox-04-pdf.png"
></section>
<section>
<h3>Flux → Pagination</h3>
<img src="static/images/flux-pagination.png" />
</section>
<section>
<h3>Fonctionnalités manquantes</h3>
<p>
Titres courants, numéros de page, double pages, position des
éléments en fonction de la page, table des matières, etc.
</p>
</section>
<section>
<img src="static/images/w3c_logo.svg" />
<p>
Organisme international de standardisation <br />pour
le World Wide Web <br />(Créé par Tim Berners-Lee en
1994)
</p>
</section>
<section
data-background-color="white"
data-background-size="contain"
data-background="static/images/W3C-specification_meme.png"
></section>
<section
data-background-color="white"
data-background-size="contain"
data-background="static/images/css3-modules.png"
></section>
<section
data-background-color="white"
data-background-size="contain"
data-background="static/images/css3-modules_pagedmedia.png"
></section>
<section>
<pre style="font-size: 0.6em; max-width: 60%; margin: auto"><code>
@page {
size: 148mm 210mm;
margin-top: 20mm;
margin-bottom: 60mm;
}
@page:left {
margin-left: 36mm;
margin-right: 12mm;
@bottom-left {
content: counter(page);
vertical-align: center;
}
@bottom-center {
content: string(title);
vertical-align: center;
}
}
h1#title {
string-set: title content(text);
}
</code></pre>
</section>
<section>
<h3>Printed book</h3>
<p><em>circa</em> 1452</p>
<h3>Website</h3>
<p><em>circa</em> 1991</p>
</section>
<section>
<h2>Prendre des chemins différents</h2>
</section>
<section>
<h3>L’histoire de WeasyPrint</h3>
</section>
<section>
<ul>
<li>Il faut générer des rapports et des factures en PDF</li>
<li>On essaie de faire du PDF à la main, LaTeX, OpenOffice</li>
<li>On essaie d’utiliser Firefox et Chrome, mais…</li>
</ul>
</section>
<section>
<h4>Et si on écrivait notre propre navigateur ?</h4>
<p>C’est une <strong>super</strong> idée !</p>
<p>
<small>
Tiens, j’ai fait une preuve de concept qui lit vaguement du HTML
et du CSS, qui dessine des lettres et des bordures autour, ça
coupe même les pages ! C’est <em>quasi</em> fini, j’en suis sûr.
</small>
</p>
<p>
<small>
<small>
Faudrait quand même que je lise les spécifications un de ces
jours… Ça marche comment les tableaux ? Les flottants ? Les
couleurs ? La cascade ? Le DOM ? Le HTML ? Les URL ? HTTP ? Les
encodages ? Les fontes ? La transparence ? Les gradients ? Le
SVG ?
</small>
</small>
</p>
</section>
<section>
<figure>
<blockquote style="font-size: 0.8em">
<p>
<strong>Are we crazy? Yes. But not that much.</strong> Each
modern web browser did take many developers’ many years of work
to get where they are now, but WeasyPrint’s scope is much
smaller: there is no user-interaction, no JavaScript, no live
rendering (the document doesn’t changed after it was first
parsed) and no quirks mode (we don’t need to support every
broken page of the web.)
</p>
<p>
<strong
>We still need however to implement the whole CSS box model
and visual rendering.</strong
>
This is a lot of work, but we feel we can get something useful
much quicker than “Let’s build a rendering engine!” may seem.
</p>
</blockquote>
<figcaption>Simon Sapin</figcaption>
</figure>
</section>
<section>
<h4>Les avantages</h4>
<ul>
<li>
On crée un moteur de rendu réellement fait pour la pagination
</li>
<li>
On est (plutôt) indépendants vis-à-vis des autres moteurs de rendu
</li>
<li>On apporte un peu de diversité dans le monde du web</li>
</ul>
</section>
<section>
<h4>Les inconvénients</h4>
<ul>
<li>On doit faire tout le moteur de rendu</li>
<li>On bénéficie peu des avancées des autres moteurs</li>
<li>On court sans cesse après les nouvelles fonctionnalités CSS</li>
</ul>
</section>
<section>
<h3>L’histoire de Paged.js</h3>
</section>
<section>
<h3>
Booksprints, des livres en cinq jours, de l’écriture à la
publication
</h3>
<p>L’urgence de publier face aux outils classiques <br/>de mise en page</p>
<p>Web2print, HTML2Print, CSSPrint, whatever2Print</p>
</section>
<section>
<h3>un outil sur mesure <br />pour les booksprints</h3>
<p>Book.js</p>
<p>
Utilise les <span class="magic">régions CSS</span> pour faire la
pagination
</p>
<p>
<small
>je rentre pas dans le détail mais c’était top, ça marchait bien,
<br/>
et on pouvait faire plein de trucs.</small
>
</p>
</section>
<section>
<h3>Games of Chromes</h3>
<p>
Chrome décide de ne plus supporter les
<del class="magic">régions CSS</del>.
</p>
<p>
<a
href="https://alistapart.com/blog/post/css-regions-considered-harmful/"
>L’article de <em>A list apart</em> avec des « Arguments »</a
>
</p>
</section>
<section>
<h3>Ketida (FKA Editoria) <br />le CMS pour le livre</h3>
<p>Le navigateur pour écrire, pour éditer, pour publier</p>
<img src="./static/images/ketida.jpg" alt="ketida home page" />
</section>
<section>
<p>Le navigateur pour mettre en page</p>
<img src="./static/images/pagedjs.jpg" alt="" />
</section>
<section>
<h4>Les avantages</h4>
<ul>
<li>Le navigateur fait (presque) tout le boulot</li>
<li>La prévisualisation et les outils d’inspection</li>
<li>Javascript pour manipuler les contenus <br/>et leur mise en page</li>
</ul>
</section>
<section>
<h4>Les inconvénients</h4>
<ul>
<li>Les navigateurs font (pas suffisament) tout le boulot</li>
<li>
Les limitations du web et les avancées assez lentes des navigateurs
</li>
<li>@media print, sur un écran (pt, px, CMJN, RVB)</li>
</ul>
</section>
<section>
<h3>On fait de chouettes impressions</h3>
<small>Allez voir la bibliothèque ToPrint !</small>
<figure class="grid">
<img src="static/images/exemples/books-thumbnail.jpg" />
<img src="static/images/exemples/chiragan-2.jpg" />
<img src="static/images/exemples/cityfab2.jpg" />
<img src="static/images/exemples/controverses-3.jpg" />
<img src="static/images/exemples/invoices-thumbnail.jpg" />
<img src="static/images/exemples/letters-thumbnail.jpg" />
<img src="static/images/exemples/reports-thumbnail.jpg" />
<img src="static/images/exemples/tickets-thumbnail.jpg" />
<img src="static/images/exemples/waldenpond-3.jpg" />
</figure>
</section>
<section>
<h2>Construire ensemble</h2>
</section>
<section>
<h3>Est-ce une compétition ?</h3>
<img
style="filter: grayscale(0.9)"
src="./static/images/cssprintshouldrocks.jpg"
alt=""
/>
</section>
<section>
<p>Open source vs propriétaire</p>
<p>Les outils et la mise en concurrence</p>
<p>Les outils et leurs communautés</p>
</section>
<section>
<h3>Nous interprétons les spécifications</h3>
</section>
<section>
<h3>Nous avons des idées de spécifications</h3>
</section>
<section>
<h3>Quels outils, quels espaces pour communiquer ?</h3>
</section>
<section>
<h3>Quel avenir pour nos projets ? <br />Et pour le cssPrint?</h3>
</section>
<section>
<h2>À tout à l’heure !</h2>
</section>
</div>
</div>
<script
type="application/javascript"
src="static/reveal.js/dist/reveal.js"
></script>
<script
type="application/javascript"
src="static/reveal.js/plugin/highlight/highlight.js"
></script>
<script
type="application/javascript"
src="static/reveal.js/plugin/notes/notes.js"
></script>
<script type="application/javascript" src="static/slideshow.js"></script>
</body>
</html>