-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
247 lines (229 loc) · 6.59 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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
letter-spacing: -5px;
background: lightyellow;
background-size: 100%;
color: steelblue;
margin: 0;
padding: 0;
font-weight: bold;
}
h1,
h2,
h3,
p {
margin: 0;
}
em,
a {
font-style: normal;
color: #000;
}
a {
color: #000;
}
img {
width: 100%;
}
body>div {
cursor: pointer;
cursor: hand;
position: absolute;
top: 0px;
left: 0px;
padding: 75px;
line-height: 97%;
}
div.center {
text-align: center;
}
div.imageText {
text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}
notes {
display: none;
}
/* normally not good, but ok in context of full screen directional navigation */
:focus {
outline: 0;
}
</style>
<script type='text/javascript'>
window.onload = function () {
var s = document.querySelectorAll('body > div'),
ti, i;
var notes = [];
for (i = 0; i < s.length; i++) {
s[i].setAttribute('tabindex', 0);
var noteElements = s[i].getElementsByTagName('notes');
notes.push([]);
while (noteElements.length) {
var note = noteElements[0];
notes[i].push(note.innerHTML.trim());
note.parentNode.removeChild(note);
}
}
if (!s.length) return;
var big = window.big = {
current: 0,
forward: fwd,
reverse: rev,
go: go,
length: s.length
};
function resize() {
var w = window.innerWidth,
h = window.innerHeight,
e = s[big.current];
e.style.fontSize = h + 'px';
function pass(cinch, start) {
for (var i = start; i > 0 && (e.offsetWidth > w || e.offsetHeight > h); i -= cinch) {
e.style.fontSize = i + 'px';
}
return i + cinch;
}
pass(2, pass(5, pass(10, h - 2)));
e.style.marginTop = (h - e.offsetHeight) / 2 + 'px';
}
function go(n) {
big.current = n;
for (i = 0; typeof console === 'object' && i < notes[n].length; i++) console.log('%c%s: %s',
'padding:5px;font-family:serif;font-size:18px;line-height:150%;', n, notes[n][i]);
var e = s[n],
t = parseInt(e.getAttribute('data-time-to-next') || 0, 10);
document.body.className = e.getAttribute('data-bodyclass') || '';
for (i = 0; i < s.length; i++) s[i].style.display = 'none';
e.style.display = 'inline';
e.focus();
if (e.firstChild && e.firstChild.nodeName === 'IMG') {
document.body.style.backgroundImage = 'url("' + e.firstChild.src + '")';
e.firstChild.style.display = 'none';
if ('classList' in e) e.classList.add('imageText');
} else {
document.body.style.backgroundImage = '';
document.body.style.backgroundColor = e.style.backgroundColor;
}
if (ti !== undefined) window.clearInterval(ti);
if (t > 0) ti = window.setTimeout(fwd, t * 1000);
resize();
if (window.location.hash !== n) window.location.hash = n;
document.title = e.textContent || e.innerText;
}
document.onclick = function (e) {
if (e.target.tagName !== 'A') go(++big.current % s.length);
};
function fwd() {
go(Math.min(s.length - 1, ++big.current));
}
function rev() {
go(Math.max(0, --big.current));
}
document.onkeydown = function (e) {
if (e.which === 39 || e.which === 34 || e.which === 40) fwd();
if (e.which === 37 || e.which === 33 || e.which === 38) rev();
};
document.ontouchstart = function (e) {
var x0 = e.changedTouches[0].pageX;
document.ontouchend = function (e2) {
var x1 = e2.changedTouches[0].pageX;
if (x1 - x0 < 0) fwd();
if (x1 - x0 > 0) rev();
};
};
function parse_hash() {
return Math.max(Math.min(s.length - 1,
parseInt(window.location.hash.substring(1), 10)), 0);
}
if (window.location.hash) big.current = parse_hash() || big.current;
window.onhashchange = function () {
i = parse_hash();
if (i !== big.current) go(i);
};
window.onresize = resize;
go(big.current);
};
</script>
</head>
<body>
<div>The Five Ws of Atomic Design</div>
<div>Ciao</div>
<div>Riccardo</div>
<div> 🇮🇹🍝🍕 </div>
<div>Lead Front-End Developer at Hackney</div>
<div>
<p>CSS architect</p>
<p>Semantic and accessible HTML</p>
<p>Not a JS developer</p>
</div>
<div>Front-End Designer</div>
<div><img src='frontend-design.gif' /></div>
<div> 😱😱😱 </div>
<div>Let's talk about Atomic Design</div>
<div>The who</div>
<div><img src='brad.jpg' /></div>
<div><img src='dog.jpg' /></div>
<div>The what</div>
<div><img src='atomic-design.png' /></div>
<div>An
<em>atom</em> is a small & independent
<em>component</em>
</div>
<div>We break down the design into components</div>
<div>So we design & build components</div>
<div>Doing that we avoid repetition & confusion</div>
<div>and at the end we design & build
<em>less & quicker</em>
</div>
<div><img src='atomic-design.gif' /></div>
<div>The why</div>
<div>We should design & build
<em>components</em> and not pages</div>
<div>Because today we design & build for
<em>a lot</em> of
</div>
<div>
<p>Devices</p>
<p>Scenarios</p>
<p>Websites</p>
<p>Apps</p>
</div>
<div><img src='devices.jpg' /></div>
<div>so we design & build
<em>a lot</em> of pages</div>
<div>and we want to avoid this</div>
<div><img src='buttons.jpg' /></div>
<div>The where</div>
<div>Apply this methodology in your
<em>Design</em>
</div>
<div>Apply this methodology in your
<em>Development</em>
</div>
<div>The when</div>
<div>Immediately</div>
<div>Think in
<em>Atomic Design</em>
</div>
<div>Last thing (for real)</div>
<div>The how</div>
<div>
<p>Style guide</p>
<p>Pattern library</p>
<p>Design system</p>
</div>
<div>Fractal</div>
<div>Particles</div>
<div>Grazie!</div>
<div>
<p>Resources:</p>
<a href=https://github.com/riccardoerra/atomic-design-jsroundabout>github.com/riccardoerra/atomic-design-jsroundabout</a>
</div>
<div>Questions?</div>
</body>