PageRenderTime 52ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/www/index.html

https://github.com/corleroux/frontend-dev-baseline
HTML | 938 lines | 678 code | 241 blank | 19 comment | 0 complexity | e54ede932e67012ed067a60611953dc0 MD5 | raw file
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>The New Baseline for Front-End Developers</title>
  6. <meta name="description" content="">
  7. <meta name="author" content="Rebecca Murphey">
  8. <meta name="apple-mobile-web-app-capable" content="yes" />
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  10. <link href='http://fonts.googleapis.com/css?family=Signika:400,600,700,300' rel='stylesheet' type='text/css'>
  11. <link rel="stylesheet" href="css/reset.css">
  12. <link rel="stylesheet" href="lib/reveal/reveal.css">
  13. <link rel="stylesheet" href="css/print.css" type="text/css" media="print">
  14. <link rel="stylesheet" href="lib/highlight/styles/solarized_light.css">
  15. <link rel="stylesheet" href="css/rm.css">
  16. <!-- fwiw: i'm not in love with client-side prefix fixing,
  17. but i'm doing it here for the sake of worrying about other things.
  18. thanks to lea verou for making this available. -->
  19. <script src="js/prefixfree.js"></script>
  20. </head>
  21. <body>
  22. <div id="reveal" class="reveal">
  23. <!-- Used to fade in a background when a specific slide state is reached -->
  24. <div class="state-background"></div>
  25. <!-- Any section element inside of this container is displayed as a slide -->
  26. <div class="slides">
  27. <!-- intro -->
  28. <section>
  29. <section data-markdown class="title-slide">
  30. <img src="img/line-in-the-sand.jpg" alt="" width="500">
  31. # A New Baseline <br/>for Front-End Developers
  32. Rebecca Murphey&nbsp;&nbsp;&nbsp;&nbsp;TXJS&nbsp;&nbsp;&nbsp;&nbsp;June 2012
  33. </section>
  34. <section class="centered oneliner" data-markdown>
  35. <p><img src="img/bocoup.png" class="clean" alt="Bocoup" height="300"></p>
  36. [@rmurphey](http://twitter.com/rmurphey)&nbsp;&nbsp;☆&nbsp;&nbsp;[rmurphey.com](http://rmurphey.com)&nbsp;&nbsp;☆&nbsp;&nbsp;[bocoup.com](http://bocoup.com)
  37. </section>
  38. <section class="centered" data-markdown>
  39. <iframe src="http://rmurphey.com/blog/2012/04/12/a-baseline-for-front-end-developers/" width="960" height="700"></iframe>
  40. <aside class="notes">
  41. want to talk about a post i wrote a while back about a new baseline for front-end devs
  42. about how the demands on front-end devs have changed over the years.
  43. this post inspired an odd amount of controversy
  44. but i think in a year or two, people who dont know these things wont be able to keep calling themselves FEDs
  45. </aside>
  46. </section>
  47. <section class="centered" data-markdown>
  48. <img src="img/lynx.png" class="clean" alt="Lynx" width="800">
  49. <aside class="notes">
  50. my career doing web development -- before it was interrupted for a few years so i could work at newspapers -- began when the web looked like this ...
  51. we used simple tools then -- basically, a text editor
  52. </aside>
  53. </section>
  54. <section class="centered" data-markdown>
  55. <img src="img/yahoo.png" class="clean" alt="Yahoo!" width="600">
  56. <aside class="notes">
  57. soon, the web had advanced to look like this ...
  58. </aside>
  59. </section>
  60. <section data-markdown>
  61. <iframe style="background-color: white" src="http://www.andybudd.com/archives/2004/05/an_objective_look_at_table_based_vs_css_based_design/" width="960" height="600"></iframe>
  62. [An Objective Look at Table-Based vs CSS-Based Design](http://www.andybudd.com/archives/2004/05/an_objective_look_at_table_based_vs_css_based_design/)
  63. <aside class="notes">
  64. and within a few years, we were fighting over exciting things like tables for layout.
  65. these disagreements were a sign that front-end dev was going to be a serious pursuit ...
  66. </aside>
  67. </section>
  68. <section class="centered" data-markdown>
  69. <img src="img/gmail.png" class="clean" alt="Google Gmail" width="600" style="display: block; position: absolute; top: 0; left: 0; z-index: 1">
  70. <img src="img/gmaps.png" class="clean" alt="Google Maps" width="500" style="display: block; position: absolute; top: 150px; left: 400px; z-index: 1">
  71. <aside class="notes">
  72. around the same time, 2004, tools like gmail and google maps started to make clear that JavaScript was going to be a serious thing, too
  73. </aside>
  74. </section>
  75. <section class="centered">
  76. <iframe src="http://www.adaptivepath.com/ideas/ajax-new-approach-web-applications" width="960" height="600"></iframe>
  77. <aside class="notes">
  78. In 2005, we got a name for these technologies that were letting us move more and more of our development energy to the browser.
  79. </aside>
  80. </section>
  81. <section class="centered" data-markdown>
  82. <img src="img/jquery.jpg" class="clean" alt="jQuery Logo" width="500" style="margin-top: 150px">
  83. <aside class="notes">
  84. in 2006, jquery came along
  85. it made the scary world of JS a whole lot less scary
  86. also a whole lot more accessible to people w/o traditional dev backgrounds
  87. </aside>
  88. </section>
  89. <section class="centered" data-markdown>
  90. <img src="img/etherpad.jpg" class="clean" alt="Etherpad" width="800">
  91. <aside class="notes">
  92. meanwhile, apps got even more complex, and less website-y
  93. </aside>
  94. </section>
  95. <section class="centered" data-markdown>
  96. <img src="img/facebook.png" class="clean" alt="Facebook" width="800">
  97. <aside class="notes">
  98. today, immersive web-based experiences exist in the browser, powered largely by front-end technologies
  99. </aside>
  100. </section>
  101. <section class="centered" data-markdown>
  102. <img src="img/yahoo.png" class="clean" alt="Yahoo!" width="600">
  103. <aside class="notes">
  104. if we think of the skills that we used to build stuff like this ...
  105. </aside>
  106. </section>
  107. <section class="centered oneliner" data-markdown>
  108. <img src="img/birdhouse.jpg" class="clean" alt="Birdhouse">
  109. <aside class="notes">
  110. as similar to the skills wed use to build something like this ...
  111. </aside>
  112. </section>
  113. <section class="centered" data-markdown>
  114. <img src="img/facebook.png" class="clean" alt="Facebook" width="800">
  115. <aside class="notes">
  116. then the skills wed use to build something like this ...
  117. </aside>
  118. </section>
  119. <section class="centered" data-markdown>
  120. <img src="img/skyscraper.jpg" class="clean" alt="Skyscraper" height="700">
  121. <aside class="notes">
  122. are akin to the skills wed use to build this.
  123. </aside>
  124. </section>
  125. <section class="centered oneliner" data-markdown>
  126. Our emphasis shifts from <em>trivia</em> to <em>tools</em>
  127. as we are required to automate, streamline,
  128. and bullet-proof our processes.
  129. <aside class="notes">
  130. its (past) time for front end devs to become better versed in the practices of software dev.
  131. were building skyscrapers.
  132. this talk is less about teaching new things, and more about teaching you what to learn.
  133. if you already know all this, you should probably be getting paid more.
  134. if you dont know all this, learn it, and you will get paid more.
  135. </aside>
  136. </section>
  137. <section class="centered" data-markdown>
  138. ![angry mob](img/angry_mob.png)
  139. <aside class="notes">
  140. disclaimer: these are the specific tools *i* like. you dont need to use them.
  141. </aside>
  142. </section>
  143. </section>
  144. <!-- javascript -->
  145. <section>
  146. <section data-markdown>
  147. # javascript
  148. ## you already know
  149. jQuery, underscore, basic JavaScript
  150. ## you should know
  151. jQuery-less JavaScript, prototypal inheritance,
  152. closures & function scope, MV* basics
  153. </section>
  154. <section data-markdown>
  155. <p class="centered"><img src="img/js-assessment.png" width="800" class="clean"></p>
  156. </section>
  157. <section data-markdown>
  158. <pre>
  159. <code class="javascript">
  160. it("you should be able to determine the location of an item in an array", function() {
  161. expect(answers.indexOf(a, 3)).to.be(2);
  162. });
  163. it("you should be able to add the values of an array", function() {
  164. expect(answers.sum(a)).to.be(10);
  165. });
  166. it("you should be able to remove an item from an array", function() {
  167. var result = answers.remove(a, 2);
  168. expect(result).to.have.length(3);
  169. expect(result.join(' ')).to.be('1 3 4');
  170. });
  171. it("you should be able to add an item to the end of an array", function() {
  172. var result = answers.append(a, 10);
  173. expect(result).to.have.length(5);
  174. expect(result[result.length - 1]).to.be(10);
  175. });
  176. </code>
  177. </pre>
  178. </section>
  179. <section class="centered">
  180. <a href="http://eloquentjavascript.net"><img src="img/ejs.png" width="200" class="book book-1 clean"></a>
  181. <a href="http://shop.oreilly.com/product/9780596517748.do?sortby=bestSellers"><img src="img/javascript-the-good-parts.jpg" width="200" class="book book-2 clean"></a>
  182. <a href="http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate"><img src="img/javascript-patterns.jpg" width="200" class="book book-3 clean"></a>
  183. <a href="http://shop.oreilly.com/product/0636920025245.do?sortby=publicationDate"><img src="img/maintainable-javascript.jpg" width="200" class="book book-4 clean"></a>
  184. <aside class="notes" data-markdown>
  185. Left to right, these are short books very much worth reading. JS Patterns
  186. especially was transformative for me and helped me "level up" my JavaScript
  187. (and gave me names for patterns I didn't know had names).
  188. </aside>
  189. </section>
  190. </section>
  191. <!-- git & github -->
  192. <section>
  193. <section data-markdown>
  194. # git & github
  195. ## you already know
  196. creating a new repo, cloning a repo, branching and merging locally
  197. ## you should know
  198. collaboration workflow, pull requests, code reviews
  199. <aside class="notes">
  200. Most open-source projects of interest to front-end devs make their home
  201. on Github.
  202. If you want to participate, if you want to understand how something came
  203. to be the way it is, if you want to contribute or just see the sausage
  204. being made, you need to know your way around.
  205. Of course, more internal projects are using Github too -- it turns out it's
  206. a great way to collaborate on software.
  207. </aside>
  208. </section>
  209. <section class="centered" data-markdown>
  210. <img src="img/git-workflow.png" height="600" alt="git workflow" class="clean">
  211. <aside class="notes">
  212. Understand the git branching model and understand how a particular project
  213. approaches branching.
  214. I remember the first time I saw this diagram and I was pretty puzzled, but
  215. learning to use development or "feature" branches is pretty key to getting the
  216. most out of git -- and to contributing to open-source projects.
  217. </aside>
  218. </section>
  219. <section>
  220. <img src="img/tower.png" height="600" alt="Tower" class="clean">
  221. <aside class="notes">
  222. If you need training wheels, apps like Tower or Github for Mac are great, but
  223. </aside>
  224. </section>
  225. </section>
  226. <!-- modularity & builds -->
  227. <section>
  228. <section data-markdown>
  229. # modularity & builds
  230. ## you already know
  231. to keep scripts out of your `head`
  232. to limit the number of http requests
  233. to reduce http overhead via minification
  234. ## you should know
  235. AMD, RequireJS/Almond, UglifyJS, Closure Compiler
  236. </section>
  237. <section>
  238. <iframe src="http://requirejs.org" width="960" height="700"></iframe>
  239. <aside class="notes">
  240. RequireJS lets you write modular code and then build it for production.
  241. Module loading in dev happens async, so it doesn't slow you down.
  242. In prod, use built files, but continue to load pieces async
  243. if you'd like.
  244. </aside>
  245. </section>
  246. <section data-markdown>
  247. <pre>
  248. <code class="javascript">
  249. define([ 'jquery', 'underscore' ], function($, _) {
  250. return {
  251. placeAt : function(data, templateString, node) {
  252. $(node).html(_.template(templateString, data));
  253. }
  254. };
  255. });
  256. </code>
  257. </pre>
  258. A module using AMD; specify dependencies, return an object
  259. <aside class="notes">
  260. Dependency management is taken care of for you, too
  261. </aside>
  262. </section>
  263. <section data-markdown>
  264. <pre>
  265. <code class="javascript">
  266. require.config({
  267. deps: ["main"],
  268. paths: {
  269. // JavaScript folders
  270. libs: "../assets/js/libs",
  271. plugins: "../assets/js/plugins",
  272. // Libraries
  273. jquery: "../assets/js/libs/jquery",
  274. lodash: "../assets/js/libs/lodash",
  275. backbone: "../assets/js/libs/backbone"
  276. },
  277. shim: {
  278. backbone: {
  279. deps: [ "lodash", "jquery" ],
  280. exports: "Backbone"
  281. }
  282. }
  283. });
  284. </code>
  285. </pre>
  286. The RequireJS config from [Backbone Boilerplate](https://github.com/tbranyen/backbone-boilerplate)
  287. <aside class="notes">
  288. Tell Require where to find dependencies, and "shim" libraries like
  289. Backbone and Underscore that don't support AMD out of the box.
  290. </aside>
  291. </section>
  292. <section class="oneliner centered" data-markdown>
  293. `r.js -o your.build.js`
  294. <aside class="notes">
  295. For production, run r.js and pass it your instructions.
  296. </aside>
  297. </section>
  298. <section data-markdown>
  299. ## before requirejs
  300. <p class="centered">
  301. <img src="img/unbuilt.png" width="800" class="clean">
  302. </p>
  303. <aside class="notes">
  304. You can keep your dev environment sane and modular with lots
  305. of small files that don't pollute the global namespace ...
  306. </aside>
  307. </section>
  308. <section data-markdown>
  309. ## after requirejs
  310. <p class="centered">
  311. <img src="img/built.png" width="800" class="clean">
  312. </p>
  313. <aside class="notes">
  314. ... and consolidate it all into a handful of requests for production
  315. </aside>
  316. </section>
  317. </section>
  318. <!-- dev tools -->
  319. <section>
  320. <section data-markdown>
  321. # dev tools
  322. ## you already know
  323. `console.log`, `console.dir`, editing CSS, the Network tab,
  324. Firebug or Chrome dev tools
  325. ## you should know
  326. breakpoints & step debugging, `$0`, timelines & profiles,
  327. other browsers
  328. </section>
  329. <section data-markdown>
  330. <div class="centered">
  331. <iframe width="960" height="480" src="http://www.youtube.com/embed/nOEw9iiopwI" frameborder="0" allowfullscreen></iframe>
  332. </div>
  333. [Chrome Developer Tools: 12 Tricks](http://www.youtube.com/embed/nOEw9iiopwI)
  334. <aside class="notes">
  335. Paul Irish has some *great* YouTube videos about getting the most
  336. out of Chrome dev tools.
  337. </aside>
  338. </section>
  339. <section data-markdown>
  340. <iframe width="960" height="600" src="https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints"></iframe>
  341. [Chrome Developer Tools Docs: Breakpoints](https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints)
  342. [Fixing These jQuery](http://fixingthesejquery.com)
  343. <aside class="notes">
  344. There are also great docs about using breakpoints.
  345. BTW, Fixing these jQuery from Adam Sontag -- if you haven't seen this, it is an amazing
  346. resource for improving your debugging skills (or helping someone
  347. improve theirs).
  348. </aside>
  349. </section>
  350. <section data-markdown>
  351. <iframe width="960" height="600" src="http://my.opera.com/dragonfly/blog/" frameborder="0" allowfullscreen></iframe>
  352. [Opera Dragonfly](http://my.opera.com/dragonfly/blog/)
  353. <aside class="notes">
  354. Chrome is the browser most devs are using for debugging these days,
  355. but Opera and other browsers still have great things to offer for
  356. specific needs -- Opera, for example, has some great color palette
  357. management stuff if you're designing in the browser.
  358. Which of course you are, right?
  359. </aside>
  360. </section>
  361. </section>
  362. <!-- command line -->
  363. <section>
  364. <section data-markdown>
  365. # command line
  366. ## you already know
  367. either the command line is amazing,
  368. or the command line is terrifying
  369. ## you should know
  370. ack, ssh, find, curl, git, npm;
  371. creating aliases for commonly used commands
  372. <aside class="notes">
  373. This is probably the rant-iest section of this talk. If we're to
  374. call ourselves developers, we can't be afraid of the command line,
  375. and yet ...
  376. </aside>
  377. </section>
  378. <section>
  379. <blockquote>Is it <em>unreasonable to ask for a GUI</em>
  380. so that whatever Im doing works like all
  381. the other programs I use all day?</blockquote>
  382. <cite>Dark_Prism on Reddit</cite>
  383. </section>
  384. <section class="oneliner">
  385. <h2>YES.</h2>
  386. </section>
  387. <section>
  388. <blockquote>Now you can berate me for not understanding
  389. the Terminal if you like, but Ill trade your rubygems
  390. for my under-colour removal and dot gain, any day
  391. of the week. <em>How hard should this be?</em></blockquote>
  392. <cite>Andy Clarke, author of Hardboiled Web Design</cite>
  393. </section>
  394. <section class="oneliner">
  395. <h2>ITS NOT HARD IF YOU TRY.</h2>
  396. </section>
  397. <section data-markdown class="centered">
  398. <a href="https://github.com/gf3/dotfiles/"><img src="img/dotfiles.png" width="960" class="clean"></a>
  399. <aside class="notes">
  400. Our friend Gianni Chiappetta -- gf3 -- has meticulously curated "dotfiles".
  401. Take a look and be tantalized by what you could be doing with the command line.
  402. </aside>
  403. </section>
  404. <section data-markdown>
  405. ## tools you can use
  406. - `ack`: Smarter-than-`grep` search for text within files in a directory
  407. - `find`: Locate files whose names match a pattern. Bonus points:
  408. use the files as the arguments to a `sed` command
  409. - `curl`: test the behavior of a data API
  410. - `npm` and `gem`: a universe of usefulness
  411. </section>
  412. </section>
  413. <!-- templates -->
  414. <section>
  415. <section data-markdown>
  416. # templates
  417. ## you already know
  418. to send data, not HTML, from the server;
  419. to build HTML as a string & insert it into the DOM all at once*
  420. ## you should know
  421. various templating libraries & tradeoffs,
  422. the RequireJS `text!` plugin
  423. <small>* This is less true in modern browsers!</small>
  424. </section>
  425. <section data-markdown>
  426. <iframe src="http://garann.github.com/template-chooser/" width="960" height="600"></iframe>
  427. [Garann Means Template Engine Chooser](http://garann.github.com/template-chooser/)
  428. </section>
  429. <section>
  430. <pre class="thin">
  431. <code class="javascript">
  432. define([
  433. 'views/base',
  434. <span class="code-highlight">'text!views/templates/searchForm.html'</span>
  435. ], function(View, tpl) {
  436. return View.extend({
  437. template : tpl,
  438. // ...
  439. });
  440. });
  441. </code>
  442. </pre>
  443. - [More about RequireJS and templates]()
  444. <aside class="notes">
  445. BTW, you can use Require to manage text dependencies, too
  446. </aside>
  447. </section>
  448. </section>
  449. <!-- css -->
  450. <section>
  451. <section data-markdown>
  452. # css
  453. ## you already know
  454. CSS doesn't have variables but it should;
  455. OOCSS helps a little; optimize everything else
  456. before you optimize CSS selector perf
  457. ## you should know
  458. SASS, Stylus, and/or LESS
  459. </section>
  460. <section data-markdown>
  461. <pre class="thin large">
  462. <code class="css">
  463. border-radius()
  464. -webkit-border-radius arguments
  465. -moz-border-radius arguments
  466. border-radius arguments
  467. body
  468. font 12px Helvetica, Arial, sans-serif
  469. a.button
  470. border-radius(5px)
  471. </code>
  472. </pre>
  473. [Stylus](http://learnboost.github.com/stylus/)
  474. </section>
  475. <section data-markdown>
  476. <pre class="thin large">
  477. <code class="css">
  478. $blue: #3bbfce;
  479. $margin: 16px;
  480. .content-navigation {
  481. border-color: $blue;
  482. color:
  483. darken($blue, 9%);
  484. }
  485. .border {
  486. padding: $margin / 2;
  487. margin: $margin / 2;
  488. border-color: $blue;
  489. }
  490. </code>
  491. </pre>
  492. [SASS](http://sass-lang.com/)
  493. </section>
  494. <section data-markdown>
  495. <iframe src="http://lesscss.org/" width="960" height="600"></iframe>
  496. <div class="oval-marker fragment">This is a lie</div>
  497. [LESS](http://lesscss.org/)
  498. </section>
  499. </section>
  500. <!-- testing -->
  501. <section>
  502. <section data-markdown>
  503. # testing
  504. ## you already know
  505. you should be testing your code,
  506. but itshard to know where to start
  507. ## you should know
  508. modularizing code makes testing easier;
  509. baby steps are better than no steps at all
  510. </section>
  511. <section data-markdown>
  512. <iframe src="http://visionmedia.github.com/mocha/" width="960" height="600" style="background-color:white"></iframe>
  513. [Mocha](http://visionmedia.github.com/mocha/)
  514. <aside class="notes">
  515. Mocha works well in a Node stack because it can be used for testing
  516. client and server code; browser runner is trivial to set up.
  517. In a Ruby stack, you might prefer Jasmine.
  518. Or you might prefer QUnit. I really don't care. TEST.
  519. </aside>
  520. </section>
  521. <section data-markdown>
  522. <iframe src="http://szafranek.net/works/articles/javascript-unit-testing/" width="960" height="600"></iframe>
  523. [Getting Started with JS Unit Testing](http://szafranek.net/works/articles/javascript-unit-testing/)
  524. </section>
  525. <section data-markdown class="oneliner">
  526. We *desperately* need more resources
  527. to teach people how to get started with testing.
  528. </section>
  529. </section>
  530. <!-- code quality -->
  531. <section>
  532. <section data-markdown>
  533. # code quality
  534. ## you already know
  535. subtle flaws in code can ruin your day
  536. ## you should know
  537. JSHint, pre-commit hooks, editor plugins
  538. </section>
  539. <section data-markdown>
  540. <iframe src="http://www.jshint.com/options/" width="960" height="600"></iframe>
  541. [JSHint](http://www.jshint.com/options/)
  542. </section>
  543. </section>
  544. <!-- automation -->
  545. <section>
  546. <section data-markdown>
  547. # automation
  548. ## you already know
  549. there are an awful lot of things that you do all the time
  550. ## you should know
  551. tools like grunt, rake, ant can simplify your life
  552. </section>
  553. <section data-markdown>
  554. <p class="centered">
  555. <img src="img/grunt.png" height="600" alt="Grunt" class="clean">
  556. </p>
  557. [Grunt](https://github.com/cowboy/grunt)
  558. <aside class="notes">
  559. Grunt comes with built-in tools for common tasks like minification, testing,
  560. RequireJS builds, and more.
  561. </aside>
  562. </section>
  563. <section data-markdown>
  564. </section>
  565. </section>
  566. <!-- docs -->
  567. <section>
  568. <section data-markdown>
  569. # docs
  570. ## you already know
  571. [w3schools.com](http://dai.ly/MB95Ww) is abhorrent
  572. ## you should know
  573. [MDN](https://developer.mozilla.org/en-US/), [dochub.io](http://dochub.io/); prefix all your JS searches 
with “mdn” (or&nbsp;!js on duckduckgo)
  574. </section>
  575. </section>
  576. <section>
  577. <section data-markdown class="centered">
  578. <blockquote>A good programmer is a lazy programmer; <br>
  579. only lazy programmers will want to write <br>
  580. the kind of tools that might replace them <br>
  581. in the end. But for a lazy programmer to be <br>
  582. a good programmer, he or she must be <br>
  583. <em>incredibly unlazy when it comes <br>
  584. to learning how to stay lazy.</em></blockquote>
  585. <cite>Paraphrased from Philipp Lenssen,[Why Good Programmers are Lazy and Dumb](http://blogoscoped.com/archive/2005-08-24-n14.html)”</cite>
  586. </section>
  587. </section>
  588. <section class="centered oneliner" data-markdown>
  589. <p><img src="img/bocoup.png" class="clean" alt="Bocoup" height="300"></p>
  590. [@rmurphey](http://twitter.com/rmurphey)&nbsp;&nbsp;☆&nbsp;&nbsp;[rmurphey.com](http://rmurphey.com)&nbsp;&nbsp;☆&nbsp;&nbsp;[bocoup.com](http://bocoup.com)
  591. [bit.ly/front-end-dev-baseline](http://bit.ly/front-end-dev-baseline)
  592. </section>
  593. </div>
  594. <!-- The navigational controls UI -->
  595. <aside class="controls">
  596. <a class="left" href="#">&#x25C4;</a>
  597. <a class="right" href="#">&#x25BA;</a>
  598. <a class="up" href="#">&#x25B2;</a>
  599. <a class="down" href="#">&#x25BC;</a>
  600. </aside>
  601. <!-- Displays presentation progress, max value changes via JS to reflect # of slides -->
  602. <div class="progress"><span></span></div>
  603. </div>
  604. <script src="lib/reveal/reveal.js"></script>
  605. <script src="lib/highlight/highlight.pack.js"></script>
  606. <script src="lib/classList.js"></script>
  607. <script src="socket.io/socket.io.js"></script>
  608. <script>
  609. var query = {};
  610. var socket = io.connect(window.location.origin);
  611. socket.on('navigate', function(data) {
  612. var dir = data.direction;
  613. if (!dir) { return; }
  614. var fn = 'navigate' + dir.charAt(0).toUpperCase() + dir.slice(1);
  615. if (Reveal[fn]) {
  616. Reveal[fn]();
  617. return;
  618. }
  619. switch (dir) {
  620. case 'home':
  621. Reveal.navigateTo(0);
  622. break;
  623. case 'end':
  624. Reveal.navigateTo(Number.MAX_VALUE);
  625. break;
  626. }
  627. });
  628. var handleCurrentSlide = function(slideElement, event) {
  629. if (query.socketless) { return; }
  630. var nextindexh;
  631. var nextindexv;
  632. if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') {
  633. nextindexh = event.indexh;
  634. nextindexv = event.indexv + 1;
  635. } else {
  636. nextindexh = event.indexh + 1;
  637. nextindexv = 0;
  638. }
  639. var notes = slideElement.querySelector('aside.notes');
  640. var slideData = {
  641. notes : notes ? notes.innerHTML : '',
  642. indexh : event.indexh,
  643. indexv : event.indexv,
  644. nextindexh : nextindexh,
  645. nextindexv : nextindexv
  646. };
  647. socket.emit('slidechanged', slideData);
  648. };
  649. location.search.replace( /[A-Z0-9]+?=(\w*)/gi, function(a) {
  650. query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
  651. } );
  652. // Fires each time a new slide is activated
  653. Reveal.addEventListener( 'slidechanged', function( event ) {
  654. handleCurrentSlide(event.currentSlide, event);
  655. } );
  656. Reveal.initialize({
  657. // Display controls in the bottom right corner
  658. controls: true,
  659. // Display a presentation progress bar
  660. progress: true,
  661. // If true; each slide will be pushed to the browser history
  662. history: true,
  663. // Loops the presentation, defaults to false
  664. loop: false,
  665. // Flags if mouse wheel navigation should be enabled
  666. mouseWheel: false,
  667. // Apply a 3D roll to links on hover
  668. rollingLinks: true,
  669. // UI style
  670. theme: query.theme || 'default', // default/neon
  671. // Transition style
  672. transition: query.transition || 'default' // default/cube/page/concave/linear(2d)
  673. });
  674. hljs.initHighlightingOnLoad();
  675. (function boom(){
  676. if (!window.Showdown){
  677. var scr = document.createElement('script');
  678. scr.onload = boom;
  679. scr.src = 'lib/showdown.js';
  680. document.body.appendChild(scr);
  681. return;
  682. }
  683. [].forEach.call( document.querySelectorAll('[data-markdown]'), function fn(elem){
  684. // strip leading whitespace so it isn't evaluated as code
  685. var text = elem.innerHTML.replace(/\n\s*\n/g,'\n'),
  686. // set indentation level so your markdown can be indented within your HTML
  687. leadingws = text.match(/^\n?(\s*)/)[1].length,
  688. regex = new RegExp('\\n?\\s{' + leadingws + '}','g'),
  689. md = text.replace(regex,'\n'),
  690. html = (new Showdown.converter()).makeHtml(md);
  691. // here, have sum HTML
  692. elem.innerHTML = html;
  693. });
  694. }());
  695. </script>
  696. </body>
  697. </html>