├── .gitignore ├── .vscode └── settings.json ├── _code.styl ├── _deps.styl ├── demos ├── breathe │ └── index.html ├── error-handling │ └── error.html ├── examples.js ├── gum │ ├── index.html │ └── scripts.js ├── intersection-observer.html ├── intersection-observer │ ├── index.html │ └── scripts.js ├── pip │ ├── index.html │ └── scripts.js ├── resize-observer │ ├── index.html │ ├── scripts.js │ └── video-player.html └── webpayment │ ├── applepay.html │ ├── index.html │ └── package-lock.json ├── fonts ├── PureHeartSVG-Regular.otf ├── bavro-regular-webfont.eot ├── bavro-regular-webfont.svg ├── bavro-regular-webfont.ttf ├── bavro-regular-webfont.woff └── bavro-regular-webfont.woff2 ├── gulpfile.js ├── image-downloader.js ├── images ├── 1.jpg ├── 10.jpg ├── 11.jpg ├── 12.jpg ├── 13.jpg ├── 14.jpg ├── 15.jpg ├── 16.jpg ├── 17.jpg ├── 18.jpg ├── 19.jpg ├── 2.jpg ├── 20.jpg ├── 21.jpg ├── 22.jpg ├── 23.jpg ├── 24.jpg ├── 25.jpg ├── 26.jpg ├── 27.jpg ├── 28.jpg ├── 29.jpg ├── 3.jpg ├── 30.jpg ├── 31.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg ├── 9.jpg ├── Twitter_logo_white.png ├── applepay.mp4 ├── babel.svg ├── canada-flag.png ├── commandline.png ├── cover.png ├── css-next-logo.svg ├── fgHm.png ├── flexbox.png ├── gum.mp4 ├── hackerYou-logomark.png ├── intersection-observer.mp4 ├── intersection-observer2.mp4 ├── laptop-sticker.jpg ├── meta.mp4 ├── paymentRequest.mp4 ├── resize-video-player.mp4 ├── resizeObserver.mp4 ├── screenshots │ ├── fffe.png │ ├── ffjT.png │ ├── ffjW.png │ ├── ffls.png │ ├── ffq2.png │ ├── ffsj.png │ ├── ffvp.png │ ├── ffxI.png │ ├── fg1n.png │ ├── fg83.png │ ├── fgCZ.png │ ├── fgCq.png │ ├── fgHO.png │ ├── fgHm.png │ ├── fgIK.png │ ├── fgLW.png │ ├── fgUE.png │ ├── fgWF.png │ ├── fgWl.png │ ├── fgXl.png │ ├── fgYU.png │ ├── fgbG.png │ ├── fgbJ.png │ ├── fgbo.png │ ├── fgbz.png │ ├── fgck.gif │ ├── fgdA.png │ ├── fgfW.png │ ├── fgfo.gif │ ├── fgfu.png │ ├── fggs.png │ ├── fgh5.png │ ├── fgiQ.png │ ├── fgir.png │ ├── fgl6.png │ ├── fgmB.gif │ ├── fgmT.png │ ├── fgnB.png │ ├── fgnM.png │ ├── fgnc.png │ ├── fgrF.png │ ├── fgrg.png │ ├── fgsY.png │ ├── fgtC.png │ ├── fgvC.gif │ ├── fgx0.png │ ├── fgyV.png │ ├── fgz3.png │ ├── fgzX.png │ ├── fgzX2.png │ ├── fgzh.png │ ├── fgzk.png │ ├── fh01.png │ ├── fh0F.png │ ├── fh13.png │ ├── fh1U.gif │ ├── fh2l.png │ ├── fh59.png │ ├── fh6L.png │ ├── fh8u.png │ ├── fhAQ.gif │ ├── fhAe.png │ ├── fhDp.png │ ├── fhEM.png │ ├── mufS.png │ ├── muk4.png │ ├── mul6.png │ ├── mupq.png │ ├── musk.png │ ├── mv6R.png │ ├── mv93.png │ ├── mvHv.png │ ├── mvLf.png │ ├── mvMC.png │ ├── mvNc.png │ ├── mvNd.png │ ├── mvPr.png │ ├── mvSI.png │ ├── mvbJ.png │ ├── mvjO.png │ ├── mvjp.png │ ├── mvlO.png │ ├── mvvk.png │ ├── mvxm.png │ ├── mw1Y.gif │ ├── mw55.png │ ├── mw88.png │ └── mw8s.png ├── sticky.mp4 ├── uglify.png ├── viewport.mp4 └── webmart.webm ├── index.html ├── index.jade ├── package-lock.json ├── package.json ├── prettify.js ├── readme.md ├── scripts.js ├── slides.js ├── styles.css └── styles.styl /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | talk.js 4 | talk.md -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.enabledLanguageIds": [ 3 | "c", 4 | "cpp", 5 | "csharp", 6 | "go", 7 | "handlebars", 8 | "jade", 9 | "javascript", 10 | "javascriptreact", 11 | "json", 12 | "latex", 13 | "markdown", 14 | "php", 15 | "plaintext", 16 | "python", 17 | "restructuredtext", 18 | "text", 19 | "typescript", 20 | "typescriptreact", 21 | "yml" 22 | ] 23 | } -------------------------------------------------------------------------------- /_code.styl: -------------------------------------------------------------------------------- 1 | yellow = #FFDD00 2 | 3 | // Cobalt2 Prettyify Styles by Wes Bos 4 | 5 | pre .str, code .str { color: #39D905; } /* string - green */ 6 | pre .kwd, code .kwd { color: yellow; } /* keyword - dark pink */ 7 | pre .com, code .com { color: #0088FF; font-style: italic; } /* comment - gray */ 8 | pre .typ, code .typ { color: #0088FF; } /* type - light blue */ 9 | pre .lit, code .lit { color: #0088FF; } /* literal - blue */ 10 | pre .pun, code .pun { color: #FF9D00; } /* punctuation - white */ 11 | pre .pln, code .pln { color: #fff; } /* plaintext - white */ 12 | pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */ 13 | pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */ 14 | pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */ 15 | pre .dec, code .dec { color: #3387CC; } /* decimal - blue */ 16 | 17 | pre.prettyprint, code.prettyprint { 18 | background-color: #193549 19 | border-radius: 2px; 20 | border 0 21 | font-size 55px 22 | line-height 1.7 23 | text-align left 24 | } 25 | 26 | code 27 | background none 28 | font-family 'Operator Mono', monospace; 29 | font-weight 400 30 | 31 | pre.prettyprint { 32 | width: 95%; 33 | margin: 1em auto; 34 | padding: 10px; 35 | white-space: pre-wrap; 36 | border 3px solid #1F4662 37 | } 38 | 39 | 40 | /* Specify class=linenums on a pre to get line numbering */ 41 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */ 42 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 43 | /* Alternate shading for lines */ 44 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 45 | 46 | @media print { 47 | pre .str, code .str { color: #060; } 48 | pre .kwd, code .kwd { color: #006; font-weight: bold; } 49 | pre .com, code .com { color: #600; font-style: italic; } 50 | pre .typ, code .typ { color: #404; font-weight: bold; } 51 | pre .lit, code .lit { color: #044; } 52 | pre .pun, code .pun { color: #440; } 53 | pre .pln, code .pln { color: #000; } 54 | pre .tag, code .tag { color: #006; font-weight: bold; } 55 | pre .atn, code .atn { color: #404; } 56 | pre .atv, code .atv { color: #060; } 57 | } 58 | -------------------------------------------------------------------------------- /_deps.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Google HTML5 slides template 3 | 4 | Authors: Luke Mahé (code) 5 | Marcin Wichary (code and design) 6 | 7 | Dominic Mazzoni (browser compatibility) 8 | Charles Chen (ChromeVox support) 9 | 10 | URL: http://code.google.com/p/html5slides/ 11 | */ 12 | 13 | /* Framework */ 14 | 15 | 16 | html { 17 | height: 100%; 18 | } 19 | 20 | body { 21 | margin: 0; 22 | padding: 0; 23 | display: block !important; 24 | height: 100%; 25 | min-height: 740px; 26 | overflow-x: hidden; 27 | overflow-y: auto; 28 | } 29 | 30 | .slides { 31 | width: 100%; 32 | height: 100%; 33 | left: 0; 34 | top: 0; 35 | color:#f21818; 36 | background:; 37 | position: absolute; 38 | -webkit-transform: translate3d(0, 0, 0); 39 | } 40 | 41 | 42 | /* 43 | Slide Widths 44 | */ 45 | 46 | w = 1920px 47 | // h = 1080px 48 | h = 1107px 49 | h = 1130px 50 | 51 | // w = 1920px 52 | // h = 1440px 53 | 54 | .slides > article { 55 | display: block; 56 | position: absolute; 57 | overflow: hidden; 58 | width w 59 | height h 60 | margin-left: -(w / 2); 61 | margin-top: -(h / 2); 62 | 63 | left: 50%; 64 | top: 50%; 65 | border-radius 5px; 66 | padding: 0; 67 | background-color: none; 68 | transition: all 0.3s ease-out; 69 | justify-content center 70 | flex-direction column 71 | & > * { 72 | display block 73 | clear both 74 | min-width 100% 75 | flex-wrap wrap 76 | } 77 | & > img { 78 | min-width: 0; 79 | display: block; 80 | margin: 0 auto 81 | } 82 | 83 | } 84 | 85 | .slide-area { 86 | z-index: 1000; 87 | 88 | position: absolute; 89 | left: 0; 90 | top: 0; 91 | width: 150px; 92 | height: 100%; 93 | left: 0; 94 | top: 0; 95 | cursor: pointer; 96 | tap-highlight-color: transparent; 97 | 98 | } 99 | #prev-slide-area { 100 | 101 | } 102 | #next-slide-area { 103 | right 0 104 | left auto 105 | } 106 | .slides.layout-widescreen #prev-slide-area, 107 | .slides.layout-faux-widescreen #prev-slide-area { 108 | margin-left: -650px; 109 | } 110 | .slides.layout-widescreen #next-slide-area, 111 | .slides.layout-faux-widescreen #next-slide-area { 112 | margin-left: 500px; 113 | } 114 | 115 | /* Slides */ 116 | 117 | .slides > article { 118 | display: none; 119 | text-align: center; 120 | } 121 | .slides > article.far-past { 122 | display: block; 123 | transform: translate(-4000px); 124 | display none; 125 | } 126 | .slides > article.past { 127 | display: flex; 128 | transform: scale(0.5) translate(-(w + (0))px); 129 | opacity: 0.3; 130 | display: none; 131 | 132 | } 133 | .slides > article.current { 134 | display: flex; 135 | transform: translate(0); 136 | z-index 10 137 | } 138 | .slides > article.next { 139 | display: flex; 140 | transform: scale(0.5) translate((w + (0))px); 141 | opacity: 0.3; 142 | display: none; 143 | } 144 | .slides > article.far-next { 145 | display: flex; 146 | transform: translate(4000px); 147 | display none; 148 | } 149 | 150 | 151 | /* Styles for slides */ 152 | 153 | .slides > article { 154 | color: #6C818F; 155 | font-size: 30px; 156 | letter-spacing: -1px; 157 | } 158 | 159 | b { 160 | font-weight: 600; 161 | } 162 | 163 | .blue { 164 | color: rgb(0, 102, 204); 165 | } 166 | .yellow { 167 | color: rgb(255, 211, 25); 168 | } 169 | .green { 170 | color: #29E254; 171 | } 172 | .red { 173 | color: rgb(255, 0, 0); 174 | } 175 | .black { 176 | color: black; 177 | } 178 | .white { 179 | color: white; 180 | } 181 | 182 | a { 183 | color: #FFDD00; 184 | } 185 | 186 | ::-moz-selection { background: #FFDD00; } 187 | ::selection { background: #FFDD00; } 188 | 189 | 190 | p { 191 | margin: 0; 192 | padding: 0; 193 | } 194 | p:first-child { 195 | margin-top: 0; 196 | } 197 | 198 | body { 199 | // font-family: inconsolata, courier; 200 | font-family: 'Open Sans', sans-serif; 201 | } 202 | h1 { 203 | font-size: 60px; 204 | padding: 0; 205 | margin: 0; 206 | color: white; 207 | } 208 | 209 | h2 { 210 | font-size: 45px; 211 | line-height: 45px; 212 | 213 | bottom: 150px; 214 | 215 | padding: 0; 216 | margin: 0; 217 | font-weight: 600; 218 | color:white; 219 | letter-spacing: -2px; 220 | } 221 | 222 | h2 a { 223 | text-decoration: none; 224 | } 225 | 226 | h3 { 227 | font-size: 20px; 228 | line-height: 36px; 229 | padding: 0 0 10px 0; 230 | margin: 0; 231 | padding-right: 40px; 232 | font-weight: 600; 233 | letter-spacing: -1px; 234 | color:#EAEAEA; 235 | } 236 | 237 | .half { 238 | width:350px; 239 | float:left; 240 | } 241 | 242 | .button:hover { 243 | color:#fff; 244 | background:#392C44; 245 | } 246 | 247 | pre.half { 248 | width: 400px; 249 | font-size:17px; 250 | } 251 | 252 | p.small { 253 | color:#000; 254 | font-size:18px; 255 | } 256 | article.fill h3 { 257 | background: rgba(255, 255, 255, .75); 258 | padding-top: .2em; 259 | padding-bottom: .3em; 260 | margin-top: -.2em; 261 | margin-left: -60px; 262 | padding-left: 60px; 263 | margin-right: -60px; 264 | padding-right: 60px; 265 | } 266 | 267 | h4 { 268 | margin:0; 269 | } 270 | 271 | 272 | .center { 273 | text-align:center; 274 | } 275 | 276 | .center h3 { 277 | font-size:100px; 278 | margin-top:220px; 279 | } 280 | ul { 281 | list-style: none; 282 | margin: 0; 283 | padding: 0; 284 | 285 | margin-top: 40px; 286 | 287 | margin-left: .75em; 288 | } 289 | ul:first-child { 290 | margin-top: 0; 291 | } 292 | ul ul { 293 | margin-top: .5em; 294 | } 295 | li { 296 | padding: 0; 297 | margin: 0; 298 | 299 | margin-bottom: .5em; 300 | } 301 | li::before { 302 | content: '·'; 303 | 304 | width: .75em; 305 | margin-left: -.75em; 306 | 307 | position: absolute; 308 | } 309 | 310 | pre { 311 | 312 | font-size: 20px; 313 | line-height: 28px; 314 | padding: 5px 10px; 315 | 316 | letter-spacing: -1px; 317 | 318 | margin-top: 20px; 319 | margin-bottom: 20px; 320 | 321 | color: black; 322 | background: rgb(240, 240, 240); 323 | border: 1px solid rgb(224, 224, 224); 324 | box-shadow: inset 0 2px 6px rgba(0, 0, 0, .1); 325 | 326 | overflow: hidden; 327 | } 328 | 329 | code { 330 | font-size: 95%; 331 | font-family: 'Droid Sans Mono', 'Courier New', monospace; 332 | display: inline-block; 333 | background rgba(255,255,255,0.2); 334 | padding 10px 335 | border-radius 4px; 336 | font-weight 600 337 | } 338 | 339 | iframe { 340 | width: 100%; 341 | height: 620px; 342 | background: white; 343 | border: 1px solid rgb(192, 192, 192); 344 | margin: -1px; 345 | /*box-shadow: inset 0 2px 6px rgba(0, 0, 0, .1);*/ 346 | } 347 | 348 | img { 349 | max-width: 100%; 350 | max-height:570px; 351 | } 352 | 353 | h3 + iframe { 354 | margin-top: 40px; 355 | height: 540px; 356 | } 357 | 358 | article.fill iframe { 359 | position: absolute; 360 | left: 0; 361 | top: 0; 362 | width: 100%; 363 | height: 100%; 364 | 365 | border: 0; 366 | margin: 0; 367 | 368 | border-radius: 10px; 369 | -o-border-radius: 10px; 370 | -moz-border-radius: 10px; 371 | -webkit-border-radius: 10px; 372 | 373 | z-index: -1; 374 | } 375 | 376 | article.fill img { 377 | position: absolute; 378 | left: 0; 379 | top: 0; 380 | min-width: 100%; 381 | min-height: 100%; 382 | 383 | border-radius: 10px; 384 | -o-border-radius: 10px; 385 | -moz-border-radius: 10px; 386 | -webkit-border-radius: 10px; 387 | 388 | z-index: -1; 389 | } 390 | img.centered { 391 | margin: 0 auto; 392 | display: block; 393 | } 394 | 395 | table { 396 | width: 100%; 397 | border-collapse: collapse; 398 | margin-top: 40px; 399 | } 400 | th { 401 | font-weight: 600; 402 | text-align: left; 403 | } 404 | td, 405 | th { 406 | border: 1px solid rgb(224, 224, 224); 407 | padding: 5px 10px; 408 | vertical-align: top; 409 | } 410 | 411 | .source { 412 | position: absolute; 413 | left: 60px; 414 | top: 644px; 415 | padding-right: 175px; 416 | 417 | font-size: 15px; 418 | letter-spacing: 0; 419 | line-height: 18px; 420 | } 421 | 422 | q { 423 | display: block; 424 | font-size: 60px; 425 | line-height: 72px; 426 | 427 | margin-left: 20px; 428 | 429 | margin-top: 100px; 430 | margin-right: 150px; 431 | } 432 | q::before { 433 | content: '“'; 434 | 435 | position: absolute; 436 | display: inline-block; 437 | margin-left: -2.1em; 438 | width: 2em; 439 | text-align: right; 440 | 441 | font-size: 90px; 442 | color: rgb(192, 192, 192); 443 | } 444 | q::after { 445 | content: '”'; 446 | 447 | position: absolute; 448 | margin-left: .1em; 449 | 450 | font-size: 90px; 451 | color: rgb(192, 192, 192); 452 | } 453 | div.author { 454 | text-align: right; 455 | font-size: 40px; 456 | 457 | margin-top: 20px; 458 | margin-right: 150px; 459 | } 460 | div.author::before { 461 | content: '—'; 462 | } 463 | 464 | /* Size variants */ 465 | 466 | article.smaller p, 467 | article.smaller ul { 468 | font-size: 20px; 469 | line-height: 24px; 470 | letter-spacing: 0; 471 | } 472 | article.smaller table { 473 | font-size: 20px; 474 | line-height: 24px; 475 | letter-spacing: 0; 476 | } 477 | article.smaller pre { 478 | font-size: 15px; 479 | line-height: 20px; 480 | letter-spacing: 0; 481 | } 482 | article.smaller q { 483 | font-size: 40px; 484 | line-height: 48px; 485 | } 486 | article.smaller q::before, 487 | article.smaller q::after { 488 | font-size: 60px; 489 | } 490 | 491 | /* Builds */ 492 | 493 | .build > * { 494 | transition: opacity 0.2s ease-in-out 0.2s; 495 | } 496 | 497 | .to-build { 498 | opacity: 0; 499 | } 500 | -------------------------------------------------------------------------------- /demos/breathe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /demos/error-handling/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /demos/examples.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | function yum() { 4 | 5 | 6 | // kick off both things, one after another 7 | const coffeePromise = makeCoffee(); 8 | const breakfastPromise = makeBreakfast(); 9 | 10 | // then once each are done, deal with them 11 | coffeePromise.then(coffee => { 12 | drinkCoffee(); 13 | }); 14 | 15 | breakfastPromise.then(([eggs, bacon]) => { 16 | eat(eggs, bacon); 17 | }); 18 | 19 | // You can also wait until both are done 20 | Promise 21 | .all([coffeePromise, breakfastPromise]) 22 | .then(([coffee, breakfast]) => { 23 | sitDownWith(coffee, breakfast); 24 | }); 25 | 26 | 27 | 28 | 29 | } 30 | 31 | 32 | makeBreakfast(function () { 33 | makeCoffee(function () { 34 | eatBreakfast(function () { 35 | drinkCoffee(function () { 36 | cleanUp(function () { 37 | // Finally done and it's time for lunch 38 | }); 39 | }); 40 | }); 41 | }); 42 | }); // wtf 43 | 44 | 45 | 46 | 47 | fetch('http://cooldogs.org') 48 | .then(data => data.json()) 49 | .then(dogs => pet(dogs)); 50 | 51 | 52 | 53 | axios.get('http://cooldogs.org') 54 | .then(dogs => pet(dogs)); 55 | 56 | 57 | moveTo(50, 50, function () { 58 | moveTo(20, 100, function () { 59 | moveTo(100, 200, function () { 60 | moveTo(2, 10, function () { 61 | // done 62 | }); 63 | }); 64 | }); 65 | }); 66 | 67 | // becomes 68 | 69 | moveTo(50, 50) 70 | .then(() => moveTo(20, 100)) 71 | .then(() => moveTo(100, 200)) 72 | .then(() => moveTo(2, 10)) 73 | 74 | // becomes 75 | 76 | async function animate() { 77 | await moveTo(50, 50); 78 | await moveTo(20, 100); 79 | await moveTo(100, 200); 80 | await moveTo(2, 10); 81 | } 82 | 83 | 84 | 85 | const getDetails = async function () { 86 | const wes = await axios.get('https://api.github.com/users/wesbos'); 87 | const scott = await axios.get('https://api.github.com/users/stolinski'); 88 | const html = ` 89 |

${wes.name}

90 |

${scott.name}

91 | `; 92 | } 93 | 94 | const getDetails = async function () { 95 | // Fire Both off 96 | const wesPromise = axios.get('https://api.github.com/users/wesbos'); 97 | const scottPromise = axios.get('https://api.github.com/users/stolinski'); 98 | // and wait to both to come back 99 | const [wes, scott] = await Promise.all([wesPromise, scottPromise]); 100 | const html = ` 101 |

${wes.name}

102 |

${scott.name}

103 | `; 104 | } 105 | 106 | 107 | -------------------------------------------------------------------------------- /demos/gum/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /demos/gum/scripts.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | 4 | const video = document.querySelector('.handsome'); 5 | 6 | async function go() { 7 | const stream = await navigator.mediaDevices.getUserMedia({ video: true }); 8 | video.srcObject = stream; 9 | } 10 | 11 | const strip = document.querySelector('.strip'); 12 | const canvas = document.querySelector('#paint'); 13 | const ctx = canvas.getContext('2d'); 14 | 15 | function takePhoto() { 16 | console.log('Taking photo!'); 17 | canvas.width = video.videoWidth; 18 | canvas.height = video.videoHeight; 19 | 20 | ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight); 21 | const data = canvas.toDataURL('image/jpeg'); 22 | const link = document.createElement('a'); 23 | link.href = data; 24 | link.setAttribute('download', 'handsome.jpg'); 25 | link.innerHTML = `Handsome Man`; 26 | strip.insertBefore(link, strip.firsChild); 27 | } 28 | 29 | 30 | 31 | 32 | go().catch(err => { 33 | alert(err.message); 34 | }); 35 | -------------------------------------------------------------------------------- /demos/intersection-observer.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/demos/intersection-observer.html -------------------------------------------------------------------------------- /demos/intersection-observer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 | 14 | 44 |
45 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 46 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 47 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 48 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

49 | 50 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 51 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 52 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 53 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

54 | 55 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 56 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 57 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 58 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

59 | 60 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 61 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 62 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 63 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

64 | 65 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 66 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 67 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 68 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

69 | 70 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 71 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 72 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 73 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

74 | 75 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 76 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 77 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 78 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

79 | 80 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 81 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 82 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 83 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

84 | 85 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 86 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 87 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 88 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

89 | 90 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 91 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 92 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 93 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

94 | 95 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 96 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 97 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 98 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

99 | 100 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 101 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 102 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 103 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

104 | 105 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 106 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 107 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 108 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

109 | 110 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 111 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 112 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 113 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

114 | 115 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 116 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 117 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 118 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

119 | 120 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 121 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 122 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 123 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

124 | 125 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 126 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 127 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 128 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

129 | 130 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 131 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 132 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 133 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

134 | 135 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 136 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 137 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 138 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

139 | 140 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 141 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 142 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 143 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

144 | 145 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 146 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 147 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 148 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

149 | 150 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 151 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 152 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 153 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

154 | 155 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 156 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 157 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 158 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

159 | 160 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 161 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 162 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 163 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

164 | 165 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 166 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 167 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 168 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

169 | 170 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 171 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 172 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 173 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

174 | 175 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 176 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 177 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 178 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

179 | 180 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 181 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 182 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 183 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

184 | 185 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 186 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 187 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 188 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

189 | 190 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 191 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 192 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 193 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

194 | 195 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 196 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 197 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 198 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

199 | 200 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 201 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 202 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 203 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

204 | 205 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 206 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 207 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 208 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

209 | 210 |

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum sed officia neque praesentium, reprehenderit amet 211 | tenetur, porro ipsum vitae nisi aliquid, ea corporis doloremque exercitationem consectetur inventore quam laboriosam 212 | nemo. Cupiditate sapiente, reiciendis suscipit consequuntur accusamus nihil. Minus inventore, atque dicta voluptatem 213 | numquam molestias reiciendis, ad aliquid reprehenderit tenetur ex?

214 | 215 | 216 |

217 |
218 | 219 | 220 | 221 | 222 | -------------------------------------------------------------------------------- /demos/intersection-observer/scripts.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | 4 | const options = { 5 | // Specify the scroller, uses viewport if omitted 6 | root: document.querySelector('.scrollingDiv'), 7 | // Optional margin offset 8 | rootMargin: '100px', 9 | // Thresholds as to when you'd like it to alert you 10 | // off, half, and totally on 11 | threshold: [0, 0.5, 1.0], 12 | }; 13 | 14 | 15 | const callback = (entries, observer) => { 16 | // Entries are elements that are within view 17 | entries.forEach(entry => { 18 | // only using 1.0 threshold here 19 | if (entry.isIntersecting && entry.intersectionRatio >= 1) { 20 | console.log(entry); 21 | entry.target.classList.add('visible'); // CSS will animate it in 22 | } else { 23 | entry.target.classList.remove('visible'); // animate out 24 | } 25 | // at this point you can also un-observe for a single animation 26 | // observer.unobserve(entry.target); 27 | }); 28 | }; 29 | 30 | 31 | 32 | const observer = new IntersectionObserver(callback, options); 33 | 34 | 35 | 36 | 37 | 38 | 39 | // get some elements to observe 40 | const boxes = document.querySelectorAll('.box'); 41 | // Observe each of those elements 42 | boxes.forEach(box => observer.observe(box)); 43 | -------------------------------------------------------------------------------- /demos/pip/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Picture in Picture 7 | 8 | 9 | 10 | 12 | 13 |
14 | 15 |
16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /demos/pip/scripts.js: -------------------------------------------------------------------------------- 1 | const videoEl = document.getElementById('video'); 2 | const PiP = document.getElementById('picture-in-picture'); 3 | 4 | // picture-in-picture 5 | if (videoEl.webkitSupportsPresentationMode && typeof videoEl.webkitSetPresentationMode === 'function') { 6 | // Toggle PiP when the user clicks the button. 7 | PiP.addEventListener('click', event => { 8 | videoEl.webkitSetPresentationMode('picture-in-picture'); 9 | }); 10 | } else { 11 | PiP.disabled = true; 12 | } 13 | -------------------------------------------------------------------------------- /demos/resize-observer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 | 11 |
Resizeable!
12 | 13 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /demos/resize-observer/scripts.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | // function callback(entries, observer) { 4 | // entries[0].target.innerHTML = ` 5 | //
 6 | //       ${JSON.stringify(entries[0].contentRect, null, ' ')}
 7 | //     
`; 8 | // } 9 | 10 | // const observer = new ResizeObserver(callback); 11 | 12 | // // get some elements to observe 13 | // const element = document.querySelector('.resize'); 14 | // observer.observe(element); 15 | 16 | function callback(entries, observer) { 17 | 18 | entries[0].target.innerHTML = ` 19 |
20 |               ${JSON.stringify(entries[0].contentRect, null, ' ')}
21 |             
`; 22 | } 23 | 24 | const observer = new ResizeObserver(callback); 25 | 26 | // get some elements to observe 27 | const element = document.querySelector('.resize'); 28 | observer.observe(element); 29 | -------------------------------------------------------------------------------- /demos/resize-observer/video-player.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Video player-wrap 9 | 10 | 11 | 12 | 135 | 136 |
137 |
138 | 139 |
140 |
141 | 393 |
394 |
395 | 396 | 418 | 419 | 420 | 421 | -------------------------------------------------------------------------------- /demos/webpayment/applepay.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/demos/webpayment/applepay.html -------------------------------------------------------------------------------- /demos/webpayment/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Web Payments! 6 | 7 | 8 | 9 | 10 | 11 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demos/webpayment/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1, 3 | "dependencies": { 4 | "asap": { 5 | "version": "2.0.6", 6 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", 7 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" 8 | }, 9 | "chain-function": { 10 | "version": "1.0.0", 11 | "resolved": "https://registry.npmjs.org/chain-function/-/chain-function-1.0.0.tgz", 12 | "integrity": "sha1-DUqzfn4Y6tC9xHuSB2QRjOWHM9w=" 13 | }, 14 | "classnames": { 15 | "version": "2.2.5", 16 | "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz", 17 | "integrity": "sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0=" 18 | }, 19 | "core-js": { 20 | "version": "1.2.7", 21 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", 22 | "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" 23 | }, 24 | "dom-helpers": { 25 | "version": "3.2.1", 26 | "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.2.1.tgz", 27 | "integrity": "sha1-MgPgf+0he9H0JLAZc1WC/Deyglo=" 28 | }, 29 | "encoding": { 30 | "version": "0.1.12", 31 | "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", 32 | "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=" 33 | }, 34 | "fbjs": { 35 | "version": "0.8.14", 36 | "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.14.tgz", 37 | "integrity": "sha1-0dviviVMNakeCfMfnNUKQLKg7Rw=" 38 | }, 39 | "iconv-lite": { 40 | "version": "0.4.18", 41 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", 42 | "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" 43 | }, 44 | "is-stream": { 45 | "version": "1.1.0", 46 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", 47 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" 48 | }, 49 | "isomorphic-fetch": { 50 | "version": "2.2.1", 51 | "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", 52 | "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=" 53 | }, 54 | "js-tokens": { 55 | "version": "3.0.2", 56 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", 57 | "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" 58 | }, 59 | "loose-envify": { 60 | "version": "1.3.1", 61 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", 62 | "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=" 63 | }, 64 | "node-fetch": { 65 | "version": "1.7.2", 66 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.2.tgz", 67 | "integrity": "sha512-xZZUq2yDhKMIn/UgG5q//IZSNLJIwW2QxS14CNH5spuiXkITM2pUitjdq58yLSaU7m4M0wBNaM2Gh/ggY4YJig==" 68 | }, 69 | "object-assign": { 70 | "version": "4.1.1", 71 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 72 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 73 | }, 74 | "promise": { 75 | "version": "7.3.1", 76 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", 77 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==" 78 | }, 79 | "prop-types": { 80 | "version": "15.5.10", 81 | "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", 82 | "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=" 83 | }, 84 | "react-transition-group": { 85 | "version": "2.2.0", 86 | "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.2.0.tgz", 87 | "integrity": "sha1-eTv4yxW/6RsxAbJLzhwdKJFllXU=" 88 | }, 89 | "setimmediate": { 90 | "version": "1.0.5", 91 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", 92 | "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" 93 | }, 94 | "ua-parser-js": { 95 | "version": "0.7.14", 96 | "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.14.tgz", 97 | "integrity": "sha1-EQ1T+kw/MmwSEpK76skE0uAzh8o=" 98 | }, 99 | "warning": { 100 | "version": "3.0.0", 101 | "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", 102 | "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=" 103 | }, 104 | "whatwg-fetch": { 105 | "version": "2.0.3", 106 | "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", 107 | "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /fonts/PureHeartSVG-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/fonts/PureHeartSVG-Regular.otf -------------------------------------------------------------------------------- /fonts/bavro-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/fonts/bavro-regular-webfont.eot -------------------------------------------------------------------------------- /fonts/bavro-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/fonts/bavro-regular-webfont.ttf -------------------------------------------------------------------------------- /fonts/bavro-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/fonts/bavro-regular-webfont.woff -------------------------------------------------------------------------------- /fonts/bavro-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/fonts/bavro-regular-webfont.woff2 -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var p = require('gulp-load-plugins')(); 3 | 4 | var browserSync = require('browser-sync'); 5 | var reload = browserSync.reload; 6 | 7 | // Start the server 8 | gulp.task('browser-sync', function() { 9 | browserSync({ 10 | open : true, 11 | server: { 12 | baseDir: "./" 13 | } 14 | }); 15 | }); 16 | 17 | gulp.task('slides',function () { 18 | gulp.src('index.jade') 19 | .pipe(p.plumber()) 20 | .pipe(p.jade()) 21 | .pipe(gulp.dest('./')) 22 | .pipe(reload({stream:true})) 23 | }); 24 | 25 | 26 | gulp.task('styles',function() { 27 | gulp.src('./styles.styl') 28 | .pipe(p.stylus()) 29 | .pipe(p.autoprefixer()) 30 | .pipe(gulp.dest('./')) 31 | .pipe(reload({stream:true})) 32 | }); 33 | 34 | 35 | gulp.task('default', ['slides','styles','browser-sync'] ,function() { 36 | gulp.watch('./**/*.jade',['slides']); 37 | gulp.watch('./**/*.styl',['styles']); 38 | }); 39 | -------------------------------------------------------------------------------- /image-downloader.js: -------------------------------------------------------------------------------- 1 | let fs = require('fs'), 2 | request = require('request'); 3 | 4 | let download = function(callback) { 5 | const uri = images.pop(); // take the last one off 6 | request.head(uri, (err, res, body) => { 7 | const extension = res.headers['content-type'].split('/').pop(); 8 | const fileName = `${uri.split('/')[3]}.${extension}`; 9 | console.log("downloading...", fileName); 10 | request(uri).pipe(fs.createWriteStream('images/screenshots/' + fileName)).on('close', callback); 11 | }); 12 | }; 13 | 14 | var images = [ 15 | 'http://wes.io/mw8s/content', 16 | 'http://wes.io/mvNc/content', 17 | 'http://wes.io/mvvk/content', 18 | 'http://wes.io/mvlO/content', 19 | 'http://wes.io/mw1Y/content', 20 | 'http://wes.io/mvjp/content', 21 | 'http://wes.io/mul6/content', 22 | 'http://wes.io/mul6/content', 23 | 'http://wes.io/mv6R/content', 24 | 'http://wes.io/mufS/content', 25 | 'http://wes.io/mw88/content', 26 | 'http://wes.io/mvxm/content', 27 | 'http://wes.io/mvLf/content', 28 | 'http://wes.io/mvHv/content', 29 | 'http://wes.io/mvPr/content', 30 | 'http://wes.io/muk4/content', 31 | 'http://wes.io/mupq/content', 32 | 'http://wes.io/mvSI/content', 33 | 'http://wes.io/mvbJ/content', 34 | 'http://wes.io/mvMC/content', 35 | 'http://wes.io/mvMC/content', 36 | 'http://wes.io/mw55/content', 37 | 'http://wes.io/mv93/content', 38 | 'http://wes.io/musk/content', 39 | 'http://wes.io/mvNd/content', 40 | 'http://wes.io/mvjO/content', 41 | ]; 42 | 43 | function start() { 44 | console.log('done'); 45 | if (images.length) { 46 | download(start); 47 | } 48 | } 49 | 50 | download(start); 51 | -------------------------------------------------------------------------------- /images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/1.jpg -------------------------------------------------------------------------------- /images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/10.jpg -------------------------------------------------------------------------------- /images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/11.jpg -------------------------------------------------------------------------------- /images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/12.jpg -------------------------------------------------------------------------------- /images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/13.jpg -------------------------------------------------------------------------------- /images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/14.jpg -------------------------------------------------------------------------------- /images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/15.jpg -------------------------------------------------------------------------------- /images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/16.jpg -------------------------------------------------------------------------------- /images/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/17.jpg -------------------------------------------------------------------------------- /images/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/18.jpg -------------------------------------------------------------------------------- /images/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/19.jpg -------------------------------------------------------------------------------- /images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/2.jpg -------------------------------------------------------------------------------- /images/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/20.jpg -------------------------------------------------------------------------------- /images/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/21.jpg -------------------------------------------------------------------------------- /images/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/22.jpg -------------------------------------------------------------------------------- /images/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/23.jpg -------------------------------------------------------------------------------- /images/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/24.jpg -------------------------------------------------------------------------------- /images/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/25.jpg -------------------------------------------------------------------------------- /images/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/26.jpg -------------------------------------------------------------------------------- /images/27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/27.jpg -------------------------------------------------------------------------------- /images/28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/28.jpg -------------------------------------------------------------------------------- /images/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/29.jpg -------------------------------------------------------------------------------- /images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/3.jpg -------------------------------------------------------------------------------- /images/30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/30.jpg -------------------------------------------------------------------------------- /images/31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/31.jpg -------------------------------------------------------------------------------- /images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/4.jpg -------------------------------------------------------------------------------- /images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/5.jpg -------------------------------------------------------------------------------- /images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/6.jpg -------------------------------------------------------------------------------- /images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/7.jpg -------------------------------------------------------------------------------- /images/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/8.jpg -------------------------------------------------------------------------------- /images/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/9.jpg -------------------------------------------------------------------------------- /images/Twitter_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/Twitter_logo_white.png -------------------------------------------------------------------------------- /images/applepay.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/applepay.mp4 -------------------------------------------------------------------------------- /images/babel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 47 | 73 | 105 | 137 | 170 | 171 | -------------------------------------------------------------------------------- /images/canada-flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/canada-flag.png -------------------------------------------------------------------------------- /images/commandline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/commandline.png -------------------------------------------------------------------------------- /images/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/cover.png -------------------------------------------------------------------------------- /images/css-next-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 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 | -------------------------------------------------------------------------------- /images/fgHm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/fgHm.png -------------------------------------------------------------------------------- /images/flexbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/flexbox.png -------------------------------------------------------------------------------- /images/gum.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/gum.mp4 -------------------------------------------------------------------------------- /images/hackerYou-logomark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/hackerYou-logomark.png -------------------------------------------------------------------------------- /images/intersection-observer.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/intersection-observer.mp4 -------------------------------------------------------------------------------- /images/intersection-observer2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/intersection-observer2.mp4 -------------------------------------------------------------------------------- /images/laptop-sticker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/laptop-sticker.jpg -------------------------------------------------------------------------------- /images/meta.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/meta.mp4 -------------------------------------------------------------------------------- /images/paymentRequest.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/paymentRequest.mp4 -------------------------------------------------------------------------------- /images/resize-video-player.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/resize-video-player.mp4 -------------------------------------------------------------------------------- /images/resizeObserver.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/resizeObserver.mp4 -------------------------------------------------------------------------------- /images/screenshots/fffe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fffe.png -------------------------------------------------------------------------------- /images/screenshots/ffjT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffjT.png -------------------------------------------------------------------------------- /images/screenshots/ffjW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffjW.png -------------------------------------------------------------------------------- /images/screenshots/ffls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffls.png -------------------------------------------------------------------------------- /images/screenshots/ffq2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffq2.png -------------------------------------------------------------------------------- /images/screenshots/ffsj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffsj.png -------------------------------------------------------------------------------- /images/screenshots/ffvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffvp.png -------------------------------------------------------------------------------- /images/screenshots/ffxI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/ffxI.png -------------------------------------------------------------------------------- /images/screenshots/fg1n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fg1n.png -------------------------------------------------------------------------------- /images/screenshots/fg83.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fg83.png -------------------------------------------------------------------------------- /images/screenshots/fgCZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgCZ.png -------------------------------------------------------------------------------- /images/screenshots/fgCq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgCq.png -------------------------------------------------------------------------------- /images/screenshots/fgHO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgHO.png -------------------------------------------------------------------------------- /images/screenshots/fgHm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgHm.png -------------------------------------------------------------------------------- /images/screenshots/fgIK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgIK.png -------------------------------------------------------------------------------- /images/screenshots/fgLW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgLW.png -------------------------------------------------------------------------------- /images/screenshots/fgUE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgUE.png -------------------------------------------------------------------------------- /images/screenshots/fgWF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgWF.png -------------------------------------------------------------------------------- /images/screenshots/fgWl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgWl.png -------------------------------------------------------------------------------- /images/screenshots/fgXl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgXl.png -------------------------------------------------------------------------------- /images/screenshots/fgYU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgYU.png -------------------------------------------------------------------------------- /images/screenshots/fgbG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgbG.png -------------------------------------------------------------------------------- /images/screenshots/fgbJ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgbJ.png -------------------------------------------------------------------------------- /images/screenshots/fgbo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgbo.png -------------------------------------------------------------------------------- /images/screenshots/fgbz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgbz.png -------------------------------------------------------------------------------- /images/screenshots/fgck.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgck.gif -------------------------------------------------------------------------------- /images/screenshots/fgdA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgdA.png -------------------------------------------------------------------------------- /images/screenshots/fgfW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgfW.png -------------------------------------------------------------------------------- /images/screenshots/fgfo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgfo.gif -------------------------------------------------------------------------------- /images/screenshots/fgfu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgfu.png -------------------------------------------------------------------------------- /images/screenshots/fggs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fggs.png -------------------------------------------------------------------------------- /images/screenshots/fgh5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgh5.png -------------------------------------------------------------------------------- /images/screenshots/fgiQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgiQ.png -------------------------------------------------------------------------------- /images/screenshots/fgir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgir.png -------------------------------------------------------------------------------- /images/screenshots/fgl6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgl6.png -------------------------------------------------------------------------------- /images/screenshots/fgmB.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgmB.gif -------------------------------------------------------------------------------- /images/screenshots/fgmT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgmT.png -------------------------------------------------------------------------------- /images/screenshots/fgnB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgnB.png -------------------------------------------------------------------------------- /images/screenshots/fgnM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgnM.png -------------------------------------------------------------------------------- /images/screenshots/fgnc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgnc.png -------------------------------------------------------------------------------- /images/screenshots/fgrF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgrF.png -------------------------------------------------------------------------------- /images/screenshots/fgrg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgrg.png -------------------------------------------------------------------------------- /images/screenshots/fgsY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgsY.png -------------------------------------------------------------------------------- /images/screenshots/fgtC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgtC.png -------------------------------------------------------------------------------- /images/screenshots/fgvC.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgvC.gif -------------------------------------------------------------------------------- /images/screenshots/fgx0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgx0.png -------------------------------------------------------------------------------- /images/screenshots/fgyV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgyV.png -------------------------------------------------------------------------------- /images/screenshots/fgz3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgz3.png -------------------------------------------------------------------------------- /images/screenshots/fgzX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgzX.png -------------------------------------------------------------------------------- /images/screenshots/fgzX2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgzX2.png -------------------------------------------------------------------------------- /images/screenshots/fgzh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgzh.png -------------------------------------------------------------------------------- /images/screenshots/fgzk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fgzk.png -------------------------------------------------------------------------------- /images/screenshots/fh01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh01.png -------------------------------------------------------------------------------- /images/screenshots/fh0F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh0F.png -------------------------------------------------------------------------------- /images/screenshots/fh13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh13.png -------------------------------------------------------------------------------- /images/screenshots/fh1U.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh1U.gif -------------------------------------------------------------------------------- /images/screenshots/fh2l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh2l.png -------------------------------------------------------------------------------- /images/screenshots/fh59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh59.png -------------------------------------------------------------------------------- /images/screenshots/fh6L.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh6L.png -------------------------------------------------------------------------------- /images/screenshots/fh8u.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fh8u.png -------------------------------------------------------------------------------- /images/screenshots/fhAQ.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fhAQ.gif -------------------------------------------------------------------------------- /images/screenshots/fhAe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fhAe.png -------------------------------------------------------------------------------- /images/screenshots/fhDp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fhDp.png -------------------------------------------------------------------------------- /images/screenshots/fhEM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/fhEM.png -------------------------------------------------------------------------------- /images/screenshots/mufS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mufS.png -------------------------------------------------------------------------------- /images/screenshots/muk4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/muk4.png -------------------------------------------------------------------------------- /images/screenshots/mul6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mul6.png -------------------------------------------------------------------------------- /images/screenshots/mupq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mupq.png -------------------------------------------------------------------------------- /images/screenshots/musk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/musk.png -------------------------------------------------------------------------------- /images/screenshots/mv6R.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mv6R.png -------------------------------------------------------------------------------- /images/screenshots/mv93.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mv93.png -------------------------------------------------------------------------------- /images/screenshots/mvHv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvHv.png -------------------------------------------------------------------------------- /images/screenshots/mvLf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvLf.png -------------------------------------------------------------------------------- /images/screenshots/mvMC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvMC.png -------------------------------------------------------------------------------- /images/screenshots/mvNc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvNc.png -------------------------------------------------------------------------------- /images/screenshots/mvNd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvNd.png -------------------------------------------------------------------------------- /images/screenshots/mvPr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvPr.png -------------------------------------------------------------------------------- /images/screenshots/mvSI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvSI.png -------------------------------------------------------------------------------- /images/screenshots/mvbJ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvbJ.png -------------------------------------------------------------------------------- /images/screenshots/mvjO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvjO.png -------------------------------------------------------------------------------- /images/screenshots/mvjp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvjp.png -------------------------------------------------------------------------------- /images/screenshots/mvlO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvlO.png -------------------------------------------------------------------------------- /images/screenshots/mvvk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvvk.png -------------------------------------------------------------------------------- /images/screenshots/mvxm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mvxm.png -------------------------------------------------------------------------------- /images/screenshots/mw1Y.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mw1Y.gif -------------------------------------------------------------------------------- /images/screenshots/mw55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mw55.png -------------------------------------------------------------------------------- /images/screenshots/mw88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mw88.png -------------------------------------------------------------------------------- /images/screenshots/mw8s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/screenshots/mw8s.png -------------------------------------------------------------------------------- /images/sticky.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/sticky.mp4 -------------------------------------------------------------------------------- /images/uglify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/uglify.png -------------------------------------------------------------------------------- /images/viewport.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/viewport.mp4 -------------------------------------------------------------------------------- /images/webmart.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wesbos/future-js/2722bdd2ad50361a529718b87f2c97aff595a447/images/webmart.webm -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | What's New in JS by Wes Bos

What's New
In JavaScript?


wesbos.com@wesbos

I'm
Wes Bos


These slides will be available shortly after this talk
I'll tweet the link out.

@wesbos

ES6.io
ReactForBeginners.com
LearnNode.com
CSSGrid.io
Syntax.fm

JavaScript is Always Evolving

ES6

ES2016 (ES7)

ES2017 (ES8)

New DOM Apis

This Talk

Reaaaady?

Let's go!

Promises

Not brand new, but let's do a quick review

Promises are an IOU for something that will happen in the future

All of these things take time, we simply kick off the process and move along with our lives.

But why do we do it this way?

JavaScript Waits for no one!

Almost Everything Is Asynchronous

Let's say we wanted to do a few things:

Do you need to finish making coffee before you can Start Breakfast?

Would it make sense to wait until coffee is made and consumed before we even start cooking breakfast?

No - we want to start one thing, come back to it once it's finished, and deal with the result accordingly!

Most new browser APIs are built on Promises, or Observables

More on Observables in a bit

fetch()

Axios

Many, many more

PaymentRequest, getUserMedia(), Web Animation API

It's easy to make your own too!

Christmas Tree Callback Hell

we get it
Promises are great.

buuuuuuttt

What's the deal with .then()?

It's still kinda callback-y

Any code that needs to come after the promise still needs to be in the final .then() callback :\

Async + Await

Async + Await still is promises, but with a really nice syntax

Let's break it down

JavaScript is almost entirely asynchronous / non-blocking

great! - But it's hard to read/write

PHP

JS

😕😕😕

The PHP is easier to read

The JS is more performant

I'm not really happy

Synchronous looking code, without the wait.

How does it work?

1. Mark it as Async

2. await inside your async fn

Best of Both Worlds!

Another Example

Slow...

Why wait for Wes?

Remember, async+await is just promises

Error Handling

A few options (which we don't have time for)...

Done with Async+ Await!

Let's see more new stuff!

Intersection Observer

How do you know when an element is on screen?

With Intersection Observer, you can be alerted when an element is fully or partially scrolled into or out of view.

Uses

Google Developers

Ready for Meta?

How does it work?!

1. Setup some Options

2. Create an empty Observer

3. Give it a callback

4. Observe Away!

Payment Request API

Every single online store needs to reinvent the checkout form.

We're all just trying to do the same thing - collect payment info from the user.

The Payment Request is a standardized browser API to collect billing and shipping information from your users.

[Google Developers]

So, Does the Browser Charge Your Card?

nope!

Is it secure?

The same, or more!

getUserMedia()

Not new at all

BUT

Safari Doesn't give a shit

September 2017 / iOS11

playsinline and getUserMedia()

Promise Based!

Resize Observer

per-element resize events!

Gateway Drug to Element Queries!

WOWOWOWOWOW!

Some cool stuff!

What About Support?

Async + Await via Babel

Resize Observer Polyfillable, but expensive.

Intersection Observer has an official W3 polyfill

Web Payment is easily polyfillable

or Fallback to checkout form

getUserMedia is everywhere

Thanks
Folks!

@wesbosInsta @wesbosWesBos.com
-------------------------------------------------------------------------------- /index.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title What's New in JS by Wes Bos 5 | meta(charset='utf-8') 6 | script(src='slides.js') 7 | link(href='https://fonts.googleapis.com/css?family=Bangers|Open+Sans:400,700' rel='stylesheet' type='text/css') 8 | link(href='styles.css' rel='stylesheet' type='text/css') 9 | body 10 | section.slides.layout-regular.template-default 11 | //- article.first 12 | //- each _,i in Array(31) 13 | //- img(width=10 src="images/#{i}.jpg") 14 | article.first 15 | h1(style="font-size:250px;") What's New
In JavaScript? 16 | br 17 | p 18 | p 19 | a(href='http://wesbos.com') wesbos.com 20 | a(href='http://twitter.com/wesbos') @wesbos 21 | 22 | article 23 | h1 I'm
Wes Bos 24 | p: br 25 | p: img(src="images/canada-flag.png") 26 | 27 | article 28 | h2(style="font-size:60px;") These slides will be available shortly after this talk
I'll tweet the link out. 29 | img(src='images/Twitter_logo_white.png', width='300' style="margin:100px auto") 30 | 31 | h2 32 | a(href='http://twitter.com/wesbos', target='_blank') @wesbos 33 | 34 | article(style='background:white;') 35 | a(href='https://ES6.io/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') 36 | img.wide(src='https://ES6.io/images/es6-facebook-share.png') 37 | a(href='https://ES6.io/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') ES6.io 38 | 39 | 40 | article(style='background:white;') 41 | a(href='https://ReactForBeginners.com/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') 42 | img.wide(src='https://reactforbeginners.com/images/facebook-share.png') 43 | a(href='https://ReactForBeginners.com/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') ReactForBeginners.com 44 | 45 | article(style='background:white;') 46 | a(href='https://LearnNode.com/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') 47 | img.wide(src='https://learnnode.com/images/NODE/node-facebook-share.jpg') 48 | a(href='https://LearnNode.com/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') LearnNode.com 49 | 50 | article(style='background:white;') 51 | a(href='https://CSSGrid.io/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') 52 | img.wide(src='http://wes.io/qEI9/conte nt') 53 | a(href='https://CSSGrid.io/?utm_source=toolingtalk&utm_medium=link&utm_campaign=talkpromo') CSSGrid.io 54 | 55 | article 56 | img.high(src="https://pbs.twimg.com/media/DLTTKRoXUAEwuZR.jpg:large") 57 | a(href='https://syntax.fm') Syntax.fm 58 | article 59 | h1 JavaScript is Always Evolving 60 | 61 | article 62 | h1 ES6 63 | 64 | article 65 | h1 ES2016 (ES7) 66 | 67 | article 68 | h1 ES2017 (ES8) 69 | 70 | article 71 | h1.huge New DOM Apis 72 | 73 | article 74 | h1 This Talk 75 | 76 | article 77 | h1 Reaaaady? 78 | p.sub.hl Let's go! 79 | 80 | article.section 81 | h1 Promises 82 | p.sub Not brand new, but let's do a quick review 83 | 84 | article 85 | h2 Promises are an IOU for something that will happen in the future 86 | 87 | article 88 | ul.build 89 | li AJAX call returning data 90 | li Access to a User's webcam 91 | li Resizing an image 92 | 93 | article 94 | h2 All of these things take time, we simply kick off the process and move along with our lives. 95 | 96 | article 97 | h1 But why do we do it this way? 98 | 99 | article 100 | h1 JavaScript Waits for no one! 101 | 102 | article 103 | h1 Almost Everything Is Asynchronous 104 | 105 | article 106 | h2 Let's say we wanted to do a few things: 107 | ul.build 108 | li Make Coffee 109 | li Drink Coffee 110 | li Cook Breakfast 111 | li Eat Breakfast 112 | 113 | article 114 | p Do you need to finish making coffee before you can Start Breakfast? 115 | p Would it make sense to wait until coffee is made and consumed before we even start cooking breakfast? 116 | 117 | article 118 | p No - we want to start one thing, come back to it once it's finished, and deal with the result accordingly! 119 | 120 | article 121 | img.high(src="./images/screenshots/mw8s.png") 122 | 123 | article 124 | h2 Most new browser APIs are built on Promises, or Observables 125 | p.sub More on Observables in a bit 126 | 127 | article 128 | h2 fetch() 129 | 130 | article 131 | img.wide(src="./images/screenshots/mvNc.png") 132 | 133 | article 134 | h2 Axios 135 | 136 | article 137 | img.wide(src="./images/screenshots/mvvk.png") 138 | 139 | article 140 | h2 Many, many more 141 | p.sub.flat PaymentRequest, getUserMedia(), Web Animation API 142 | 143 | article 144 | h1 It's easy to make your own too! 145 | 146 | article 147 | img.wide(src="./images/screenshots/mvlO.png") 148 | 149 | article 150 | img.high(src="./images/screenshots/mw1Y.gif") 151 | 152 | 153 | article 154 | h1 Christmas Tree Callback Hell 155 | 156 | article 157 | img.wide(src="./images/screenshots/mvjp.png") 158 | 159 | article 160 | img.high(src="./images/screenshots/mul6.png") 161 | 162 | article 163 | h2 we get it
Promises are great. 164 | 165 | article.section 166 | h1 buuuuuuttt 167 | 168 | 169 | article.section 170 | h1 What's the deal with .then()? 171 | p.sub It's still kinda callback-y 172 | 173 | article 174 | h2 Any code that needs to come after the promise still needs to be in the final .then() callback :\ 175 | 176 | article.section 177 | h1 Async + Await 178 | 179 | article.section 180 | h2 Async + Await still is promises, but with a really nice syntax 181 | 182 | article 183 | img.high(src="./images/screenshots/mul6.png") 184 | 185 | article 186 | img.high(src="./images/screenshots/mv6R.png") 187 | 188 | article 189 | h1 Let's break it down 190 | 191 | article 192 | h1.big JavaScript is almost entirely asynchronous / non-blocking 193 | 194 | article 195 | h1 great! - But it's hard to read/write 196 | 197 | article 198 | h1 PHP 199 | img.wide(src="./images/screenshots/mufS.png") 200 | 201 | article 202 | h1 JS 203 | img.wide(src="./images/screenshots/mw88.png") 204 | 205 | article 206 | .build 207 | h2 😕😕😕 208 | p The PHP is easier to read 209 | p The JS is more performant 210 | p I'm not really happy 211 | 212 | article 213 | h1 Synchronous looking code, without the wait. 214 | 215 | article 216 | h1 How does it work? 217 | 218 | article 219 | h1 1. Mark it as Async 220 | 221 | article 222 | img.wide(src="./images/screenshots/mvxm.png") 223 | 224 | article 225 | h1 2. await inside your async fn 226 | 227 | article 228 | img.wide(src="./images/screenshots/mvLf.png") 229 | 230 | article 231 | h1 Best of Both Worlds! 232 | 233 | article 234 | h1 Another Example 235 | 236 | article 237 | h2 Slow... 238 | img.wide(src="./images/screenshots/mvHv.png") 239 | 240 | article 241 | h2 Why wait for Wes? 242 | p.sub Remember, async+await is just promises 243 | 244 | article 245 | img.wide(src="./images/screenshots/mvPr.png", alt="") 246 | 247 | article 248 | h1 Error Handling 249 | p.sub A few options (which we don't have time for)... 250 | 251 | article.section 252 | h1 Done with Async+ Await! 253 | p.sub Let's see more new stuff! 254 | 255 | article.section 256 | h1 Intersection Observer 257 | 258 | article.section 259 | h2 How do you know when an element is on screen? 260 | 261 | article 262 | video.high(src="./images/viewport.mp4" loop controls) 263 | 264 | article 265 | p With Intersection Observer, you can be alerted when an element is fully or partially scrolled into or out of view. 266 | 267 | article 268 | h2 Uses 269 | ul.build 270 | li Animate elements in on scroll 271 | li Play video on scroll in 272 | li Lazy Load images 273 | li Record views for ads beyond fold 274 | li Use with sticky headers 275 | 276 | article 277 | video.high(src="./images/intersection-observer.mp4" loop muted) 278 | 279 | article 280 | video.high(src="./images/sticky.mp4" loop controls) 281 | a(href="https://developers.google.com/web/updates/2017/09/sticky-headers") Google Developers 282 | 283 | article 284 | h1 Ready for Meta? 285 | 286 | article 287 | video(src="./images/meta.mp4" loop controls) 288 | 289 | article 290 | h1 How does it work?! 291 | 292 | article 293 | h2 1. Setup some Options 294 | img.wide(src="./images/screenshots/muk4.png") 295 | 296 | article 297 | h2 2. Create an empty Observer 298 | img.wide(src="./images/screenshots/mupq.png") 299 | 300 | article 301 | h2 3. Give it a callback 302 | img.wide(src="./images/screenshots/mvSI.png") 303 | 304 | article 305 | h2 4. Observe Away! 306 | img.wide(src="./images/screenshots/mvbJ.png") 307 | 308 | article 309 | img.wide(src="./images/screenshots/mvMC.png") 310 | 311 | article.section 312 | h1 Payment Request API 313 | 314 | article 315 | h2 Every single online store needs to reinvent the checkout form. 316 | 317 | article 318 | h2 We're all just trying to do the same thing - collect payment info from the user. 319 | 320 | article 321 | h2 The Payment Request is a standardized browser API to collect billing and shipping information from your users. 322 | 323 | article 324 | video.high(style="width: auto; height: 100%; min-width: 0;" src="./images/paymentRequest.mp4" controls loop) 325 | 326 | article 327 | img.high(src="https://developers.google.com/web/fundamentals/payments/images/state01-receipt-view.png") 328 | a(href="https://developers.google.com/web/fundamentals/payments/") [Google Developers] 329 | 330 | article 331 | video.high(style="width: auto; height: 100%; min-width: 0;" src="./images/webmart.webm" controls loop) 332 | 333 | article 334 | video.high(style="width: auto; height: 100%; min-width: 0;" src="./images/applepay.mp4" controls loop) 335 | 336 | article 337 | h2 So, Does the Browser Charge Your Card? 338 | p.sub nope! 339 | 340 | article 341 | h2 Is it secure? 342 | p.sub The same, or more! 343 | 344 | article.section 345 | h1 getUserMedia() 346 | 347 | article 348 | h2 Not new at all 349 | 350 | article 351 | img.high(src="./images/screenshots/mw55.png") 352 | 353 | article 354 | h1 BUT 355 | p.sub Safari Doesn't give a shit 356 | 357 | article 358 | h1 September 2017 / iOS11 359 | p.sub playsinline and getUserMedia() 360 | 361 | article 362 | video.high(style="width: auto; height: 100%; min-width: 0;" src="./images/gum.mp4" controls loop) 363 | 364 | article 365 | h2 Promise Based! 366 | img.wide(src="./images/screenshots/mv93.png") 367 | 368 | article 369 | img.high(src="./images/screenshots/musk.png") 370 | 371 | article.section 372 | h1 Resize Observer 373 | p.sub per-element resize events! 374 | 375 | article 376 | video.high(style="width: auto; height: 100%; min-width: 0;" src="./images/resizeObserver.mp4" controls loop) 377 | article 378 | img.high(src="./images/screenshots/mvNd.png") 379 | 380 | 381 | article.section 382 | h1 Gateway Drug to Element Queries! 383 | 384 | article 385 | img.high(src="./images/screenshots/mvjO.png") 386 | 387 | article 388 | video.high(style="width: auto; height: 100%; min-width: 0;" src="./images/resize-video-player.mp4" controls loop) 389 | 390 | article.section 391 | h1 WOWOWOWOWOW! 392 | p.sub Some cool stuff! 393 | 394 | article.section 395 | h1 What About Support? 396 | 397 | article.section 398 | h1 Async + Await via Babel 399 | 400 | article.section 401 | h1 Resize Observer Polyfillable, but expensive. 402 | 403 | article.section 404 | h1 Intersection Observer has an official W3 polyfill 405 | 406 | article.section 407 | h1 Web Payment is easily polyfillable 408 | p.sub or Fallback to checkout form 409 | 410 | article.section 411 | h1 getUserMedia is everywhere 412 | 413 | article 414 | h1.big Thanks
Folks! 415 | a(href="http://twitter.com/wesbos") @wesbos 416 | a(href="http://instagram.com/wesbos") Insta @wesbos 417 | a(href="http://wesbos.com") WesBos.com 418 | script(src='scripts.js') -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "modern-workflow-and-tooling", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "slides.js", 6 | "directories": { 7 | "example": "examples" 8 | }, 9 | "scripts": { 10 | "start": "gulp" 11 | }, 12 | "author": "", 13 | "license": "ISC", 14 | "devDependencies": { 15 | "browser-sync": "^2.18.13", 16 | "gulp": "^3.9.1", 17 | "gulp-autoprefixer": "^4.0.0", 18 | "gulp-jade": "^1.1.0", 19 | "gulp-load-plugins": "^1.5.0", 20 | "gulp-plumber": "^1.1.0", 21 | "gulp-stylus": "^2.6.0", 22 | "request": "^2.83.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /prettify.js: -------------------------------------------------------------------------------- 1 | !function(){/* 2 | 3 | Copyright (C) 2013 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | Copyright (C) 2006 Google Inc. 18 | 19 | Licensed under the Apache License, Version 2.0 (the "License"); 20 | you may not use this file except in compliance with the License. 21 | You may obtain a copy of the License at 22 | 23 | http://www.apache.org/licenses/LICENSE-2.0 24 | 25 | Unless required by applicable law or agreed to in writing, software 26 | distributed under the License is distributed on an "AS IS" BASIS, 27 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 28 | See the License for the specific language governing permissions and 29 | limitations under the License. 30 | */ 31 | (function(){function ba(g){function k(){try{M.doScroll("left")}catch(g){t.setTimeout(k,50);return}z("poll")}function z(k){if("readystatechange"!=k.type||"complete"==A.readyState)("load"==k.type?t:A)[B](p+k.type,z,!1),!q&&(q=!0)&&g.call(t,k.type||k)}var Y=A.addEventListener,q=!1,C=!0,x=Y?"addEventListener":"attachEvent",B=Y?"removeEventListener":"detachEvent",p=Y?"":"on";if("complete"==A.readyState)g.call(t,"lazy");else{if(A.createEventObject&&M.doScroll){try{C=!t.frameElement}catch(da){}C&&k()}A[x](p+ 32 | "DOMContentLoaded",z,!1);A[x](p+"readystatechange",z,!1);t[x](p+"load",z,!1)}}function U(){V&&ba(function(){var g=N.length;ca(g?function(){for(var k=0;k=a?parseInt(e.substring(1),8):"u"===a||"x"===a?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return"\\"===e||"-"=== 36 | e||"]"===e||"^"===e?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[0-9A-Fa-f]{4}|\\x[0-9A-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\s\S]|-|[^-\\]/g);e=[];var a="^"===b[0],c=["["];a&&c.push("^");for(var a=a?1:0,h=b.length;an||122n||90n||122l[0]&&(l[1]+1>l[0]&&c.push("-"),c.push(f(l[1])));c.push("]");return c.join("")}function g(e){for(var a=e.source.match(/(?:\[(?:[^\x5C\x5D]|\\[\s\S])*\]|\\u[A-Fa-f0-9]{4}|\\x[A-Fa-f0-9]{2}|\\[0-9]+|\\[^ux0-9]|\(\?[:!=]|[\(\)\^]|[^\x5B\x5C\(\)\^]+)/g),c=a.length,d=[],h=0,l=0;h/,null])):d.push(["com",/^#[^\r\n]*/,null,"#"]));a.cStyleComments&&(f.push(["com",/^\/\/[^\r\n]*/,null]),f.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));if(b=a.regexLiterals){var g=(b=1|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+ 45 | ("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+g+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+g+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&f.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&f.push(["kwd",new RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),null]);d.push(["pln",/^\s+/,null," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");f.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i, 46 | null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(b),null]);return C(d,f)}function B(a,d,f){function b(a){var c=a.nodeType;if(1==c&&!k.test(a.className))if("br"===a.nodeName)g(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((3==c||4==c)&&f){var d=a.nodeValue,p=d.match(q);p&&(c=d.substring(0,p.index),a.nodeValue=c,(d=d.substring(p.index+p[0].length))&& 47 | a.parentNode.insertBefore(m.createTextNode(d),a.nextSibling),g(a),c||a.parentNode.removeChild(a))}}function g(a){function b(a,c){var d=c?a.cloneNode(!1):a,n=a.parentNode;if(n){var n=b(n,1),e=a.nextSibling;n.appendChild(d);for(var f=e;f;f=e)e=f.nextSibling,n.appendChild(f)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;a=b(a.nextSibling,0);for(var d;(d=a.parentNode)&&1===d.nodeType;)a=d;c.push(a)}for(var k=/(?:^|\s)nocode(?:\s|$)/,q=/\r\n?|\n/,m=a.ownerDocument,p=m.createElement("li");a.firstChild;)p.appendChild(a.firstChild); 48 | for(var c=[p],r=0;r=+g[1],d=/\n/g,p=a.a,k=p.length,f=0,m=a.c,t=m.length,b=0,c=a.g,r=c.length,x=0;c[r]=k;var u,e;for(e=u=0;e=l&&(b+=2);f>=n&&(x+=2)}}finally{h&&(h.style.display=a)}}catch(y){R.console&&console.log(y&&y.stack||y)}}var R=window,K=["break,continue,do,else,for,if,return,while"], 51 | L=[[K,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],S=[L,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], 52 | M=[L,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],N=[L,"abstract,as,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],L=[L,"debugger,eval,export,function,get,instanceof,null,set,undefined,var,with,Infinity,NaN"], 53 | O=[K,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],P=[K,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],K=[K,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, 54 | T=/\S/,U=x({keywords:[S,N,M,L,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",O,P,K],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),X={};p(U,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", 55 | /^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" "));p(C([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], 56 | ["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\s\S]+/]]),["uq.val"]);p(x({keywords:S,hashComments:!0,cStyleComments:!0,types:Q}),"c cc cpp cxx cyc m".split(" "));p(x({keywords:"null,true,false"}),["json"]);p(x({keywords:N,hashComments:!0,cStyleComments:!0, 57 | verbatimStrings:!0,types:Q}),["cs"]);p(x({keywords:M,cStyleComments:!0}),["java"]);p(x({keywords:K,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(x({keywords:O,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(x({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}), 58 | ["perl","pl","pm"]);p(x({keywords:P,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(x({keywords:L,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(x({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(C([],[["str",/^[\s\S]+/]]),["regex"]); 59 | var V=R.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,f){f=f||!1;d=d||null;var b=document.createElement("div");b.innerHTML="
"+a+"
";b=b.firstChild;f&&B(b,f,!0);H({j:d,m:f,h:b,l:1,a:null,i:null,c:null,g:null});return b.innerHTML}, 60 | prettyPrint:g=g=function(a,d){function f(){for(var b=R.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;r { 10 | entries.forEach(entry => { 11 | if (entry.isIntersecting && entry.target.parentElement.classList.contains('current')) { 12 | entry.target.play(); 13 | } else { 14 | entry.target.pause(); 15 | } 16 | }); 17 | }; 18 | 19 | const observer = new IntersectionObserver(callback, options); 20 | 21 | // get a list of all videos on the page 22 | const videos = document.querySelectorAll('video'); 23 | // Observe each of those elements 24 | videos.forEach(video => observer.observe(video)); 25 | -------------------------------------------------------------------------------- /slides.js: -------------------------------------------------------------------------------- 1 | /* 2 | Google HTML5 slides template 3 | 4 | Authors: Luke Mahé (code) 5 | Marcin Wichary (code and design) 6 | 7 | Dominic Mazzoni (browser compatibility) 8 | Charles Chen (ChromeVox support) 9 | 10 | URL: http://code.google.com/p/html5slides/ 11 | */ 12 | 13 | // var PERMANENT_URL_PREFIX = 'http://localhost/demos/talks/snow/'; 14 | 15 | let PERMANENT_URL_PREFIX = window.location.origin + window.location.pathname; 16 | 17 | // var PERMANENT_URL_PREFIX = window.location.href.split('/index.html')[0] + '/' 18 | 19 | let SLIDE_CLASSES = ['far-past', 'past', 'current', 'next', 'far-next']; 20 | 21 | let PM_TOUCH_SENSITIVITY = 15; 22 | 23 | let curSlide; 24 | 25 | /* ---------------------------------------------------------------------- */ 26 | /* classList polyfill by Eli Grey 27 | * (http://purl.eligrey.com/github/classList.js/blob/master/classList.js) */ 28 | 29 | if (typeof document !== 'undefined' && !('classList' in document.createElement('a'))) { 30 | 31 | (function(view) { 32 | let classListProp = 'classList', 33 | protoProp = 'prototype', 34 | elemCtrProto = (view.HTMLElement || view.Element)[protoProp], 35 | objCtr = Object; 36 | (strTrim = 37 | String[protoProp].trim || 38 | function() { 39 | return this.replace(/^\s+|\s+$/g, ''); 40 | }), 41 | (arrIndexOf = 42 | Array[protoProp].indexOf || 43 | function(item) { 44 | for (let i = 0, len = this.length; i < len; i++) { 45 | if (i in this && this[i] === item) { 46 | return i; 47 | } 48 | } 49 | return -1; 50 | }), 51 | // Vendors: please allow content code to instantiate DOMExceptions 52 | (DOMEx = function(type, message) { 53 | this.name = type; 54 | this.code = DOMException[type]; 55 | this.message = message; 56 | }), 57 | (checkTokenAndGetIndex = function(classList, token) { 58 | if (token === '') { 59 | throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified'); 60 | } 61 | if (/\s/.test(token)) { 62 | throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character'); 63 | } 64 | return arrIndexOf.call(classList, token); 65 | }), 66 | (ClassList = function(elem) { 67 | let trimmedClasses = strTrim.call(elem.className), 68 | classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []; 69 | for (let i = 0, len = classes.length; i < len; i++) { 70 | this.push(classes[i]); 71 | } 72 | this._updateClassName = function() { 73 | elem.className = this.toString(); 74 | }; 75 | }), 76 | (classListProto = ClassList[protoProp] = []), 77 | (classListGetter = function() { 78 | return new ClassList(this); 79 | }); 80 | // Most DOMException implementations don't allow calling DOMException's toString() 81 | // on non-DOMExceptions. Error's toString() is sufficient here. 82 | DOMEx[protoProp] = Error[protoProp]; 83 | classListProto.item = function(i) { 84 | return this[i] || null; 85 | }; 86 | classListProto.contains = function(token) { 87 | token += ''; 88 | return checkTokenAndGetIndex(this, token) !== -1; 89 | }; 90 | classListProto.add = function(token) { 91 | token += ''; 92 | if (checkTokenAndGetIndex(this, token) === -1) { 93 | this.push(token); 94 | this._updateClassName(); 95 | } 96 | }; 97 | classListProto.remove = function(token) { 98 | token += ''; 99 | let index = checkTokenAndGetIndex(this, token); 100 | if (index !== -1) { 101 | this.splice(index, 1); 102 | this._updateClassName(); 103 | } 104 | }; 105 | classListProto.toggle = function(token) { 106 | token += ''; 107 | if (checkTokenAndGetIndex(this, token) === -1) { 108 | this.add(token); 109 | } else { 110 | this.remove(token); 111 | } 112 | }; 113 | classListProto.toString = function() { 114 | return this.join(' '); 115 | }; 116 | 117 | if (objCtr.defineProperty) { 118 | let classListPropDesc = { 119 | get: classListGetter, 120 | enumerable: true, 121 | configurable: true, 122 | }; 123 | try { 124 | objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); 125 | } catch (ex) { 126 | // IE 8 doesn't support enumerable:true 127 | if (ex.number === -0x7ff5ec54) { 128 | classListPropDesc.enumerable = false; 129 | objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); 130 | } 131 | } 132 | } else if (objCtr[protoProp].__defineGetter__) { 133 | elemCtrProto.__defineGetter__(classListProp, classListGetter); 134 | } 135 | })(self); 136 | } 137 | /* ---------------------------------------------------------------------- */ 138 | 139 | /* Slide movement */ 140 | 141 | function getSlideEl(no) { 142 | if ((no < 0) || (no >= slideEls.length)) { 143 | return null; 144 | } 145 | return slideEls[no]; 146 | 147 | } 148 | 149 | function updateSlideClass(slideNo, className) { 150 | let el = getSlideEl(slideNo); 151 | 152 | if (!el) { 153 | return; 154 | } 155 | 156 | if (className) { 157 | el.classList.add(className); 158 | } 159 | 160 | for (let i in SLIDE_CLASSES) { 161 | if (className != SLIDE_CLASSES[i]) { 162 | el.classList.remove(SLIDE_CLASSES[i]); 163 | } 164 | } 165 | } 166 | 167 | function updateSlides() { 168 | for (let i = 0; i < slideEls.length; i++) { 169 | switch (i) { 170 | case curSlide - 2: 171 | updateSlideClass(i, 'far-past'); 172 | break; 173 | case curSlide - 1: 174 | updateSlideClass(i, 'past'); 175 | break; 176 | case curSlide: 177 | updateSlideClass(i, 'current'); 178 | break; 179 | case curSlide + 1: 180 | updateSlideClass(i, 'next'); 181 | break; 182 | case curSlide + 2: 183 | updateSlideClass(i, 'far-next'); 184 | break; 185 | default: 186 | updateSlideClass(i); 187 | break; 188 | } 189 | } 190 | 191 | triggerLeaveEvent(curSlide - 1); 192 | triggerEnterEvent(curSlide); 193 | 194 | window.setTimeout(() => { 195 | // Hide after the slide 196 | disableSlideFrames(curSlide - 2); 197 | }, 301); 198 | 199 | enableSlideFrames(curSlide - 1); 200 | enableSlideFrames(curSlide + 2); 201 | 202 | if (isChromeVoxActive()) { 203 | speakAndSyncToNode(slideEls[curSlide]); 204 | } 205 | 206 | updateHash(); 207 | } 208 | 209 | function buildNextItem() { 210 | let toBuild = slideEls[curSlide].querySelectorAll('.to-build'); 211 | 212 | if (!toBuild.length) { 213 | return false; 214 | } 215 | 216 | toBuild[0].classList.remove('to-build'); 217 | 218 | if (isChromeVoxActive()) { 219 | speakAndSyncToNode(toBuild[0]); 220 | } 221 | 222 | return true; 223 | } 224 | 225 | function prevSlide() { 226 | if (curSlide > 0) { 227 | curSlide--; 228 | updateSlides(); 229 | } 230 | } 231 | 232 | function nextSlide() { 233 | if (buildNextItem()) { 234 | return; 235 | } 236 | 237 | if (curSlide < slideEls.length - 1) { 238 | curSlide++; 239 | updateSlides(); 240 | } 241 | } 242 | 243 | function triggerEnterEvent(no) { 244 | let el = getSlideEl(no); 245 | if (!el) { 246 | return; 247 | } 248 | 249 | let onEnter = el.getAttribute('onslideenter'); 250 | if (onEnter) { 251 | new Function(onEnter).call(el); 252 | } 253 | 254 | let evt = document.createEvent('Event'); 255 | evt.initEvent('slideenter', true, true); 256 | evt.slideNumber = no + 1; // Make it readable 257 | 258 | el.dispatchEvent(evt); 259 | } 260 | 261 | function triggerLeaveEvent(no) { 262 | let el = getSlideEl(no); 263 | if (!el) { 264 | return; 265 | } 266 | 267 | let onLeave = el.getAttribute('onslideleave'); 268 | if (onLeave) { 269 | new Function(onLeave).call(el); 270 | } 271 | 272 | let evt = document.createEvent('Event'); 273 | evt.initEvent('slideleave', true, true); 274 | evt.slideNumber = no + 1; // Make it readable 275 | 276 | el.dispatchEvent(evt); 277 | } 278 | 279 | /* Touch events */ 280 | 281 | function handleTouchStart(event) { 282 | if (event.touches.length == 1) { 283 | touchDX = 0; 284 | touchDY = 0; 285 | 286 | touchStartX = event.touches[0].pageX; 287 | touchStartY = event.touches[0].pageY; 288 | 289 | document.body.addEventListener('touchmove', handleTouchMove, true); 290 | document.body.addEventListener('touchend', handleTouchEnd, true); 291 | } 292 | } 293 | 294 | function handleTouchMove(event) { 295 | if (event.touches.length > 1) { 296 | cancelTouch(); 297 | } else { 298 | touchDX = event.touches[0].pageX - touchStartX; 299 | touchDY = event.touches[0].pageY - touchStartY; 300 | } 301 | } 302 | 303 | function handleTouchEnd(event) { 304 | let dx = Math.abs(touchDX); 305 | let dy = Math.abs(touchDY); 306 | 307 | if (dx > PM_TOUCH_SENSITIVITY && dy < dx * 2 / 3) { 308 | if (touchDX > 0) { 309 | prevSlide(); 310 | } else { 311 | nextSlide(); 312 | } 313 | } 314 | 315 | cancelTouch(); 316 | } 317 | 318 | function cancelTouch() { 319 | document.body.removeEventListener('touchmove', handleTouchMove, true); 320 | document.body.removeEventListener('touchend', handleTouchEnd, true); 321 | } 322 | 323 | /* Preloading frames */ 324 | 325 | function disableSlideFrames(no) { 326 | let el = getSlideEl(no); 327 | if (!el) { 328 | return; 329 | } 330 | 331 | let frames = el.getElementsByTagName('iframe'); 332 | for (var i = 0, frame; (frame = frames[i]); i++) { 333 | disableFrame(frame); 334 | } 335 | } 336 | 337 | function enableSlideFrames(no) { 338 | let el = getSlideEl(no); 339 | if (!el) { 340 | return; 341 | } 342 | 343 | let frames = el.getElementsByTagName('iframe'); 344 | for (var i = 0, frame; (frame = frames[i]); i++) { 345 | enableFrame(frame); 346 | } 347 | } 348 | 349 | function disableFrame(frame) { 350 | frame.src = 'about:blank'; 351 | } 352 | 353 | function enableFrame(frame) { 354 | let src = frame._src; 355 | 356 | if (frame.src != src && src != 'about:blank') { 357 | frame.src = src; 358 | } 359 | } 360 | 361 | function setupFrames() { 362 | let frames = document.querySelectorAll('iframe'); 363 | for (var i = 0, frame; (frame = frames[i]); i++) { 364 | frame._src = frame.src; 365 | disableFrame(frame); 366 | } 367 | 368 | enableSlideFrames(curSlide); 369 | enableSlideFrames(curSlide + 1); 370 | enableSlideFrames(curSlide + 2); 371 | } 372 | 373 | function setupInteraction() { 374 | /* Clicking and tapping */ 375 | 376 | var el = document.createElement('div'); 377 | el.className = 'slide-area'; 378 | el.id = 'prev-slide-area'; 379 | el.addEventListener('click', prevSlide, false); 380 | document.querySelector('section.slides').appendChild(el); 381 | 382 | var el = document.createElement('div'); 383 | el.className = 'slide-area'; 384 | el.id = 'next-slide-area'; 385 | el.addEventListener('click', nextSlide, false); 386 | document.querySelector('section.slides').appendChild(el); 387 | 388 | /* Swiping */ 389 | 390 | document.body.addEventListener('touchstart', handleTouchStart, false); 391 | } 392 | 393 | /* ChromeVox support */ 394 | 395 | function isChromeVoxActive() { 396 | if (typeof (cvox) == 'undefined') { 397 | return false; 398 | } 399 | return true; 400 | 401 | } 402 | 403 | function speakAndSyncToNode(node) { 404 | if (!isChromeVoxActive()) { 405 | return; 406 | } 407 | 408 | cvox.ChromeVox.navigationManager.switchToStrategy(cvox.ChromeVoxNavigationManager.STRATEGIES.LINEARDOM, 0, true); 409 | cvox.ChromeVox.navigationManager.syncToNode(node); 410 | cvox.ChromeVoxUserCommands.finishNavCommand(''); 411 | let target = node; 412 | while (target.firstChild) { 413 | target = target.firstChild; 414 | } 415 | cvox.ChromeVox.navigationManager.syncToNode(target); 416 | } 417 | 418 | function speakNextItem() { 419 | if (!isChromeVoxActive()) { 420 | return; 421 | } 422 | 423 | cvox.ChromeVox.navigationManager.switchToStrategy(cvox.ChromeVoxNavigationManager.STRATEGIES.LINEARDOM, 0, true); 424 | cvox.ChromeVox.navigationManager.next(true); 425 | if (!cvox.DomUtil.isDescendantOfNode(cvox.ChromeVox.navigationManager.getCurrentNode(), slideEls[curSlide])) { 426 | let target = slideEls[curSlide]; 427 | while (target.firstChild) { 428 | target = target.firstChild; 429 | } 430 | cvox.ChromeVox.navigationManager.syncToNode(target); 431 | cvox.ChromeVox.navigationManager.next(true); 432 | } 433 | cvox.ChromeVoxUserCommands.finishNavCommand(''); 434 | } 435 | 436 | function speakPrevItem() { 437 | if (!isChromeVoxActive()) { 438 | return; 439 | } 440 | 441 | cvox.ChromeVox.navigationManager.switchToStrategy(cvox.ChromeVoxNavigationManager.STRATEGIES.LINEARDOM, 0, true); 442 | cvox.ChromeVox.navigationManager.previous(true); 443 | if (!cvox.DomUtil.isDescendantOfNode(cvox.ChromeVox.navigationManager.getCurrentNode(), slideEls[curSlide])) { 444 | let target = slideEls[curSlide]; 445 | while (target.lastChild) { 446 | target = target.lastChild; 447 | } 448 | cvox.ChromeVox.navigationManager.syncToNode(target); 449 | cvox.ChromeVox.navigationManager.previous(true); 450 | } 451 | cvox.ChromeVoxUserCommands.finishNavCommand(''); 452 | } 453 | 454 | /* Hash functions */ 455 | 456 | function getCurSlideFromHash() { 457 | let slideNo = parseInt(location.hash.substr(1)); 458 | 459 | if (slideNo) { 460 | curSlide = slideNo - 1; 461 | } else { 462 | curSlide = 0; 463 | } 464 | } 465 | 466 | function updateHash() { 467 | location.replace(`#${ curSlide + 1}`); 468 | } 469 | 470 | /* Event listeners */ 471 | 472 | function handleBodyKeyDown(event) { 473 | switch (event.keyCode) { 474 | case 39: // right arrow 475 | case 13: // Enter 476 | case 32: // space 477 | case 34: // PgDn 478 | nextSlide(); 479 | event.preventDefault(); 480 | break; 481 | 482 | case 37: // left arrow 483 | case 8: // Backspace 484 | case 33: // PgUp 485 | prevSlide(); 486 | event.preventDefault(); 487 | break; 488 | 489 | case 40: // down arrow 490 | if (isChromeVoxActive()) { 491 | speakNextItem(); 492 | } else { 493 | nextSlide(); 494 | } 495 | event.preventDefault(); 496 | break; 497 | 498 | case 38: // up arrow 499 | if (isChromeVoxActive()) { 500 | speakPrevItem(); 501 | } else { 502 | prevSlide(); 503 | } 504 | event.preventDefault(); 505 | break; 506 | } 507 | } 508 | 509 | function addEventListeners() { 510 | document.addEventListener('keydown', handleBodyKeyDown, false); 511 | } 512 | 513 | /* Initialization */ 514 | 515 | function addPrettify() { 516 | let els = document.querySelectorAll('pre'); 517 | for (var i = 0, el; (el = els[i]); i++) { 518 | if (!el.classList.contains('noprettyprint')) { 519 | el.classList.add('prettyprint'); 520 | } 521 | } 522 | 523 | var el = document.createElement('script'); 524 | el.type = 'text/javascript'; 525 | el.src = `${PERMANENT_URL_PREFIX }prettify.js`; 526 | el.onload = function() { 527 | // prettyPrint(); don't need it! 528 | }; 529 | document.body.appendChild(el); 530 | } 531 | 532 | function addFontStyle() { 533 | return; // NONONONON 534 | let el = document.createElement('link'); 535 | el.rel = 'stylesheet'; 536 | el.type = 'text/css'; 537 | el.href = 538 | 'http://fonts.googleapis.com/css?family=' + 'Open+Sans:regular,semibold,italic,italicsemibold|Droid+Sans+Mono'; 539 | 540 | document.body.appendChild(el); 541 | } 542 | 543 | function addGeneralStyle() { 544 | var el = document.createElement('link'); 545 | el.rel = 'stylesheet'; 546 | el.type = 'text/css'; 547 | el.href = `${PERMANENT_URL_PREFIX }styles.css`; 548 | document.body.appendChild(el); 549 | 550 | var el = document.createElement('meta'); 551 | el.name = 'viewport'; 552 | el.content = 'width=1100,height=750'; 553 | document.querySelector('head').appendChild(el); 554 | 555 | var el = document.createElement('meta'); 556 | el.name = 'apple-mobile-web-app-capable'; 557 | el.content = 'yes'; 558 | document.querySelector('head').appendChild(el); 559 | } 560 | 561 | function makeBuildLists() { 562 | for (var i = curSlide, slide; (slide = slideEls[i]); i++) { 563 | let items = slide.querySelectorAll('.build > *'); 564 | for (var j = 0, item; (item = items[j]); j++) { 565 | if (item.classList) { 566 | item.classList.add('to-build'); 567 | } 568 | } 569 | } 570 | } 571 | 572 | function handleDomLoaded() { 573 | slideEls = document.querySelectorAll('section.slides > article'); 574 | 575 | setupFrames(); 576 | 577 | addFontStyle(); 578 | // addGeneralStyle(); do it myself 579 | addPrettify(); 580 | addEventListeners(); 581 | 582 | updateSlides(); 583 | 584 | setupInteraction(); 585 | makeBuildLists(); 586 | 587 | document.body.classList.add('loaded'); 588 | } 589 | 590 | function initialize() { 591 | getCurSlideFromHash(); 592 | 593 | if (window._DEBUG) { 594 | PERMANENT_URL_PREFIX = '../'; 595 | } 596 | 597 | if (window._DCL) { 598 | handleDomLoaded(); 599 | } else { 600 | document.addEventListener('DOMContentLoaded', handleDomLoaded, false); 601 | } 602 | } 603 | 604 | // If ?debug exists then load the script relative instead of absolute 605 | if (!window._DEBUG && document.location.href.indexOf('?debug') !== -1) { 606 | document.addEventListener( 607 | 'DOMContentLoaded', 608 | function() { 609 | // Avoid missing the DomContentLoaded event 610 | window['_DCL'] = true; 611 | }, 612 | false 613 | ); 614 | 615 | window._DEBUG = true; 616 | let script = document.createElement('script'); 617 | script.type = 'text/javascript'; 618 | script.src = '../slides.js'; 619 | let s = document.getElementsByTagName('script')[0]; 620 | s.parentNode.insertBefore(script, s); 621 | 622 | // Remove this script 623 | s.parentNode.removeChild(s); 624 | } else { 625 | initialize(); 626 | } 627 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | display: block !important; 8 | height: 100%; 9 | min-height: 740px; 10 | overflow-x: hidden; 11 | overflow-y: auto; 12 | } 13 | .slides { 14 | width: 100%; 15 | height: 100%; 16 | left: 0; 17 | top: 0; 18 | color: #f21818; 19 | background 20 | position: absolute; 21 | -webkit-transform: translate3d(0, 0, 0); 22 | } 23 | .slides > article { 24 | display: block; 25 | position: absolute; 26 | overflow: hidden; 27 | width: 1920px; 28 | height: 1130px; 29 | margin-left: -960px; 30 | margin-top: -565px; 31 | left: 50%; 32 | top: 50%; 33 | border-radius: 5px; 34 | padding: 0; 35 | background-color: none; 36 | -webkit-transition: all 0.3s ease-out; 37 | transition: all 0.3s ease-out; 38 | -webkit-box-pack: center; 39 | -ms-flex-pack: center; 40 | justify-content: center; 41 | -webkit-box-orient: vertical; 42 | -webkit-box-direction: normal; 43 | -ms-flex-direction: column; 44 | flex-direction: column; 45 | } 46 | .slides > article > * { 47 | display: block; 48 | clear: both; 49 | min-width: 100%; 50 | -ms-flex-wrap: wrap; 51 | flex-wrap: wrap; 52 | } 53 | .slides > article > img { 54 | min-width: 0; 55 | display: block; 56 | margin: 0 auto; 57 | } 58 | .slide-area { 59 | z-index: 1000; 60 | position: absolute; 61 | left: 0; 62 | top: 0; 63 | width: 150px; 64 | height: 100%; 65 | left: 0; 66 | top: 0; 67 | cursor: pointer; 68 | tap-highlight-color: transparent; 69 | } 70 | #next-slide-area { 71 | right: 0; 72 | left: auto; 73 | } 74 | .slides.layout-widescreen #prev-slide-area, 75 | .slides.layout-faux-widescreen #prev-slide-area { 76 | margin-left: -650px; 77 | } 78 | .slides.layout-widescreen #next-slide-area, 79 | .slides.layout-faux-widescreen #next-slide-area { 80 | margin-left: 500px; 81 | } 82 | .slides > article { 83 | display: none; 84 | text-align: center; 85 | } 86 | .slides > article.far-past { 87 | display: block; 88 | -webkit-transform: translate(-4000px); 89 | transform: translate(-4000px); 90 | display: none; 91 | } 92 | .slides > article.past { 93 | display: -webkit-box; 94 | display: -ms-flexbox; 95 | display: flex; 96 | -webkit-transform: scale(0.5) translate(-1920px); 97 | transform: scale(0.5) translate(-1920px); 98 | opacity: 0.3; 99 | display: none; 100 | } 101 | .slides > article.current { 102 | display: -webkit-box; 103 | display: -ms-flexbox; 104 | display: flex; 105 | -webkit-transform: translate(0); 106 | transform: translate(0); 107 | z-index: 10; 108 | } 109 | .slides > article.next { 110 | display: -webkit-box; 111 | display: -ms-flexbox; 112 | display: flex; 113 | -webkit-transform: scale(0.5) translate(1920px); 114 | transform: scale(0.5) translate(1920px); 115 | opacity: 0.3; 116 | display: none; 117 | } 118 | .slides > article.far-next { 119 | display: -webkit-box; 120 | display: -ms-flexbox; 121 | display: flex; 122 | -webkit-transform: translate(4000px); 123 | transform: translate(4000px); 124 | display: none; 125 | } 126 | .slides > article { 127 | color: #6c818f; 128 | font-size: 30px; 129 | letter-spacing: -1px; 130 | } 131 | b { 132 | font-weight: 600; 133 | } 134 | .blue { 135 | color: #06c; 136 | } 137 | .yellow { 138 | color: #ffd319; 139 | } 140 | .green { 141 | color: #29e254; 142 | } 143 | .red { 144 | color: #f00; 145 | } 146 | .black { 147 | color: #000; 148 | } 149 | .white { 150 | color: #fff; 151 | } 152 | a { 153 | color: #fd0; 154 | } 155 | ::-moz-selection { 156 | background: #fd0; 157 | } 158 | ::selection { 159 | background: #fd0; 160 | } 161 | p { 162 | margin: 0; 163 | padding: 0; 164 | } 165 | p:first-child { 166 | margin-top: 0; 167 | } 168 | body { 169 | font-family: 'Open Sans', sans-serif; 170 | } 171 | h1 { 172 | font-size: 60px; 173 | padding: 0; 174 | margin: 0; 175 | color: #fff; 176 | } 177 | h2 { 178 | font-size: 45px; 179 | line-height: 45px; 180 | bottom: 150px; 181 | padding: 0; 182 | margin: 0; 183 | font-weight: 600; 184 | color: #fff; 185 | letter-spacing: -2px; 186 | } 187 | h2 a { 188 | text-decoration: none; 189 | } 190 | h3 { 191 | font-size: 20px; 192 | line-height: 36px; 193 | padding: 0 0 10px 0; 194 | margin: 0; 195 | padding-right: 40px; 196 | font-weight: 600; 197 | letter-spacing: -1px; 198 | color: #eaeaea; 199 | } 200 | .half { 201 | width: 350px; 202 | float: left; 203 | } 204 | .button:hover { 205 | color: #fff; 206 | background: #392c44; 207 | } 208 | pre.half { 209 | width: 400px; 210 | font-size: 17px; 211 | } 212 | p.small { 213 | color: #000; 214 | font-size: 18px; 215 | } 216 | article.fill h3 { 217 | background: rgba(255,255,255,0.75); 218 | padding-top: 0.2em; 219 | padding-bottom: 0.3em; 220 | margin-top: -0.2em; 221 | margin-left: -60px; 222 | padding-left: 60px; 223 | margin-right: -60px; 224 | padding-right: 60px; 225 | } 226 | h4 { 227 | margin: 0; 228 | } 229 | .center { 230 | text-align: center; 231 | } 232 | .center h3 { 233 | font-size: 100px; 234 | margin-top: 220px; 235 | } 236 | ul { 237 | list-style: none; 238 | margin: 0; 239 | padding: 0; 240 | margin-top: 40px; 241 | margin-left: 0.75em; 242 | } 243 | ul:first-child { 244 | margin-top: 0; 245 | } 246 | ul ul { 247 | margin-top: 0.5em; 248 | } 249 | li { 250 | padding: 0; 251 | margin: 0; 252 | margin-bottom: 0.5em; 253 | } 254 | li::before { 255 | content: '·'; 256 | width: 0.75em; 257 | margin-left: -0.75em; 258 | position: absolute; 259 | } 260 | pre { 261 | font-size: 20px; 262 | line-height: 28px; 263 | padding: 5px 10px; 264 | letter-spacing: -1px; 265 | margin-top: 20px; 266 | margin-bottom: 20px; 267 | color: #000; 268 | background: #f0f0f0; 269 | border: 1px solid #e0e0e0; 270 | -webkit-box-shadow: inset 0 2px 6px rgba(0,0,0,0.1); 271 | box-shadow: inset 0 2px 6px rgba(0,0,0,0.1); 272 | overflow: hidden; 273 | } 274 | code { 275 | font-size: 95%; 276 | font-family: 'Droid Sans Mono', 'Courier New', monospace; 277 | display: inline-block; 278 | background: rgba(255,255,255,0.2); 279 | padding: 10px; 280 | border-radius: 4px; 281 | font-weight: 600; 282 | } 283 | iframe { 284 | width: 100%; 285 | height: 620px; 286 | background: #fff; 287 | border: 1px solid #c0c0c0; 288 | margin: -1px; 289 | /*box-shadow: inset 0 2px 6px rgba(0, 0, 0, .1);*/ 290 | } 291 | img { 292 | max-width: 100%; 293 | max-height: 570px; 294 | } 295 | h3 + iframe { 296 | margin-top: 40px; 297 | height: 540px; 298 | } 299 | article.fill iframe { 300 | position: absolute; 301 | left: 0; 302 | top: 0; 303 | width: 100%; 304 | height: 100%; 305 | border: 0; 306 | margin: 0; 307 | border-radius: 10px; 308 | -o-border-radius: 10px; 309 | -moz-border-radius: 10px; 310 | -webkit-border-radius: 10px; 311 | z-index: -1; 312 | } 313 | article.fill img { 314 | position: absolute; 315 | left: 0; 316 | top: 0; 317 | min-width: 100%; 318 | min-height: 100%; 319 | border-radius: 10px; 320 | -o-border-radius: 10px; 321 | -moz-border-radius: 10px; 322 | -webkit-border-radius: 10px; 323 | z-index: -1; 324 | } 325 | img.centered { 326 | margin: 0 auto; 327 | display: block; 328 | } 329 | table { 330 | width: 100%; 331 | border-collapse: collapse; 332 | margin-top: 40px; 333 | } 334 | th { 335 | font-weight: 600; 336 | text-align: left; 337 | } 338 | td, 339 | th { 340 | border: 1px solid #e0e0e0; 341 | padding: 5px 10px; 342 | vertical-align: top; 343 | } 344 | .source { 345 | position: absolute; 346 | left: 60px; 347 | top: 644px; 348 | padding-right: 175px; 349 | font-size: 15px; 350 | letter-spacing: 0; 351 | line-height: 18px; 352 | } 353 | q { 354 | display: block; 355 | font-size: 60px; 356 | line-height: 72px; 357 | margin-left: 20px; 358 | margin-top: 100px; 359 | margin-right: 150px; 360 | } 361 | q::before { 362 | content: '“'; 363 | position: absolute; 364 | display: inline-block; 365 | margin-left: -2.1em; 366 | width: 2em; 367 | text-align: right; 368 | font-size: 90px; 369 | color: #c0c0c0; 370 | } 371 | q::after { 372 | content: '”'; 373 | position: absolute; 374 | margin-left: 0.1em; 375 | font-size: 90px; 376 | color: #c0c0c0; 377 | } 378 | div.author { 379 | text-align: right; 380 | font-size: 40px; 381 | margin-top: 20px; 382 | margin-right: 150px; 383 | } 384 | div.author::before { 385 | content: '—'; 386 | } 387 | article.smaller p, 388 | article.smaller ul { 389 | font-size: 20px; 390 | line-height: 24px; 391 | letter-spacing: 0; 392 | } 393 | article.smaller table { 394 | font-size: 20px; 395 | line-height: 24px; 396 | letter-spacing: 0; 397 | } 398 | article.smaller pre { 399 | font-size: 15px; 400 | line-height: 20px; 401 | letter-spacing: 0; 402 | } 403 | article.smaller q { 404 | font-size: 40px; 405 | line-height: 48px; 406 | } 407 | article.smaller q::before, 408 | article.smaller q::after { 409 | font-size: 60px; 410 | } 411 | .build > * { 412 | -webkit-transition: opacity 0.2s ease-in-out 0.2s; 413 | transition: opacity 0.2s ease-in-out 0.2s; 414 | } 415 | .to-build { 416 | opacity: 0; 417 | } 418 | pre .str, 419 | code .str { 420 | color: #39d905; 421 | } 422 | pre .kwd, 423 | code .kwd { 424 | color: #fd0; 425 | } 426 | pre .com, 427 | code .com { 428 | color: #08f; 429 | font-style: italic; 430 | } 431 | pre .typ, 432 | code .typ { 433 | color: #08f; 434 | } 435 | pre .lit, 436 | code .lit { 437 | color: #08f; 438 | } 439 | pre .pun, 440 | code .pun { 441 | color: #ff9d00; 442 | } 443 | pre .pln, 444 | code .pln { 445 | color: #fff; 446 | } 447 | pre .tag, 448 | code .tag { 449 | color: #89bdff; 450 | } 451 | pre .atn, 452 | code .atn { 453 | color: #bdb76b; 454 | } 455 | pre .atv, 456 | code .atv { 457 | color: #65b042; 458 | } 459 | pre .dec, 460 | code .dec { 461 | color: #3387cc; 462 | } 463 | pre.prettyprint, 464 | code.prettyprint { 465 | background-color: #193549; 466 | border-radius: 2px; 467 | border: 0; 468 | font-size: 55px; 469 | line-height: 1.7; 470 | text-align: left; 471 | } 472 | code { 473 | background: none; 474 | font-family: 'Operator Mono', monospace; 475 | font-weight: 400; 476 | } 477 | pre.prettyprint { 478 | width: 95%; 479 | margin: 1em auto; 480 | padding: 10px; 481 | white-space: pre-wrap; 482 | border: 3px solid #1f4662; 483 | } 484 | ol.linenums { 485 | margin-top: 0; 486 | margin-bottom: 0; 487 | color: #aeaeae; 488 | } 489 | li.L0, 490 | li.L1, 491 | li.L2, 492 | li.L3, 493 | li.L5, 494 | li.L6, 495 | li.L7, 496 | li.L8 { 497 | list-style-type: none; 498 | } 499 | @media print { 500 | pre .str, 501 | code .str { 502 | color: #060; 503 | } 504 | pre .kwd, 505 | code .kwd { 506 | color: #006; 507 | font-weight: bold; 508 | } 509 | pre .com, 510 | code .com { 511 | color: #600; 512 | font-style: italic; 513 | } 514 | pre .typ, 515 | code .typ { 516 | color: #404; 517 | font-weight: bold; 518 | } 519 | pre .lit, 520 | code .lit { 521 | color: #044; 522 | } 523 | pre .pun, 524 | code .pun { 525 | color: #440; 526 | } 527 | pre .pln, 528 | code .pln { 529 | color: #000; 530 | } 531 | pre .tag, 532 | code .tag { 533 | color: #006; 534 | font-weight: bold; 535 | } 536 | pre .atn, 537 | code .atn { 538 | color: #404; 539 | } 540 | pre .atv, 541 | code .atv { 542 | color: #060; 543 | } 544 | } 545 | html { 546 | -webkit-box-sizing: border-box; 547 | box-sizing: border-box; 548 | } 549 | *, 550 | *:before, 551 | *:after { 552 | -webkit-box-sizing: inherit; 553 | box-sizing: inherit; 554 | } 555 | body { 556 | overflow: hidden; 557 | } 558 | .slides > article { 559 | padding: 50px; 560 | } 561 | .slides > article:before { 562 | content: ''; 563 | display: block; 564 | width: 100%; 565 | height: 100%; 566 | position: absolute; 567 | background: url("images/3.jpg"); 568 | background-size: cover; 569 | top: 0; 570 | left: 0; 571 | z-index: -2; 572 | } 573 | .slides > article:after { 574 | z-index: -1; 575 | content: ''; 576 | display: block; 577 | width: 100%; 578 | height: 100%; 579 | position: absolute; 580 | top: 0; 581 | left: 0; 582 | opacity: 0.8; 583 | background-image: linear-gradient(246deg, #2e0067 0%, #400090 100%); 584 | } 585 | .slides > article.plain:before, 586 | .slides > article.plain:after { 587 | display: none; 588 | } 589 | .slides > article.section:after { 590 | background-image: linear-gradient(237deg, #fd0 0%, #ffe01a 100%); 591 | } 592 | .slides > article.section h1, 593 | .slides > article.section h2, 594 | .slides > article.section h3, 595 | .slides > article.section h4, 596 | .slides > article.section h5, 597 | .slides > article.section h6 { 598 | -webkit-filter: none; 599 | filter: none; 600 | } 601 | .slides > article.section .sub { 602 | color: #000; 603 | } 604 | .slides > article.old-tools:before { 605 | background-image: url("images/soldering.jpg") !important; 606 | background-size: contain; 607 | } 608 | .slides > article.old-tools:after { 609 | opacity: 0.1; 610 | } 611 | .slides > article:nth-child(39n+1):before { 612 | background-image: url("images/25.jpg"); 613 | } 614 | .slides > article:nth-child(39n+2):before { 615 | background-image: url("images/11.jpg"); 616 | } 617 | .slides > article:nth-child(39n+3):before { 618 | background-image: url("images/31.jpg"); 619 | } 620 | .slides > article:nth-child(39n+4):before { 621 | background-image: url("images/17.jpg"); 622 | } 623 | .slides > article:nth-child(39n+5):before { 624 | background-image: url("images/24.jpg"); 625 | } 626 | .slides > article:nth-child(39n+6):before { 627 | background-image: url("images/16.jpg"); 628 | } 629 | .slides > article:nth-child(39n+7):before { 630 | background-image: url("images/1.jpg"); 631 | } 632 | .slides > article:nth-child(39n+8):before { 633 | background-image: url("images/29.jpg"); 634 | } 635 | .slides > article:nth-child(39n+9):before { 636 | background-image: url("images/7.jpg"); 637 | } 638 | .slides > article:nth-child(39n+10):before { 639 | background-image: url("images/31.jpg"); 640 | } 641 | .slides > article:nth-child(39n+11):before { 642 | background-image: url("images/16.jpg"); 643 | } 644 | .slides > article:nth-child(39n+12):before { 645 | background-image: url("images/17.jpg"); 646 | } 647 | .slides > article:nth-child(39n+13):before { 648 | background-image: url("images/20.jpg"); 649 | } 650 | .slides > article:nth-child(39n+14):before { 651 | background-image: url("images/14.jpg"); 652 | } 653 | .slides > article:nth-child(39n+15):before { 654 | background-image: url("images/21.jpg"); 655 | } 656 | .slides > article:nth-child(39n+16):before { 657 | background-image: url("images/2.jpg"); 658 | } 659 | .slides > article:nth-child(39n+17):before { 660 | background-image: url("images/19.jpg"); 661 | } 662 | .slides > article:nth-child(39n+18):before { 663 | background-image: url("images/28.jpg"); 664 | } 665 | .slides > article:nth-child(39n+19):before { 666 | background-image: url("images/20.jpg"); 667 | } 668 | .slides > article:nth-child(39n+20):before { 669 | background-image: url("images/10.jpg"); 670 | } 671 | .slides > article:nth-child(39n+21):before { 672 | background-image: url("images/25.jpg"); 673 | } 674 | .slides > article:nth-child(39n+22):before { 675 | background-image: url("images/6.jpg"); 676 | } 677 | .slides > article:nth-child(39n+23):before { 678 | background-image: url("images/17.jpg"); 679 | } 680 | .slides > article:nth-child(39n+24):before { 681 | background-image: url("images/30.jpg"); 682 | } 683 | .slides > article:nth-child(39n+25):before { 684 | background-image: url("images/3.jpg"); 685 | } 686 | .slides > article:nth-child(39n+26):before { 687 | background-image: url("images/22.jpg"); 688 | } 689 | .slides > article:nth-child(39n+27):before { 690 | background-image: url("images/7.jpg"); 691 | } 692 | .slides > article:nth-child(39n+28):before { 693 | background-image: url("images/29.jpg"); 694 | } 695 | .slides > article:nth-child(39n+29):before { 696 | background-image: url("images/20.jpg"); 697 | } 698 | .slides > article:nth-child(39n+30):before { 699 | background-image: url("images/12.jpg"); 700 | } 701 | .slides > article:nth-child(39n+31):before { 702 | background-image: url("images/28.jpg"); 703 | } 704 | .slides > article:nth-child(39n+32):before { 705 | background-image: url("images/25.jpg"); 706 | } 707 | .slides > article:nth-child(39n+33):before { 708 | background-image: url("images/25.jpg"); 709 | } 710 | .slides > article:nth-child(39n+34):before { 711 | background-image: url("images/12.jpg"); 712 | } 713 | .slides > article:nth-child(39n+35):before { 714 | background-image: url("images/28.jpg"); 715 | } 716 | .slides > article:nth-child(39n+36):before { 717 | background-image: url("images/19.jpg"); 718 | } 719 | .slides > article:nth-child(39n+37):before { 720 | background-image: url("images/7.jpg"); 721 | } 722 | .slides > article:nth-child(39n+38):before { 723 | background-image: url("images/12.jpg"); 724 | } 725 | .slides > article:nth-child(39n+39):before { 726 | background-image: url("images/19.jpg"); 727 | } 728 | h1, 729 | h2, 730 | h3, 731 | h4, 732 | h5, 733 | h6 { 734 | color: #fff; 735 | font-family: "pure", "Bavro", sans-serif; 736 | font-weight: 700; 737 | line-height: 0.8; 738 | letter-spacing: 0; 739 | line-height: auto; 740 | text-shadow: 10px 10px 0 rgba(255,255,255,0.01); 741 | margin: -50px 0 15px 0; 742 | will-change: filter; 743 | } 744 | .firefox h1, 745 | .firefox h2, 746 | .firefox h3, 747 | .firefox h4, 748 | .firefox h5, 749 | .firefox h6 { 750 | -webkit-filter: invert(100%); 751 | filter: invert(100%); 752 | text-shadow: 10px 10px 0 rgba(255,255,255,0.2); 753 | } 754 | p, 755 | a, 756 | li { 757 | text-shadow: 4px 3px 0 rgba(0,0,0,0.3); 758 | margin: 15px 0; 759 | font-family: 'bavro'; 760 | } 761 | p, 762 | li, 763 | small { 764 | color: #fff; 765 | font-size: 90px; 766 | } 767 | .sub { 768 | font-family: 'bavro'; 769 | -webkit-transform: skew(0, -8deg); 770 | transform: skew(0, -8deg); 771 | margin-top: 100px; 772 | font-weight: 100; 773 | color: #fd0; 774 | font-size: 60px; 775 | } 776 | h2 + .sub { 777 | -webkit-transform: none; 778 | transform: none; 779 | } 780 | small { 781 | font-size: 25px; 782 | } 783 | h1 { 784 | -webkit-transform: skew(0, -8deg); 785 | transform: skew(0, -8deg); 786 | font-size: 300px; 787 | letter-spacing: -2px; 788 | } 789 | h1 a { 790 | text-decoration: none; 791 | font-size: 20px; 792 | color: #000; 793 | padding-left: 10px; 794 | } 795 | ul { 796 | text-align: left; 797 | margin-left: 100px; 798 | } 799 | h2 { 800 | font-size: 200px; 801 | line-height: 1; 802 | margin: 0; 803 | } 804 | h2 a { 805 | color: #00f; 806 | } 807 | h2 + img { 808 | margin-top: 20px !important; 809 | } 810 | .large { 811 | font-size: 200px; 812 | } 813 | .big { 814 | font-size: 250px; 815 | } 816 | .huge { 817 | font-size: 450px; 818 | } 819 | h3 { 820 | font-size: 70px; 821 | color: #fd0; 822 | line-height: 1.5; 823 | } 824 | h4 { 825 | color: #fd0; 826 | font-size: 50px; 827 | } 828 | .halves { 829 | width: 100%; 830 | } 831 | .half { 832 | width: 50%; 833 | } 834 | img.wide { 835 | width: 100%; 836 | height: auto; 837 | max-height: none; 838 | } 839 | img.high { 840 | width: auto; 841 | height: 100%; 842 | max-height: 1200px; 843 | } 844 | video.high { 845 | width: auto; 846 | height: 100%; 847 | min-width: 0; 848 | } 849 | .hl { 850 | color: #fd0; 851 | } 852 | article.treats h1 { 853 | margin-bottom: 90px; 854 | font-size: 250px; 855 | } 856 | .flex { 857 | display: -webkit-box !important; 858 | display: -ms-flexbox !important; 859 | display: flex !important; 860 | } 861 | .flex > * { 862 | -webkit-box-flex: 1; 863 | -ms-flex: 1; 864 | flex: 1; 865 | } 866 | .flex > *:before { 867 | content: ''; 868 | } 869 | .emoji { 870 | font-size: 116px; 871 | font-family: serif; 872 | } 873 | body.square .slides > article { 874 | width: 1920px; 875 | height: 1080px; 876 | margin-left: -960px; 877 | margin-top: -540px; 878 | border-radius: 0; 879 | } 880 | body.square .slides > article h2 { 881 | font-size: 110px; 882 | } 883 | body.square .slides > article p, 884 | body.square .slides > article li, 885 | body.square .slides > article small { 886 | font-size: 30px; 887 | } 888 | body.square .slides > article .big { 889 | font-size: 180px; 890 | } 891 | body.square .slides > article .large { 892 | font-size: 140px; 893 | } 894 | body.square .slides > article .huge { 895 | font-size: 220px; 896 | } 897 | @font-face { 898 | font-family: 'bavro'; 899 | src: url("./fonts/bavro-regular-webfont.eot"); 900 | src: url("./fonts/bavro-regular-webfont.eot?#iefix") format('embedded-opentype'), url("./fonts/bavro-regular-webfont.woff2") format('woff2'), url("./fonts/bavro-regular-webfont.woff") format('woff'), url("./fonts/bavro-regular-webfont.ttf") format('truetype'), url("./fonts/bavro-regular-webfont.svg#bavroregular") format('svg'); 901 | font-weight: normal; 902 | font-style: normal; 903 | } 904 | @font-face { 905 | font-family: "pure"; 906 | /* reference name */ 907 | src: url("./fonts/PureHeartSVG-Regular.otf"); 908 | font-weight: 400; 909 | /* or whatever applies */ 910 | font-style: normal; 911 | /* or whatever applies */ 912 | text-rendering: optimizeLegibility; 913 | /* maybe */ 914 | } 915 | body::after { 916 | position: absolute; 917 | width: 1px; 918 | height: 1px; 919 | overflow: hidden; 920 | z-index: -1; 921 | content: url("./images/1.jpg") url("./images/2.jpg") url("./images/3.jpg") url("./images/4.jpg") url("./images/5.jpg") url("./images/6.jpg") url("./images/7.jpg") url("./images/8.jpg") url("./images/9.jpg") url("./images/10.jpg") url("./images/11.jpg") url("./images/12.jpg") url("./images/13.jpg") url("./images/14.jpg") url("./images/15.jpg") url("./images/16.jpg") url("./images/17.jpg") url("./images/18.jpg") url("./images/19.jpg") url("./images/20.jpg") url("./images/21.jpg") url("./images/22.jpg") url("./images/23.jpg") url("./images/24.jpg") url("./images/25.jpg") url("./images/26.jpg") url("./images/27.jpg") url("./images/28.jpg") url("./images/29.jpg") url("./images/30.jpg") url("./images/31.jpg"); 922 | } 923 | -------------------------------------------------------------------------------- /styles.styl: -------------------------------------------------------------------------------- 1 | @import "_deps" 2 | @import "_code" 3 | 4 | yellow = #FFDD00 5 | orange = #FF9D00 6 | 7 | html { 8 | box-sizing: border-box; 9 | } 10 | 11 | *, *:before, *:after { 12 | box-sizing: inherit; 13 | } 14 | 15 | body 16 | overflow hidden 17 | 18 | // Mixin 19 | random(min,max) 20 | return floor(math(0, 'random')*(max - min + 1) + min) 21 | 22 | purple = #2E0067 23 | 24 | 25 | .slides > article 26 | padding 50px 27 | &:before 28 | content '' 29 | display block 30 | width 100% 31 | height 100% 32 | position absolute 33 | // filter grayscale(100%) contrast(160%) 34 | background:url(images/3.jpg); // blacksmith 35 | background-size cover 36 | top 0 37 | left 0 38 | z-index -2 39 | &:after 40 | z-index -1 41 | content '' 42 | display block 43 | width 100% 44 | height 100% 45 | position absolute 46 | top 0 47 | left 0 48 | opacity 0.8 49 | background-image linear-gradient(random(0,360)deg, purple 0%, lighten(purple,10%) 100%); 50 | &.plain 51 | &:before, &:after 52 | display none 53 | &.section 54 | &:after 55 | background-image linear-gradient(random(0,360)deg, yellow 0%, lighten(yellow,10%) 100%); 56 | h1,h2,h3,h4,h5,h6 57 | filter none 58 | .sub 59 | color black 60 | 61 | .slides > article.old-tools 62 | &:before 63 | background-image url("images/soldering.jpg") !important 64 | background-size contain 65 | &:after 66 | opacity 0.1 67 | 68 | 69 | randomColor() 70 | return rgb(random(0,255),random(0,255),random(0,255)) 71 | 72 | combos = (#825854 #3de7e4) (#29519e #94eced) (#e26ab5 #1e4823) (#11feec #FF00E0) (#006C8D #006C8D) (#3a5c8e #eb821b) (#ca5723 #7d5794) (#6aa4e1 #ae5ceb) (#226443 #5e9ccd) (#6d6528 #3768f7) (#2decf5 #52aeea) (#d07dd7 #e1e34a) (#3456fd #14e839) (#f8078c #17156b) 73 | 74 | randomGradient() 75 | n = random(1,13) 76 | combo = combos[n] 77 | return combo 78 | 79 | 80 | 81 | for num in 1...40 82 | path = "images/"+ random(1,31)+".jpg" 83 | combo = randomGradient(); 84 | .slides > article:nth-child(39n+{num}) 85 | &:before 86 | background-image url(path) 87 | // background-image linear-gradient(random(0,360)deg, rando 0%, lighten(rando,10%) 100%); 88 | 89 | // .slides > article:nth-child(1n):after 90 | // background-image: linear-gradient(-173deg, #007EFF 0%, #6DD7BA 51%); 91 | 92 | h1,h2,h3,h4,h5,h6 93 | color white 94 | font-family: "pure", "Bavro", sans-serif; 95 | font-weight 700 96 | line-height: 0.8 97 | letter-spacing 0 98 | line-height auto 99 | text-shadow 10px 10px 0 alpha(white, 0.01) 100 | margin -50px 0 15px 0 101 | will-change: filter; 102 | 103 | .firefox 104 | h1,h2,h3,h4,h5,h6 105 | filter: invert(100%); 106 | text-shadow 10px 10px 0 alpha(white, 0.2) 107 | 108 | 109 | p, a, li 110 | text-shadow 4px 3px 0 rgba(0,0,0,0.3) 111 | margin 15px 0 112 | font-family 'bavro' 113 | 114 | p, li, small 115 | color white 116 | font-size 90px 117 | 118 | .sub 119 | font-family 'bavro' 120 | transform skew(0, -8deg) 121 | margin-top 100px 122 | font-weight 100 123 | color yellow 124 | font-size 60px 125 | 126 | h2 + .sub 127 | transform none 128 | 129 | 130 | small 131 | font-size 25px 132 | 133 | h1 134 | transform skew(0, -8deg) 135 | font-size 300px 136 | // color yellow 137 | letter-spacing -2px 138 | a 139 | text-decoration none 140 | font-size 20px 141 | color black 142 | padding-left 10px 143 | 144 | ul { 145 | text-align: left; 146 | margin-left: 100px; 147 | } 148 | 149 | h2 150 | font-size 200px 151 | // color yellow 152 | line-height 1 153 | margin 0 154 | a 155 | color blue 156 | 157 | h2 + img 158 | margin-top 20px !important 159 | 160 | 161 | .large 162 | font-size 200px 163 | 164 | .big 165 | font-size 250px 166 | 167 | .huge 168 | font-size 450px 169 | 170 | h3 171 | font-size 70px 172 | color yellow 173 | line-height 1.5 174 | 175 | h4 176 | color yellow 177 | font-size 50px 178 | 179 | .halves 180 | width 100% 181 | 182 | .half 183 | width 50% 184 | 185 | 186 | img.wide 187 | width 100% 188 | height auto 189 | max-height none 190 | 191 | img.high 192 | width auto 193 | height 100% 194 | max-height 1200px 195 | 196 | video.high 197 | width: auto; 198 | height: 100%; 199 | min-width: 0; 200 | 201 | .hl 202 | color yellow 203 | 204 | article.treats 205 | h1 206 | margin-bottom 90px 207 | font-size 250px 208 | // color orange 209 | 210 | 211 | .flex 212 | display flex !important 213 | & > * 214 | flex 1 215 | &:before 216 | content '' 217 | 218 | 219 | .emoji 220 | font-size 116px 221 | font-family serif 222 | 223 | 224 | // Smaller Screens 225 | body.square 226 | .slides 227 | & > article 228 | w = 1920 229 | h = 1080 230 | width w px 231 | height h px 232 | margin-left (w/2) * -1px 233 | margin-top (h/2) * -1px 234 | border-radius 0 235 | h2 236 | font-size 110px 237 | p, li, small 238 | font-size 30px 239 | .big 240 | font-size 180px 241 | .large 242 | font-size 140px 243 | .huge 244 | font-size 220px 245 | 246 | 247 | // Fonts! 248 | @font-face { 249 | font-family: 'bavro'; 250 | src: url('./fonts/bavro-regular-webfont.eot'); 251 | src: url('./fonts/bavro-regular-webfont.eot?#iefix') format('embedded-opentype'), 252 | url('./fonts/bavro-regular-webfont.woff2') format('woff2'), 253 | url('./fonts/bavro-regular-webfont.woff') format('woff'), 254 | url('./fonts/bavro-regular-webfont.ttf') format('truetype'), 255 | url('./fonts/bavro-regular-webfont.svg#bavroregular') format('svg'); 256 | font-weight: normal; 257 | font-style: normal; 258 | } 259 | 260 | @font-face { 261 | font-family: "pure"; 262 | /* reference name */ 263 | src: url('./fonts/PureHeartSVG-Regular.otf'); 264 | font-weight: 400; 265 | /* or whatever applies */ 266 | font-style: normal; 267 | /* or whatever applies */ 268 | text-rendering: optimizeLegibility; 269 | /* maybe */ 270 | } 271 | 272 | body::after 273 | position:absolute; 274 | width:1px; 275 | height:1px; 276 | overflow:hidden; 277 | z-index:-1; 278 | content: url(./images/1.jpg) url(./images/2.jpg) url(./images/3.jpg) url(./images/4.jpg) url(./images/5.jpg) url(./images/6.jpg) url(./images/7.jpg) url(./images/8.jpg) url(./images/9.jpg) url(./images/10.jpg) url(./images/11.jpg) url(./images/12.jpg) url(./images/13.jpg) url(./images/14.jpg) url(./images/15.jpg) url(./images/16.jpg) url(./images/17.jpg) url(./images/18.jpg) url(./images/19.jpg) url(./images/20.jpg) url(./images/21.jpg) url(./images/22.jpg) url(./images/23.jpg) url(./images/24.jpg) url(./images/25.jpg) url(./images/26.jpg) url(./images/27.jpg) url(./images/28.jpg) url(./images/29.jpg) url(./images/30.jpg) url(./images/31.jpg) --------------------------------------------------------------------------------