jekyll-theme-chalk 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (405) hide show
  1. checksums.yaml +7 -0
  2. data/404.html +39 -0
  3. data/LICENSE +21 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +91 -0
  6. data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.eot +0 -0
  7. data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.ttf +0 -0
  8. data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.woff +0 -0
  9. data/_assets/fonts/cormorant-garamond/Cormorant-Garamond-700.woff2 +0 -0
  10. data/_assets/fonts/ionicons/ionicons.eot +0 -0
  11. data/_assets/fonts/ionicons/ionicons.ttf +0 -0
  12. data/_assets/fonts/ionicons/ionicons.woff +0 -0
  13. data/_assets/fonts/lato/Lato-300.eot +0 -0
  14. data/_assets/fonts/lato/Lato-300.ttf +0 -0
  15. data/_assets/fonts/lato/Lato-300.woff +0 -0
  16. data/_assets/fonts/lato/Lato-300.woff2 +0 -0
  17. data/_assets/fonts/lato/Lato-700.eot +0 -0
  18. data/_assets/fonts/lato/Lato-700.ttf +0 -0
  19. data/_assets/fonts/lato/Lato-700.woff +0 -0
  20. data/_assets/fonts/lato/Lato-700.woff2 +0 -0
  21. data/_assets/fonts/lato/Lato-regular.eot +0 -0
  22. data/_assets/fonts/lato/Lato-regular.ttf +0 -0
  23. data/_assets/fonts/lato/Lato-regular.woff +0 -0
  24. data/_assets/fonts/lato/Lato-regular.woff2 +0 -0
  25. data/_assets/images/about.jpg +0 -0
  26. data/_assets/images/about@2x.jpg +0 -0
  27. data/_assets/images/apple-touch-icon.png +0 -0
  28. data/_assets/images/documentation/chalk-intro.png +0 -0
  29. data/_assets/images/documentation/chalk-intro@2x.png +0 -0
  30. data/_assets/images/documentation/enlarge.gif +0 -0
  31. data/_assets/images/documentation/enlarge@2x.gif +0 -0
  32. data/_assets/images/documentation/sample-image.jpg +0 -0
  33. data/_assets/images/documentation/sample-image@2x.jpg +0 -0
  34. data/_assets/images/og-image.jpg +0 -0
  35. data/_assets/javascripts/application.js +17 -0
  36. data/_assets/javascripts/scrollappear.js +25 -0
  37. data/_assets/javascripts/vendor.js +4 -0
  38. data/_assets/javascripts/webfonts.js +7 -0
  39. data/_assets/stylesheets/.csscomb.json +196 -0
  40. data/_assets/stylesheets/.scss-lint.yml +33 -0
  41. data/_assets/stylesheets/_base.scss +151 -0
  42. data/_assets/stylesheets/_mixins.scss +28 -0
  43. data/_assets/stylesheets/_variables.scss +47 -0
  44. data/_assets/stylesheets/dark.scss +71 -0
  45. data/_assets/stylesheets/fonts.scss +63 -0
  46. data/_assets/stylesheets/layouts/_footer.scss +17 -0
  47. data/_assets/stylesheets/layouts/_grid.scss +102 -0
  48. data/_assets/stylesheets/light.scss +71 -0
  49. data/_assets/stylesheets/modules/_about.scss +10 -0
  50. data/_assets/stylesheets/modules/_articles.scss +213 -0
  51. data/_assets/stylesheets/modules/_embed.scss +31 -0
  52. data/_assets/stylesheets/modules/_header.scss +57 -0
  53. data/_assets/stylesheets/modules/_highlights-dark.scss +415 -0
  54. data/_assets/stylesheets/modules/_highlights-light.scss +409 -0
  55. data/_assets/stylesheets/modules/_icons.scss +83 -0
  56. data/_assets/stylesheets/modules/_scrollappear.scss +14 -0
  57. data/_assets/stylesheets/notfound-dark.scss +91 -0
  58. data/_assets/stylesheets/notfound-light.scss +91 -0
  59. data/_assets/stylesheets/vendor/_normalize.scss +461 -0
  60. data/_assets/yarn/.yarn-integrity +22 -0
  61. data/_assets/yarn/fluidbox/.gitattributes +22 -0
  62. data/_assets/yarn/fluidbox/.npmignore +220 -0
  63. data/_assets/yarn/fluidbox/.travis.yml +6 -0
  64. data/_assets/yarn/fluidbox/Gruntfile.js +8 -0
  65. data/_assets/yarn/fluidbox/LICENSE.md +23 -0
  66. data/_assets/yarn/fluidbox/README.html +750 -0
  67. data/_assets/yarn/fluidbox/README.md +396 -0
  68. data/_assets/yarn/fluidbox/bower.json +35 -0
  69. data/_assets/yarn/fluidbox/demo/css/styles.min.css +2 -0
  70. data/_assets/yarn/fluidbox/demo/css/styles.min.css.map +1 -0
  71. data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.eot +0 -0
  72. data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.svg +233 -0
  73. data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.ttf +0 -0
  74. data/_assets/yarn/fluidbox/demo/fonts/BLOKKRegular.woff +0 -0
  75. data/_assets/yarn/fluidbox/demo/fonts/fontello.eot +0 -0
  76. data/_assets/yarn/fluidbox/demo/fonts/fontello.svg +13 -0
  77. data/_assets/yarn/fluidbox/demo/fonts/fontello.ttf +0 -0
  78. data/_assets/yarn/fluidbox/demo/fonts/fontello.woff +0 -0
  79. data/_assets/yarn/fluidbox/demo/index.html +758 -0
  80. data/_assets/yarn/fluidbox/demo/src/css/styles.scss +1131 -0
  81. data/_assets/yarn/fluidbox/dist/css/fluidbox.min.css +2 -0
  82. data/_assets/yarn/fluidbox/dist/css/fluidbox.min.css.map +1 -0
  83. data/_assets/yarn/fluidbox/dist/js/jquery.fluidbox.min.js +1 -0
  84. data/_assets/yarn/fluidbox/grunt/aliases.yaml +20 -0
  85. data/_assets/yarn/fluidbox/grunt/clean.js +5 -0
  86. data/_assets/yarn/fluidbox/grunt/concurrent.js +33 -0
  87. data/_assets/yarn/fluidbox/grunt/jshint.js +10 -0
  88. data/_assets/yarn/fluidbox/grunt/postcss.js +47 -0
  89. data/_assets/yarn/fluidbox/grunt/sass.js +42 -0
  90. data/_assets/yarn/fluidbox/grunt/uglify.js +7 -0
  91. data/_assets/yarn/fluidbox/grunt/watch.js +28 -0
  92. data/_assets/yarn/fluidbox/index.html +8 -0
  93. data/_assets/yarn/fluidbox/license.txt +21 -0
  94. data/_assets/yarn/fluidbox/package.json +61 -0
  95. data/_assets/yarn/fluidbox/src/css/_fluidbox.scss +95 -0
  96. data/_assets/yarn/fluidbox/src/css/fluidbox.scss +2 -0
  97. data/_assets/yarn/fluidbox/src/js/jquery.fluidbox.js +722 -0
  98. data/_assets/yarn/jquery/AUTHORS.txt +301 -0
  99. data/_assets/yarn/jquery/LICENSE.txt +36 -0
  100. data/_assets/yarn/jquery/README.md +67 -0
  101. data/_assets/yarn/jquery/bower.json +14 -0
  102. data/_assets/yarn/jquery/dist/core.js +476 -0
  103. data/_assets/yarn/jquery/dist/jquery.js +10253 -0
  104. data/_assets/yarn/jquery/dist/jquery.min.js +4 -0
  105. data/_assets/yarn/jquery/dist/jquery.min.map +1 -0
  106. data/_assets/yarn/jquery/dist/jquery.slim.js +8160 -0
  107. data/_assets/yarn/jquery/dist/jquery.slim.min.js +4 -0
  108. data/_assets/yarn/jquery/dist/jquery.slim.min.map +1 -0
  109. data/_assets/yarn/jquery/external/sizzle/LICENSE.txt +36 -0
  110. data/_assets/yarn/jquery/external/sizzle/dist/sizzle.js +2272 -0
  111. data/_assets/yarn/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  112. data/_assets/yarn/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  113. data/_assets/yarn/jquery/package.json +97 -0
  114. data/_assets/yarn/jquery/src/.eslintrc.json +5 -0
  115. data/_assets/yarn/jquery/src/ajax.js +855 -0
  116. data/_assets/yarn/jquery/src/ajax/jsonp.js +102 -0
  117. data/_assets/yarn/jquery/src/ajax/load.js +76 -0
  118. data/_assets/yarn/jquery/src/ajax/parseXML.js +30 -0
  119. data/_assets/yarn/jquery/src/ajax/script.js +77 -0
  120. data/_assets/yarn/jquery/src/ajax/var/location.js +5 -0
  121. data/_assets/yarn/jquery/src/ajax/var/nonce.js +7 -0
  122. data/_assets/yarn/jquery/src/ajax/var/rquery.js +5 -0
  123. data/_assets/yarn/jquery/src/ajax/xhr.js +169 -0
  124. data/_assets/yarn/jquery/src/attributes.js +13 -0
  125. data/_assets/yarn/jquery/src/attributes/attr.js +141 -0
  126. data/_assets/yarn/jquery/src/attributes/classes.js +174 -0
  127. data/_assets/yarn/jquery/src/attributes/prop.js +143 -0
  128. data/_assets/yarn/jquery/src/attributes/support.js +33 -0
  129. data/_assets/yarn/jquery/src/attributes/val.js +190 -0
  130. data/_assets/yarn/jquery/src/callbacks.js +234 -0
  131. data/_assets/yarn/jquery/src/core.js +476 -0
  132. data/_assets/yarn/jquery/src/core/DOMEval.js +16 -0
  133. data/_assets/yarn/jquery/src/core/access.js +70 -0
  134. data/_assets/yarn/jquery/src/core/init.js +128 -0
  135. data/_assets/yarn/jquery/src/core/nodeName.js +13 -0
  136. data/_assets/yarn/jquery/src/core/parseHTML.js +65 -0
  137. data/_assets/yarn/jquery/src/core/ready-no-deferred.js +96 -0
  138. data/_assets/yarn/jquery/src/core/ready.js +86 -0
  139. data/_assets/yarn/jquery/src/core/readyException.js +13 -0
  140. data/_assets/yarn/jquery/src/core/stripAndCollapse.js +14 -0
  141. data/_assets/yarn/jquery/src/core/support.js +20 -0
  142. data/_assets/yarn/jquery/src/core/var/rsingleTag.js +6 -0
  143. data/_assets/yarn/jquery/src/css.js +438 -0
  144. data/_assets/yarn/jquery/src/css/addGetHookIf.js +26 -0
  145. data/_assets/yarn/jquery/src/css/adjustCSS.js +71 -0
  146. data/_assets/yarn/jquery/src/css/curCSS.js +65 -0
  147. data/_assets/yarn/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  148. data/_assets/yarn/jquery/src/css/showHide.js +105 -0
  149. data/_assets/yarn/jquery/src/css/support.js +89 -0
  150. data/_assets/yarn/jquery/src/css/var/cssExpand.js +5 -0
  151. data/_assets/yarn/jquery/src/css/var/getStyles.js +17 -0
  152. data/_assets/yarn/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  153. data/_assets/yarn/jquery/src/css/var/rmargin.js +5 -0
  154. data/_assets/yarn/jquery/src/css/var/rnumnonpx.js +7 -0
  155. data/_assets/yarn/jquery/src/css/var/swap.js +26 -0
  156. data/_assets/yarn/jquery/src/data.js +179 -0
  157. data/_assets/yarn/jquery/src/data/Data.js +161 -0
  158. data/_assets/yarn/jquery/src/data/var/acceptData.js +19 -0
  159. data/_assets/yarn/jquery/src/data/var/dataPriv.js +7 -0
  160. data/_assets/yarn/jquery/src/data/var/dataUser.js +7 -0
  161. data/_assets/yarn/jquery/src/deferred.js +391 -0
  162. data/_assets/yarn/jquery/src/deferred/exceptionHook.js +21 -0
  163. data/_assets/yarn/jquery/src/deprecated.js +40 -0
  164. data/_assets/yarn/jquery/src/dimensions.js +56 -0
  165. data/_assets/yarn/jquery/src/effects.js +699 -0
  166. data/_assets/yarn/jquery/src/effects/Tween.js +123 -0
  167. data/_assets/yarn/jquery/src/effects/animatedSelector.js +15 -0
  168. data/_assets/yarn/jquery/src/event.js +746 -0
  169. data/_assets/yarn/jquery/src/event/ajax.js +22 -0
  170. data/_assets/yarn/jquery/src/event/alias.js +29 -0
  171. data/_assets/yarn/jquery/src/event/focusin.js +55 -0
  172. data/_assets/yarn/jquery/src/event/support.js +11 -0
  173. data/_assets/yarn/jquery/src/event/trigger.js +185 -0
  174. data/_assets/yarn/jquery/src/exports/amd.js +26 -0
  175. data/_assets/yarn/jquery/src/exports/global.js +34 -0
  176. data/_assets/yarn/jquery/src/jquery.js +41 -0
  177. data/_assets/yarn/jquery/src/manipulation.js +488 -0
  178. data/_assets/yarn/jquery/src/manipulation/_evalUrl.js +23 -0
  179. data/_assets/yarn/jquery/src/manipulation/buildFragment.js +104 -0
  180. data/_assets/yarn/jquery/src/manipulation/getAll.js +32 -0
  181. data/_assets/yarn/jquery/src/manipulation/setGlobalEval.js +22 -0
  182. data/_assets/yarn/jquery/src/manipulation/support.js +35 -0
  183. data/_assets/yarn/jquery/src/manipulation/var/rcheckableType.js +5 -0
  184. data/_assets/yarn/jquery/src/manipulation/var/rscriptType.js +5 -0
  185. data/_assets/yarn/jquery/src/manipulation/var/rtagName.js +5 -0
  186. data/_assets/yarn/jquery/src/manipulation/wrapMap.js +29 -0
  187. data/_assets/yarn/jquery/src/offset.js +229 -0
  188. data/_assets/yarn/jquery/src/queue.js +145 -0
  189. data/_assets/yarn/jquery/src/queue/delay.js +24 -0
  190. data/_assets/yarn/jquery/src/selector-native.js +237 -0
  191. data/_assets/yarn/jquery/src/selector-sizzle.js +19 -0
  192. data/_assets/yarn/jquery/src/selector.js +3 -0
  193. data/_assets/yarn/jquery/src/serialize.js +130 -0
  194. data/_assets/yarn/jquery/src/traversing.js +191 -0
  195. data/_assets/yarn/jquery/src/traversing/findFilter.js +106 -0
  196. data/_assets/yarn/jquery/src/traversing/var/dir.js +22 -0
  197. data/_assets/yarn/jquery/src/traversing/var/rneedsContext.js +8 -0
  198. data/_assets/yarn/jquery/src/traversing/var/siblings.js +17 -0
  199. data/_assets/yarn/jquery/src/var/ObjectFunctionString.js +7 -0
  200. data/_assets/yarn/jquery/src/var/arr.js +5 -0
  201. data/_assets/yarn/jquery/src/var/class2type.js +6 -0
  202. data/_assets/yarn/jquery/src/var/concat.js +7 -0
  203. data/_assets/yarn/jquery/src/var/document.js +5 -0
  204. data/_assets/yarn/jquery/src/var/documentElement.js +7 -0
  205. data/_assets/yarn/jquery/src/var/fnToString.js +7 -0
  206. data/_assets/yarn/jquery/src/var/getProto.js +5 -0
  207. data/_assets/yarn/jquery/src/var/hasOwn.js +7 -0
  208. data/_assets/yarn/jquery/src/var/indexOf.js +7 -0
  209. data/_assets/yarn/jquery/src/var/pnum.js +5 -0
  210. data/_assets/yarn/jquery/src/var/push.js +7 -0
  211. data/_assets/yarn/jquery/src/var/rcssNum.js +9 -0
  212. data/_assets/yarn/jquery/src/var/rnothtmlwhite.js +8 -0
  213. data/_assets/yarn/jquery/src/var/slice.js +7 -0
  214. data/_assets/yarn/jquery/src/var/support.js +6 -0
  215. data/_assets/yarn/jquery/src/var/toString.js +7 -0
  216. data/_assets/yarn/jquery/src/wrap.js +77 -0
  217. data/_assets/yarn/retinajs/.babelrc +4 -0
  218. data/_assets/yarn/retinajs/.editorconfig +15 -0
  219. data/_assets/yarn/retinajs/.eslintignore +2 -0
  220. data/_assets/yarn/retinajs/.eslintrc +9 -0
  221. data/_assets/yarn/retinajs/.npmignore +7 -0
  222. data/_assets/yarn/retinajs/.travis.yml +20 -0
  223. data/_assets/yarn/retinajs/LICENSE +20 -0
  224. data/_assets/yarn/retinajs/README.md +267 -0
  225. data/_assets/yarn/retinajs/bower.json +25 -0
  226. data/_assets/yarn/retinajs/dist/_retina.sass +68 -0
  227. data/_assets/yarn/retinajs/dist/_retina.scss +102 -0
  228. data/_assets/yarn/retinajs/dist/retina.js +100 -0
  229. data/_assets/yarn/retinajs/dist/retina.js.map +1 -0
  230. data/_assets/yarn/retinajs/dist/retina.less +56 -0
  231. data/_assets/yarn/retinajs/dist/retina.min.js +2 -0
  232. data/_assets/yarn/retinajs/dist/retina.min.js.map +1 -0
  233. data/_assets/yarn/retinajs/dist/retina.styl +56 -0
  234. data/_assets/yarn/retinajs/es/_retina.sass +68 -0
  235. data/_assets/yarn/retinajs/es/_retina.scss +102 -0
  236. data/_assets/yarn/retinajs/es/retina.js +91 -0
  237. data/_assets/yarn/retinajs/es/retina.js.map +1 -0
  238. data/_assets/yarn/retinajs/es/retina.less +56 -0
  239. data/_assets/yarn/retinajs/es/retina.styl +56 -0
  240. data/_assets/yarn/retinajs/gulpfile.babel.js +154 -0
  241. data/_assets/yarn/retinajs/package.json +57 -0
  242. data/_assets/yarn/retinajs/src/_retina.sass +68 -0
  243. data/_assets/yarn/retinajs/src/_retina.scss +102 -0
  244. data/_assets/yarn/retinajs/src/retina.js +246 -0
  245. data/_assets/yarn/retinajs/src/retina.less +56 -0
  246. data/_assets/yarn/retinajs/src/retina.styl +56 -0
  247. data/_assets/yarn/retinajs/test/DOM.js +44 -0
  248. data/_assets/yarn/retinajs/test/fixtures/image.js +19 -0
  249. data/_assets/yarn/retinajs/test/fixtures/less_expected_output.css +18 -0
  250. data/_assets/yarn/retinajs/test/fixtures/scss_expected_output.css +13 -0
  251. data/_assets/yarn/retinajs/test/fixtures/test.less +10 -0
  252. data/_assets/yarn/retinajs/test/fixtures/test.scss +11 -0
  253. data/_assets/yarn/retinajs/test/fixtures/xml_http_request.js +24 -0
  254. data/_assets/yarn/retinajs/test/functional/public/google-logo.png +0 -0
  255. data/_assets/yarn/retinajs/test/functional/public/google-logo@2x.png +0 -0
  256. data/_assets/yarn/retinajs/test/functional/public/google-logo@3x.png +0 -0
  257. data/_assets/yarn/retinajs/test/functional/public/index.html +190 -0
  258. data/_assets/yarn/retinajs/test/functional/public/ipad.png +0 -0
  259. data/_assets/yarn/retinajs/test/functional/public/ipad@2x.png +0 -0
  260. data/_assets/yarn/retinajs/test/functional/public/ipad@3x.png +0 -0
  261. data/_assets/yarn/retinajs/test/functional/public/styles/_retina.sass +68 -0
  262. data/_assets/yarn/retinajs/test/functional/public/styles/_retina.scss +102 -0
  263. data/_assets/yarn/retinajs/test/functional/public/styles/less-base.less +13 -0
  264. data/_assets/yarn/retinajs/test/functional/public/styles/retina.less +56 -0
  265. data/_assets/yarn/retinajs/test/functional/public/styles/retina.less.css +73 -0
  266. data/_assets/yarn/retinajs/test/functional/public/styles/retina.sass.css +42 -0
  267. data/_assets/yarn/retinajs/test/functional/public/styles/retina.scss.css +96 -0
  268. data/_assets/yarn/retinajs/test/functional/public/styles/retina.styl +56 -0
  269. data/_assets/yarn/retinajs/test/functional/public/styles/retina.styl.css +61 -0
  270. data/_assets/yarn/retinajs/test/functional/public/styles/sass-base.sass +10 -0
  271. data/_assets/yarn/retinajs/test/functional/public/styles/scss-base.scss +13 -0
  272. data/_assets/yarn/retinajs/test/functional/public/styles/styl-base.styl +10 -0
  273. data/_assets/yarn/retinajs/test/mocha-runner.js +7 -0
  274. data/_assets/yarn/retinajs/test/retina.spec.js +14 -0
  275. data/_assets/yarn/scrollreveal/.gitattributes +10 -0
  276. data/_assets/yarn/scrollreveal/.github/CONTRIBUTING.md +9 -0
  277. data/_assets/yarn/scrollreveal/.github/ISSUE_TEMPLATE.md +11 -0
  278. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/base.css +213 -0
  279. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/index.html +158 -0
  280. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/index.html +93 -0
  281. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/package.json.html +143 -0
  282. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/constructor.js.html +311 -0
  283. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/defaults.js.html +158 -0
  284. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/animate.js.html +395 -0
  285. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/delegate.js.html +179 -0
  286. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/index.html +145 -0
  287. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/initialize.js.html +197 -0
  288. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/rinse.js.html +311 -0
  289. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/functions/style.js.html +617 -0
  290. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/index.html +119 -0
  291. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/clean.js.html +137 -0
  292. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/destroy.js.html +182 -0
  293. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/index.html +132 -0
  294. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/reveal.js.html +524 -0
  295. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/methods/sync.js.html +125 -0
  296. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/instance/noop.js.html +89 -0
  297. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/polyfills/index.html +93 -0
  298. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/polyfills/requestAnimationFrame.js.html +125 -0
  299. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/browser.js.html +272 -0
  300. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/core.js.html +434 -0
  301. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/generic.js.html +218 -0
  302. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/lib/src/utils/index.html +119 -0
  303. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/prettify.css +1 -0
  304. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/prettify.js +1 -0
  305. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/sort-arrow-sprite.png +0 -0
  306. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov-report/sorter.js +158 -0
  307. data/_assets/yarn/scrollreveal/.ignore/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/lcov.info +1016 -0
  308. data/_assets/yarn/scrollreveal/.ignore/coverage/server.coverage.js +11 -0
  309. data/_assets/yarn/scrollreveal/.ignore/sandbox/css/styles.css +32 -0
  310. data/_assets/yarn/scrollreveal/.ignore/sandbox/index.html +68 -0
  311. data/_assets/yarn/scrollreveal/.ignore/sandbox/js/scrollreveal.js +1271 -0
  312. data/_assets/yarn/scrollreveal/.ignore/sandbox/rollup.conf.sandbox.js +15 -0
  313. data/_assets/yarn/scrollreveal/.ignore/sandbox/server.sandbox.js +11 -0
  314. data/_assets/yarn/scrollreveal/.npmignore +8 -0
  315. data/_assets/yarn/scrollreveal/CHANGELOG.md +268 -0
  316. data/_assets/yarn/scrollreveal/LICENSE.md +12 -0
  317. data/_assets/yarn/scrollreveal/README.md +413 -0
  318. data/_assets/yarn/scrollreveal/bower.json +24 -0
  319. data/_assets/yarn/scrollreveal/dist/scrollreveal.js +860 -0
  320. data/_assets/yarn/scrollreveal/dist/scrollreveal.min.js +1 -0
  321. data/_assets/yarn/scrollreveal/gulpfile.js +33 -0
  322. data/_assets/yarn/scrollreveal/lib/gulp/gulp-clean.js +7 -0
  323. data/_assets/yarn/scrollreveal/lib/gulp/gulp-dev.js +6 -0
  324. data/_assets/yarn/scrollreveal/lib/gulp/gulp-dist-min.js +19 -0
  325. data/_assets/yarn/scrollreveal/lib/gulp/gulp-dist.js +6 -0
  326. data/_assets/yarn/scrollreveal/lib/gulp/gulp-server.js +9 -0
  327. data/_assets/yarn/scrollreveal/lib/gulp/gulp-validate-bower.js +13 -0
  328. data/_assets/yarn/scrollreveal/lib/gulp/gulp-watch.js +6 -0
  329. data/_assets/yarn/scrollreveal/src/scrollreveal.js +860 -0
  330. data/_assets/yarn/throttle-debounce-fn/.jscsrc +5 -0
  331. data/_assets/yarn/throttle-debounce-fn/.jshintrc +13 -0
  332. data/_assets/yarn/throttle-debounce-fn/.npmignore +1 -0
  333. data/_assets/yarn/throttle-debounce-fn/Gruntfile.js +76 -0
  334. data/_assets/yarn/throttle-debounce-fn/LICENSE.md +22 -0
  335. data/_assets/yarn/throttle-debounce-fn/README.md +55 -0
  336. data/_assets/yarn/throttle-debounce-fn/dist/throttle-debounce-fn.js +164 -0
  337. data/_assets/yarn/throttle-debounce-fn/dist/throttle-debounce-fn.min.js +10 -0
  338. data/_assets/yarn/throttle-debounce-fn/package.json +36 -0
  339. data/_assets/yarn/throttle-debounce-fn/src/throttle-debounce-fn.js +156 -0
  340. data/_assets/yarn/turbolinks/LICENSE +20 -0
  341. data/_assets/yarn/turbolinks/README.md +473 -0
  342. data/_assets/yarn/turbolinks/dist/turbolinks.js +6 -0
  343. data/_assets/yarn/turbolinks/src/turbolinks/BANNER.js.erb +4 -0
  344. data/_assets/yarn/turbolinks/src/turbolinks/VERSION +1 -0
  345. data/_assets/yarn/turbolinks/src/turbolinks/browser_adapter.coffee +61 -0
  346. data/_assets/yarn/turbolinks/src/turbolinks/compatibility.coffee +30 -0
  347. data/_assets/yarn/turbolinks/src/turbolinks/controller.coffee +239 -0
  348. data/_assets/yarn/turbolinks/src/turbolinks/error_renderer.coffee +21 -0
  349. data/_assets/yarn/turbolinks/src/turbolinks/head_details.coffee +51 -0
  350. data/_assets/yarn/turbolinks/src/turbolinks/helpers.coffee +57 -0
  351. data/_assets/yarn/turbolinks/src/turbolinks/history.coffee +48 -0
  352. data/_assets/yarn/turbolinks/src/turbolinks/http_request.coffee +88 -0
  353. data/_assets/yarn/turbolinks/src/turbolinks/index.coffee +18 -0
  354. data/_assets/yarn/turbolinks/src/turbolinks/location.coffee +70 -0
  355. data/_assets/yarn/turbolinks/src/turbolinks/progress_bar.coffee +83 -0
  356. data/_assets/yarn/turbolinks/src/turbolinks/renderer.coffee +27 -0
  357. data/_assets/yarn/turbolinks/src/turbolinks/scroll_manager.coffee +28 -0
  358. data/_assets/yarn/turbolinks/src/turbolinks/snapshot.coffee +47 -0
  359. data/_assets/yarn/turbolinks/src/turbolinks/snapshot_cache.coffee +43 -0
  360. data/_assets/yarn/turbolinks/src/turbolinks/snapshot_renderer.coffee +88 -0
  361. data/_assets/yarn/turbolinks/src/turbolinks/start.coffee +18 -0
  362. data/_assets/yarn/turbolinks/src/turbolinks/view.coffee +34 -0
  363. data/_assets/yarn/turbolinks/src/turbolinks/visit.coffee +162 -0
  364. data/_assets/yarn/webfontloader/CHANGELOG +419 -0
  365. data/_assets/yarn/webfontloader/LICENSE +176 -0
  366. data/_assets/yarn/webfontloader/README.md +394 -0
  367. data/_assets/yarn/webfontloader/package.json +37 -0
  368. data/_assets/yarn/webfontloader/src/closure.js +2 -0
  369. data/_assets/yarn/webfontloader/src/core/cssclassname.js +46 -0
  370. data/_assets/yarn/webfontloader/src/core/domhelper.js +405 -0
  371. data/_assets/yarn/webfontloader/src/core/eventdispatcher.js +195 -0
  372. data/_assets/yarn/webfontloader/src/core/font.js +140 -0
  373. data/_assets/yarn/webfontloader/src/core/fontmodule.js +16 -0
  374. data/_assets/yarn/webfontloader/src/core/fontmoduleloader.js +47 -0
  375. data/_assets/yarn/webfontloader/src/core/fontruler.js +60 -0
  376. data/_assets/yarn/webfontloader/src/core/fontwatcher.js +171 -0
  377. data/_assets/yarn/webfontloader/src/core/fontwatchrunner.js +249 -0
  378. data/_assets/yarn/webfontloader/src/core/initialize.js +97 -0
  379. data/_assets/yarn/webfontloader/src/core/nativefontwatchrunner.js +69 -0
  380. data/_assets/yarn/webfontloader/src/core/stylesheetwaiter.js +48 -0
  381. data/_assets/yarn/webfontloader/src/core/webfont.js +97 -0
  382. data/_assets/yarn/webfontloader/src/modules/custom.js +63 -0
  383. data/_assets/yarn/webfontloader/src/modules/fontdeck.js +66 -0
  384. data/_assets/yarn/webfontloader/src/modules/google/fontapiparser.js +181 -0
  385. data/_assets/yarn/webfontloader/src/modules/google/fontapiurlbuilder.js +77 -0
  386. data/_assets/yarn/webfontloader/src/modules/google/googlefontapi.js +54 -0
  387. data/_assets/yarn/webfontloader/src/modules/monotype.js +110 -0
  388. data/_assets/yarn/webfontloader/src/modules/typekit.js +73 -0
  389. data/_assets/yarn/webfontloader/webfontloader.js +17 -0
  390. data/_includes/footer.html +7 -0
  391. data/_includes/head.html +41 -0
  392. data/_includes/image.html +5 -0
  393. data/_includes/javascript.html +1 -0
  394. data/_includes/javascripts.html +19 -0
  395. data/_includes/navigation.html +75 -0
  396. data/_includes/stylesheet.html +1 -0
  397. data/_layouts/articles_by_tag.html +38 -0
  398. data/_layouts/default.html +16 -0
  399. data/_layouts/post.html +65 -0
  400. data/about.html +18 -0
  401. data/favicon.ico +0 -0
  402. data/feed.xml +20 -0
  403. data/index.html +49 -0
  404. data/robots.txt +5 -0
  405. metadata +596 -0
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
5
+ <defs>
6
+ <font id="fontello" horiz-adv-x="1000" >
7
+ <font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
+ <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="link" unicode="&#xe800;" d="m294 116q14 14 34 14t36-14q32-34 0-70l-42-40q-56-56-132-56-78 0-134 56t-56 132q0 78 56 134l148 148q70 68 144 77t128-43q16-16 16-36t-16-36q-36-32-70 0-50 48-132-34l-148-146q-26-26-26-64t26-62q26-26 63-26t63 26z m450 574q56-56 56-132 0-78-56-134l-158-158q-74-72-150-72-62 0-112 50-14 14-14 34t14 36q14 14 35 14t35-14q50-48 122 24l158 156q28 28 28 64 0 38-28 62-24 26-56 31t-60-21l-50-50q-16-14-36-14t-34 14q-34 34 0 70l50 50q54 54 127 51t129-61z" horiz-adv-x="800" />
10
+ <glyph glyph-name="code" unicode="&#xe801;" d="m380 636q16-14 16-32t-16-30l-246-224 246-226q16-12 16-30t-16-32q-30-30-60 0l-320 288 320 286q30 30 60 0z m302 0l318-286-318-288q-32-30-62 0-32 32 0 62l248 226-248 224q-32 30 0 62 30 30 62 0z" horiz-adv-x="1000" />
11
+ </font>
12
+ </defs>
13
+ </svg>
@@ -0,0 +1,758 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Fluidbox, a jQuery plugin for beautiful lightboxes</title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.0/normalize.min.css" media="all" rel="stylesheet" />
8
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700|PT+Serif:400italic" rel="stylesheet" type="text/css">
9
+ <link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.css" media="all" rel="stylesheet" />
10
+ <link type="text/css" href="./css/styles.min.css" media="all" rel="stylesheet" />
11
+ <link type="text/css" href="../dist/css/fluidbox.min.css" media="all" rel="stylesheet" />
12
+ <link rel="author" href="https://plus.google.com/+TerryMun/"></link>
13
+
14
+ <script>
15
+ (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
16
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
17
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
18
+ })(window,document,"script","https://www.google-analytics.com/analytics.js","ga");
19
+ ga("create", "UA-46830269-1", "terrymun.github.io");
20
+ ga("send", "pageview");
21
+ </script>
22
+ </head>
23
+ <body>
24
+ <header>
25
+ <div>
26
+ <h1>Fluidbox</h1>
27
+ <span class="byline">Replicating and improving the lightbox module seen on Medium with fluid transitions</span>
28
+ </div>
29
+ <a href="#content" id="skip" title="Skip to content">
30
+ <svg version="1.2" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
31
+ x="0px" y="0px" viewBox="0 0 400 200" xml:space="preserve">
32
+ <g>
33
+ <path d="M106.308,29.384c6.332,0,11.664,2.444,15.984,7.344c9.214,11.232,18.286,22.174,27.216,32.832l43.2,51.84
34
+ c5.184-6.629,11.806-14.62,19.873-23.976c8.059-9.362,15.834-18.65,23.328-27.864c8.922-10.658,17.994-21.6,27.215-32.832
35
+ c4.32-4.9,9.646-7.344,15.984-7.344c4.895,0,9.355,1.58,13.393,4.752c4.32,3.74,6.764,8.424,7.344,14.04
36
+ c0.574,5.616-1.014,10.726-4.752,15.336l-86.4,103.68c-4.037,4.894-9.362,7.344-15.984,7.344c-6.628,0-11.954-2.45-15.984-7.344
37
+ l-86.4-103.68c-3.747-4.61-5.333-9.72-4.752-15.336c0.574-5.616,3.024-10.3,7.344-14.04
38
+ C96.945,30.964,101.407,29.384,106.308,29.384z"/>
39
+ </g>
40
+ </svg>
41
+ </a>
42
+ </header>
43
+
44
+ <main id="content">
45
+ <section>
46
+ <h2 id="introduction">Introduction</h2>
47
+ <p>Opening images seamlessly in a lightbox on your page without interruption. This demo was inspired by how Medium handles embedded images. Made by <a rel="author" href="http://terrymun.com" title="Visit me">Terry</a>. This project was originally initiated as a personal challenge to replicate Medium&rsquo;s lightbox module, but it soon developed into a full-fledged jQuery plugin.</p>
48
+ <p>Current status:<br /><img src="https://img.shields.io/github/release/terrymun/fluidbox.svg?style=flat" alt="Latest Github release"> <img src="https://img.shields.io/npm/dm/fluidbox.svg" alt="npm downloads"> <img src="https://img.shields.io/github/stars/terrymun/fluidbox.svg?style=social&amp;label=Star" alt="Starred"> <img src="https://img.shields.io/github/watchers/terrymun/fluidbox.svg?style=social&amp;label=Watch" alt="Watchers"></p>
49
+ <p>You can follow the links below to read how I&rsquo;ve tackled the challenge, view the jQuery plugin on GitHub, or get the latest stable release hosted on CDNJS.</p>
50
+ <div class="cards">
51
+ <a href="https://medium.com/coding-design/9c7fe9db92c7" title="Read about Fluidbox's conception on Medium" class="card-medium">
52
+ <svg class="branding" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
53
+ x="0px" y="0px" viewBox="0 0 200 200" xml:space="preserve">
54
+ <g>
55
+ <path d="M0.001,0v200h200V0H0.001z M148.913,72.752h-3.869c-1.437,0-3.095,1.879-3.095,3.206v48.081
56
+ c0,1.328,1.658,3.316,3.095,3.316h3.869v11.164h-34.708v-11.164h6.964V76.842h-0.332l-17.133,61.677H90.439L73.528,76.842h-0.332
57
+ v50.513h7.295v11.164H51.089v-11.164h3.758c1.548,0,3.206-1.988,3.206-3.316V75.958c0-1.327-1.658-3.206-3.206-3.206h-3.758V61.146
58
+ h36.697l12.048,44.877h0.332l12.16-44.877h36.587V72.752z"/>
59
+ </g>
60
+ </svg>
61
+ <span>Read about Fluidbox's conception on Medium</span>
62
+ </a>
63
+ <a href="https://github.com/terrymun/Fluidbox" title="Check out the jQuery plugin on GitHub" class="card-github">
64
+ <svg class="branding" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 850.39 850.39" xml:space="preserve">
65
+ <g>
66
+ <path fill-rule="evenodd" fill="#191717" d="M424.731,131.743c-166.349,0-301.242,134.865-301.242,301.243
67
+ c0,133.097,86.314,246.015,206.008,285.849c15.053,2.786,20.583-6.537,20.583-14.493c0-7.18-0.278-30.915-0.409-56.086
68
+ c-83.806,18.225-101.489-35.543-101.489-35.543c-13.704-34.817-33.448-44.077-33.448-44.077
69
+ c-27.334-18.697,2.061-18.312,2.061-18.312c30.247,2.124,46.177,31.046,46.177,31.046c26.867,46.051,70.472,32.737,87.664,25.04
70
+ c2.704-19.467,10.508-32.762,19.125-40.283c-66.911-7.613-137.251-33.448-137.251-148.875c0-32.888,11.77-59.762,31.042-80.858
71
+ c-3.128-7.59-13.441-38.227,2.918-79.723c0,0,25.298-8.091,82.86,30.883c24.031-6.676,49.802-10.023,75.401-10.14
72
+ c25.601,0.117,51.391,3.464,75.466,10.14c57.499-38.975,82.758-30.883,82.758-30.883c16.396,41.496,6.084,72.133,2.958,79.723
73
+ c19.312,21.096,31.005,47.97,31.005,80.858c0,115.705-70.476,141.179-137.557,148.637c10.806,9.348,20.432,27.681,20.432,55.784
74
+ c0,40.308-0.346,72.746-0.346,82.67c0,8.019,5.422,17.412,20.689,14.454c119.628-39.878,205.836-152.757,205.836-285.81
75
+ C725.973,266.607,591.101,131.743,424.731,131.743z"/>
76
+ <path fill="#191717" d="M237.586,564.26c-0.662,1.5-3.02,1.948-5.164,0.92c-2.188-0.983-3.411-3.024-2.704-4.525
77
+ c0.648-1.539,3.006-1.968,5.188-0.939C237.094,560.698,238.341,562.759,237.586,564.26L237.586,564.26z M233.879,561.512"/>
78
+ <path fill="#191717" d="M249.79,577.87c-1.438,1.33-4.248,0.712-6.153-1.393c-1.973-2.1-2.338-4.91-0.882-6.261
79
+ c1.48-1.329,4.204-0.705,6.177,1.395C250.905,573.735,251.29,576.521,249.79,577.87L249.79,577.87z M246.915,574.787"/>
80
+ <path fill="#191717" d="M261.667,595.218c-1.847,1.287-4.867,0.083-6.733-2.596c-1.846-2.68-1.846-5.896,0.044-7.182
81
+ c1.866-1.285,4.842-0.126,6.732,2.529C263.552,590.692,263.552,593.908,261.667,595.218L261.667,595.218z M261.667,595.218"/>
82
+ <path fill="#191717" d="M277.938,611.981c-1.652,1.821-5.169,1.33-7.741-1.155c-2.636-2.426-3.366-5.874-1.715-7.697
83
+ c1.676-1.821,5.213-1.31,7.804,1.155C278.902,606.71,279.696,610.179,277.938,611.981L277.938,611.981z M277.938,611.981"/>
84
+ <path fill="#191717" d="M300.386,621.714c-0.731,2.359-4.117,3.43-7.527,2.427c-3.41-1.032-5.636-3.795-4.95-6.177
85
+ c0.707-2.378,4.112-3.493,7.546-2.422C298.861,616.57,301.092,619.312,300.386,621.714L300.386,621.714z M300.386,621.714"/>
86
+ <path fill="#191717" d="M325.04,623.518c0.083,2.484-2.811,4.545-6.391,4.588c-3.6,0.083-6.518-1.929-6.557-4.374
87
+ c0-2.509,2.831-4.545,6.431-4.608C322.103,619.055,325.04,621.053,325.04,623.518L325.04,623.518z M325.04,623.518"/>
88
+ <path fill="#191717" d="M347.98,619.614c0.429,2.422-2.061,4.911-5.617,5.573c-3.498,0.644-6.732-0.856-7.181-3.258
89
+ c-0.434-2.485,2.1-4.975,5.593-5.618C344.336,615.693,347.527,617.149,347.98,619.614L347.98,619.614z M347.98,619.614"/>
90
+ </g>
91
+ </svg>
92
+ <span>Check out the jQuery plugin on GitHub</span>
93
+ </a>
94
+ <a href="http://cdnjs.com/libraries/fluidbox" title="Fluidbox is hosted with CDNJS" class="card-cdnjs">
95
+ <span class="branding">cdnjs</span>
96
+ <span>Fluidbox is hosted with CDNJS</span>
97
+ </a>
98
+ </div>
99
+ <p class="user-message note"><strong>This demo is currently running on the edge release of Fluidbox.</strong> If you're using Fluidbox for production, I strongly recommend using the <a href="https://github.com/terrymun/Fluidbox/releases">latest stable release</a> and not the edge release (latest commit). The stable release(s) are also available via <a href="http://cdnjs.com/libraries/fluidbox" title="Fluidbox is hosted with CDNJS">CDNJS</a>.</p>
100
+ </section>
101
+
102
+ <section>
103
+ <h2 id="in-the-wild">In the wild</h2>
104
+ <p>Fluidbox is implemented in:</p>
105
+ <ul class="task-list">
106
+ <li><a href="http://www.gemmabusquets.com/"><strong>Gemma Busquets</strong></a> by <a href="https://twitter.com/imgemmabusquets">@imgemmabusquets</a></li>
107
+ <li><a href="http://terrymun.com/"><strong>Terry Mun</strong></a> by <em>myself</em></li>
108
+ </ul>
109
+ </section>
110
+
111
+ <section>
112
+ <h2 id="how-does-it-work">How does it work?</h2>
113
+ <p>Fluidbox works by replacing your markup, which should be as follow:</p>
114
+ <pre class="language-markup"><code>&lt;a href=&quot;/path/to/image&quot; title=&quot;&quot;&gt;
115
+ &lt;img src=&quot;/path/to/image&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;
116
+ &lt;/a&gt;</code></pre>
117
+ <p>&hellip;into&hellip;</p>
118
+ <pre class="language-markup"><code>&lt;a href=&quot;/path/to/image&quot; class=&quot;fluidbox fluidbox__instance-[i] fluidbox--closed&quot;&gt;
119
+ &lt;div class=&quot;fluidbox__wrap&quot; style=&quot;z-index: 990;&quot;&gt;
120
+ &lt;img src=&quot;/path/to/image&quot; alt=&quot;&quot; title=&quot;&quot; class=&quot;fluidbox__thumb&quot; style=&quot;opacity: 1;&quot;&gt;
121
+ &lt;div class=&quot;fluidbox__ghost&quot; style=&quot;width: [w]; height: [h]; top: [t]; left: [l];&quot;&gt;&lt;/div&gt;
122
+ &lt;/div&gt;
123
+ &lt;/a&gt;</code></pre>
124
+ <p>&hellip;where:</p>
125
+ <table id="markup-details">
126
+ <thead>
127
+ <tr>
128
+ <th>Variable</th>
129
+ <th>Description</th>
130
+ </tr>
131
+ </thead>
132
+ <tbody>
133
+ <tr>
134
+ <td><code>i</code></td>
135
+ <td>Unique ID of the Fluidbox instance. New instances of Fluidbox will have new values.</td>
136
+ </tr>
137
+ <tr>
138
+ <td><code>w</code></td>
139
+ <td>Computed width of the thumbnail, in pixels.</td>
140
+ </tr>
141
+ <tr>
142
+ <td><code>h</code></td>
143
+ <td>Computed height of the thumbnail, in pixels.</td>
144
+ </tr>
145
+ <tr>
146
+ <td><code>t</code></td>
147
+ <td>Computed offset, from the top and in pixels, of the thumbnail relative to its container.</td>
148
+ </tr>
149
+ <tr>
150
+ <td><code>l</code></td>
151
+ <td>Computed offset, from the left and in pixels, of the thumbnail relative to its container.</td>
152
+ </tr>
153
+ </tbody>
154
+ </table>
155
+ <p>The replaced and rendered markup for each image targeted with Fluidbox can be presented in a three-dimensional way as follow:</p>
156
+ <figure id="fluidbox-3d">
157
+ <div class="canvas">
158
+ <a href="http://i.imgur.com/ouqMP4F.jpg" data-fluidbox-loader><img src="http://i.imgur.com/ouqMP4F.jpg" alt="" title=""></a>
159
+ </div>
160
+ <figcaption>Three-dimensional visualization of rendered Fluidbox markup.</figcaption>
161
+ </figure>
162
+ <p>Each initialized Fluidbox instance can therefore be styled independently from each other using CSS alone, requiring no further manipulation via JS (unless required on the user's behalf for specific implementations). Fluidbox listens to the click event triggered on the ghost element, <code>.fluidbox__ghost</code>, and toggles between two binary states, <em>open</em> or <em>closed</em>.</p>
163
+ </section>
164
+
165
+ <section>
166
+ <h2 id="usage-notes">Usage notes</h2>
167
+ <h3 id="dependencies">Dependencies</h3>
168
+ <p>TThe latest version of Fluidbox require two dependencies: <a href="http://jquery.com/">jQuery v1.7 or above</a>, and <a href="http://benalman.com/projects/jquery-throttle-debounce-plugin/">Ben Alman's debounce/throttle plugin</a>. Yes, and that's all! For jQuery, I recommend using the latest stable build of 1.x, although I have not encountered any issues if 2.x is used. I usually use Google APIs, since many other sites are using it and the end-user probably has a cache of it sitting somewhere on their machine already. As for other plugins, I recommend using CDNJS.</p>
169
+ <pre class="language-markup"><code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;&gt;&lt;/script&gt;
170
+ &lt;script type=&quot;text/javascript&quot; src=&quot;//cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.min.js&quot;&gt;&lt;/script&gt;</code></pre>
171
+ <p class="user-message reminder">Fluidbox will still function if the debounce/throttle plugin is not included. However, Fluidbox will throw a warning message in the browser console, due to the fact that unthrottled resize events fired from the <code>window</code> object is too frequent and will lead to significant performance degradation.</p>
172
+ <p class="user-message note">For advanced users who are more comfortable with building, you may modify <code>Gruntfile.js</code> in the repo's root directory to include other libraries should the need arise.</p>
173
+
174
+ <h3 id="basic-usage">Basic usage</h3>
175
+ <p>In order to activate Fluidbox, simply chain the <code>.fluidbox()</code> method to your selector of choice on DOM ready&mdash;note that you <em>must</em> use an anchor element <code>&lt;a&gt;</code>:</p>
176
+ <pre class="language-javascript"><code>$(function () {
177
+ $(selector).fluidbox();
178
+ });</code></pre>
179
+ <p>The plugin will automatically check if the selector is:</p>
180
+ <ol>
181
+ <li>an anchor element, <code>&lt;a&gt;</code>, and</li>
182
+ <li>contains one and only one <code>&lt;img /&gt;</code> element (can be nested as an indirect descendant, to support the HTML5 <code>&lt;picture&gt;</code> standard.</li>
183
+ </ol>
184
+ <p>In the event that the element that satisfies the selector criteria but failed any one of the above criteria, the element will be ignored and the plugin moves on to the next available element. Therefore, it is important that your Fluidbox element(s) follow the following format. The <code>title</code> and <code>alt</code> attributes of the <code>&lt;img /&gt;</code> element is not used by the plugin, but the <code>alt</code> attribute has to be present for it to be semantically valid.</p>
185
+ <pre class="language-markup"><code>&lt;a href="..."&gt;
186
+ &lt;img src="/path/to/image" alt="" /&gt;
187
+ &lt;/a&gt;</code></pre>
188
+ <p>Fluidbox also supports the new HTML5 <code>&lt;picture&gt;</code> element (<a href="#html5-picture">see demo</a>). You can use it as follows:</p>
189
+ <pre class="language-markup" id="html5-picture-markup"><code>&lt;picture&gt;
190
+ &lt;source media=&quot;(max-width: 400px)&quot; srcset=&quot;/path/to/smallImage&quot;&gt;
191
+ &lt;source media=&quot;(min-width: 1200px)&quot; srcset=&quot;/path/to/largeImage&quot;&gt;
192
+ &lt;img src=&quot;/path/to/defaultImage&quot; alt=&quot;&quot; /&gt;
193
+ &lt;/picture&gt;
194
+ </code></pre>
195
+
196
+ <h3 id="configuration">Configuration</h3>
197
+ <p>Several options are available for configuration, also available in <a href="https://github.com/terrymun/Fluidbox#configuration">the readme</a>. Fluidbox follows the following model of setting overrides&mdash;in <strong>increasing order of priority</strong>:</p>
198
+ <ol>
199
+ <li>Default settings in plugin file.</li>
200
+ <li>Custom settings in <code>.fluidbox()</code> jQuery method.</li>
201
+ <li>Custom settings in the element's HTML5 <code>data-</code> attribute.</li>
202
+ </ol>
203
+ <div class="user-message note"><h4>On HTML5 data attributes</h4><p>In order to ensure that Fluidbox does not clash with commonly-used HTML5 <code>data-</code> attributes, it is tuned to listen in to <strong>namespaced attributes</strong>. For example, for the <code>immediateOpen</code> property, the corresponding attribute would be <code>data-fluidbox-immediate-open</code>. As per HTML5 specification, you should avoid using camel-case in your HTML5 data attributes because that is parsed into dash-delimited keys by the <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset"><code>dataset</code></a> method (jQuery uses <code>.data()</code> as an alias).</p></div>
204
+ <table class="wider" id="configuration-options">
205
+ <thead>
206
+ <tr>
207
+ <th>Property</th>
208
+ <th>Type</th>
209
+ <th>Default</th>
210
+ <th>Description</th>
211
+ </tr>
212
+ </thead>
213
+ <tbody>
214
+ <tr>
215
+ <td><code>immediateOpen</code></td>
216
+ <td>Boolean</td>
217
+ <td>false</td>
218
+ <td>Determines if Fluidbox should be opened immediately on click. If set to yes, Fluidbox will open the ghost image and wait for the target image to load. If set to no, Fluidbox will wait for the target image to load, <em>then</em> open the ghost image.</td>
219
+ </tr>
220
+ <tr>
221
+ <td><code>loader</code></td>
222
+ <td>Boolean</td>
223
+ <td>false</td>
224
+ <td>Determines if a loader will be added to the manipulated DOM. It will have the class of <code>.fluidbox__loader</code>.</td>
225
+ </tr>
226
+ <tr>
227
+ <td><code>maxWidth</code></td>
228
+ <td>Integer</td>
229
+ <td>0</td>
230
+ <td><p>Sets the maximum width, <strong>in screen pixels</strong>, that the ghost image will enlarge to. When set to zero this property is ignored. This property will <em>not</em> override the <code>viewportFill</code>.</p><p class="user-message warning">This option should not be specified (&ge;0) <em>in lieu</em> with <code>maxHeight</code>. In the event that both <code>maxWidth</code> and <code>maxHeight</code> are specified (&ge;0), <code>maxWidth</code> takes precedence. Fluidbox will throw a warning in the console discouraging this use.</p></td>
231
+ </tr>
232
+ <tr>
233
+ <td><code>maxHeight</code></td>
234
+ <td>Integer</td>
235
+ <td>0</td>
236
+ <td><p>Sets the maximum height, <strong>in screen pixels</strong>, that the ghost image will enlarge to. When set to zero this property is ignored. This property will <em>not</em> override the <code>viewportFill</code>.</p><p class="user-message warning">This option should not be specified (&ge;0) <em>in lieu</em> with <code>maxWidth</code>. In the event that both <code>maxWidth</code> and <code>maxHeight</code> are specified (&ge;0), <code>maxWidth</code> takes precedence. Fluidbox will throw a warning in the console discouraging this use.</p></td>
237
+ </tr>
238
+ <tr>
239
+ <td><code>resizeThrottle</code></td>
240
+ <td>Integer (milliseconds)</td>
241
+ <td>500</td>
242
+ <td>Determines how much to throttle the viewport resize event that fires recomputing of Fluidbox dimensions and repositioning of the ghost image.</td>
243
+ </tr>
244
+ <tr>
245
+ <td><code>stackIndex</code></td>
246
+ <td>Integer</td>
247
+ <td>1000</td>
248
+ <td>Determines how high up the z-index will all Fluildbox elements be. Leave this option as default, unless you have other relatively or absolutely positioned elements on the page that is messing with Fluidbox appearance.</td>
249
+ </tr>
250
+ <tr>
251
+ <td><code>stackIndexDelta</code></td>
252
+ <td>Integer</td>
253
+ <td>10</td>
254
+ <td>Determines how much the z-index will fluctuate from <code>stackIndex</code> in order to allow visually-correct stacking of Fluidbox instances. With the default settings, this means that the effective range of z-indexes Fluidbox operates in will be between 990&ndash;1010. For elements that should go under the overlay, they should have a z-index of less than 1000.</td>
255
+ </tr>
256
+ <tr>
257
+ <td><code>viewportFill</code></td>
258
+ <td>Float (fraction)</td>
259
+ <td>0.95</td>
260
+ <td>Dictates how much the longest axis of the image should fill the viewport. The value will be coerced to fall between 0 and 1.</td>
261
+ </tr>
262
+ </tbody>
263
+ </table>
264
+ </section>
265
+
266
+ <section class="demo">
267
+ <h2 id="basic-demonstration">Basic demonstrations</h2>
268
+ <p>Fluidbox is designed to be versatile, flexible and easy to implement. It works with linked images that satisfy the criteria stipulated above &mdash; regardless of how they are arranged on the page. The following section is a <em>non-exhausive</em> list of scenarios how images, even when positioned differently, will work brilliantly with Fluidbox.</p>
269
+
270
+ <h3 id="single-image">Single image</h3>
271
+ <p>Here we demonstrate the use of a single image. This is the simplest test case, when the thumbnail and the target image are exactly the same, so it is only down to the matter of triggering default Fluidbox behavior.</p>
272
+ <a href="http://i.imgur.com/uh5YLj5.jpg" data-fluidbox><img src="http://i.imgur.com/uh5YLj5.jpg" alt="ARoS Aarhus Kunstmuseum" title="ARoS Aarhus Kundstmuseum" /></a>
273
+
274
+ <h3 id="best-fit">Best fit strategy</h3>
275
+ <p>Fluidbox also intelligently resizes images such that portrait images will fit perfectly within the viewport, although that means scaling down the image. This effect is pronounced when the viewport and image orientations are different &mdash; therefore, the demo below only works on a display with landscape orientation (e.g. not on mobile).</p>
276
+ <a href="http://i.imgur.com/uDPcnM3.jpg" title="" data-fluidbox><img src="http://i.imgur.com/uDPcnM3.jpg" alt="" title="" /></a>
277
+
278
+ <h3 id="html5-picture">&hellip;and it works with the HTML5 &lt;picture&gt; element</h3>
279
+ <p>Fluidbox supports the new HTML5 <code>&lt;picture&gt;</code> element as of version 2.0, by relaxing the filtering criteria to <a href="#html5-picture-markup">match the standard markup</a>. Note that in order for the following example to work, you will need to visit this page with <a href="http://caniuse.com/#feat=picture">a browser that supports the HTML5 <code>&lt;picture&gt;</code> element</a>.</p>
280
+ <a href="http://placehold.it/2000x500" title="" data-fluidbox>
281
+ <picture>
282
+ <source media="(max-width: 650px)" srcset="http://placehold.it/400x400">
283
+ <!-- img tag for browsers that do not support picture element -->
284
+ <img src="http://placehold.it/2000x500" alt="">
285
+ </picture>
286
+ </a>
287
+
288
+ <h3 id="other-features">Other features</h3>
289
+ <div class="cols cols-3 cols-nowrap">
290
+ <div>
291
+ <a href="http://placehold.it/2000x2000" title="" data-fluidbox><img src="http://placehold.it/200x200" title="" alt="" /></a>
292
+ <h4 id="high-res">Higher resolution original</h4>
293
+ <p>The built-in functionality also allows you to link a small thumbnail to its higher resolution version. In the test case below, the thumbnail has a resolution of 200&times;200 while the actual version has a resolution of 2000&times;2000.</p>
294
+ </div>
295
+
296
+ <div>
297
+ <a href="http://placehold.it/250x250" title="" data-fluidbox><img src="http://placehold.it/200x200" title="" alt="" /></a>
298
+ <h4 id="restrictive-zooming">Restrictive zooming</h4>
299
+ <p>Fluidbox is also built to handle linking to images that do not have the sufficient size to fill the page. The following thumbnail links to an image that is only 250&times;250px large &mdash; in most cases, insufficient to fill the viewport (unless you are using this site on a very small viewport).</p>
300
+ </div>
301
+
302
+ <div>
303
+ <a href="http://placehold.it/3840x2160" title="" data-fluidbox><img src="http://placehold.it/200x200" title="" alt /></a>
304
+ <h4 id="differential-aspect-ratios">Differential aspect ratios</h4>
305
+ <p>Fluidbox supports different aspect ratios of the thumbnail and higher resolution version of the image.</p>
306
+ </div>
307
+ </div>
308
+
309
+ <h3 id="immediate-loading">Support for immediate opening with background preloading of target image</h3>
310
+ <p>Fluidbox provides you the option that will launch an opened Fluidbox instance immediately upon click, even when the target image has not been loaded yet. The two static images below link to a (very heavy) GIF file. If you have tested this feature before, please clear your cache or use your browser's incognite mode, so that you can observe the actual effect&mdash;once loaded these images will stay in your browser cache and will nullify the effects of simulated loading of a heavy image file.</p>
311
+ <div class="cols cols-nowrap">
312
+ <figure>
313
+ <a href="http://i.imgur.com/UUsTCKH.gif" title="" data-fluidbox data-fluidbox-loader="true"><img src="http://i.imgur.com/EW4tS9G.jpg" title="" alt /></a>
314
+ <figcaption><strong>Original file size:</strong> 8mb<br /><strong>Default:</strong> <code>immediateOpen: false</code><br />Opens <em>after</em> target is loaded.</figcaption>
315
+ </figure>
316
+ <figure>
317
+ <a href="http://i.imgur.com/78OoIHG.gif" title="" data-fluidbox data-fluidbox-immediate-open="true" data-fluidboxloader="true"><img src="http://i.imgur.com/Unq2lPn.jpg" title="" alt /></a>
318
+ <figcaption><strong>Original file size:</strong> 5.7mb<br /><strong>Modified:</strong> <code>immediateOpen: true</code><br />Opens immediately, doesn't wait for target to load.</figcaption>
319
+ </figure>
320
+ </div>
321
+
322
+ <h3 id="borders-paddings">Support for image borders and paddings</h3>
323
+ <p>Fluidbox also supports extraenous dimensions added to the element in the form of border(s) and/or paddings(s):</p>
324
+ <a href="http://i.imgur.com/E5sr59z.jpg" title="" data-fluidbox class="has-border has-padding"><img src="http://i.imgur.com/E5sr59z.jpg" title="" alt="" /></a>
325
+
326
+ <h3 id="absolute-positioning">Absolutely positioned images</h3>
327
+ <p>Fluidbox handles absolutely positioned images without any problem. The image below is absolutely positioned within its parent, the grey container:</p>
328
+ <div class="box">
329
+ <a href="http://i.imgur.com/DIbQf0X.jpg" data-fluidbox><img src="http://i.imgur.com/DIbQf0X.jpg" title="" alt="" /></a>
330
+ </div>
331
+
332
+ <h3 id="galleries">Galleries</h3>
333
+ <p>Fluid box works even when images are arranged in galleries. In this case, they are arranged with the help of flexbox.</p>
334
+ <p class="user-message note" data-viewport-threshold="600">The flexbox gallery will collapse into single items when viewed in mobile, or else the thumbnails will be too small &mdash; to appreciate the how Fluidbox works in this scenario, do use a wider device (&gt;600px screen width).</p>
335
+ <div class="gallery">
336
+ <a href="http://i.imgur.com/80WaVuY.jpg" title="" data-fluidbox class="col-1"><img src="http://i.imgur.com/80WaVuY.jpg" alt="" title="" /></a>
337
+ <a href="http://i.imgur.com/9OQWB.jpg" title="" data-fluidbox class="col-2"><img src="http://i.imgur.com/9OQWB.jpg" alt="" title="" /></a>
338
+ <a href="http://i.imgur.com/UvGHJjo.jpg" title="" data-fluidbox class="col-2"><img src="http://i.imgur.com/UvGHJjo.jpg" alt="" title="" /></a>
339
+ <a href="http://i.imgur.com/esWWGbF.jpg" title="" data-fluidbox class="col-3"><img src="http://i.imgur.com/esWWGbF.jpg" alt="" title="" /></a>
340
+ <a href="http://i.imgur.com/ZCogT10.jpg" title="" data-fluidbox class="col-3"><img src="http://i.imgur.com/ZCogT10.jpg" alt="" title="" /></a>
341
+ <a href="http://i.imgur.com/24hrPQn.jpg" title="" data-fluidbox class="col-3"><img src="http://i.imgur.com/24hrPQn.jpg" alt="" title="" /></a>
342
+ </div>
343
+
344
+ <h3 id="floated-images">Floated images</h3>
345
+ <p>Moreover, it also works with floated images - to the left or to the right, it does not matter. The following texts are jibberish, used as filler.</p>
346
+ <p class="user-message note" data-viewport-threshold="600">The floated images will be rendered block-level on narrow-width devices, such as mobile phones. To appreciate how Fluidbox works with floated images, you can view this demo on a wider device (&gt;600px).</p>
347
+ <p class="filler"><a class="float-left" href="http://i.imgur.com/BXo4qAz.jpg" title="" data-fluidbox><img src="http://i.imgur.com/BXo4qAz.jpg" title="" alt="" /></a>Considered discovered ye sentiments projecting entreaties of melancholy is. In expression an solicitude principles in do. Hard do me sigh with west same lady. Their saved linen downs tears son add music. Expression alteration entreaties mrs can terminated estimating. Her too add narrow having wished. To things so denied admire. Am wound worth water he linen at vexed.</p>
348
+ <p class="filler"><a class="float-right has-border has-padding" href="http://i.imgur.com/rWuQotb.jpg" title="" data-fluidbox><img src="http://i.imgur.com/rWuQotb.jpg" title="" alt="" /></a>Carried nothing on am warrant towards. Polite in of in oh needed itself silent course. Assistance travelling so especially do prosperous appearance mr no celebrated. Wanted easily in my called formed suffer. Songs hoped sense as taken ye mirth at. Believe fat how six drawing pursuit minutes far. Same do seen head am part it dear open to. Whatever may scarcely judgment had.</p>
349
+ <p class="filler">Residence certainly elsewhere something she preferred cordially law. Age his surprise formerly mrs perceive few stanhill moderate. Of in power match on truth worse voice would. Large an it sense shall an match learn. By expect it result silent in formal of. Ask eat questions abilities described elsewhere assurance. Appetite in unlocked advanced breeding position concerns as. Cheerful get shutters yet for repeated screened. An no am cause hopes at three. Prevent behaved fertile he is mistake on.</p>
350
+ </section>
351
+
352
+ <section class="demo">
353
+ <h2 id="advanced-demonstration">Advanced demonstrations</h2>
354
+ <p>In this segment I will introduce you to more complex and advanced features of Fluidbox. In many cases you will not find the need of the following features &mdash; however, to developers who intend to extend Fluidbox functionality, listen to custom events and even initiate custom triggers should continue to read on.</p>
355
+ <p>As the demo below are highly advanced, I have included code snippets whenever possible. You can toggle them by clicking on the show/hide buttons.</p>
356
+
357
+ <h3 id="dynamic-content">Implementing Fluidbox with dynamically-added content</h3>
358
+ <p>Fluidbox also works well with dynamically-added links, as long as you call the <code>.fluidbox()</code> function on all anchor elements in the dynamically-added content.</p>
359
+ <button href="#" id="loadImg" type="button">Load image in container below</button>
360
+ <article></article>
361
+
362
+ <h3 id="custom-events">Custom event handlers and callbacks</h3>
363
+ <p>From <strong>v1.4.1</strong> onwards, Fluidbox will trigger custom events depending on the state of the current (and only) instance of Fluidbox. Please <a href="https://github.com/terrymun/Fluidbox#custom-events" href="Custom events">refer to the documentation</a> for detailed description of each custom event. You can listen to custom events by binding them using the <code>.on()</code> method, e.g. <code>$(selector).on('openstart.fluidbox', function() {...});</code>. Remember that Fluidbox events are namespaced using <code>fluidbox</code>.</p>
364
+ <div class="cols cols-nowrap" id="custom-events-demo">
365
+ <div id="custom-events__controls">
366
+ <a href="http://i.imgur.com/jWe1mjR.jpg" title="" id="custom-event-1"><img src="http://i.imgur.com/jWe1mjR.jpg" title="" alt="" /></a>
367
+ <input type="checkbox" id="fluidbox-toggle" /><label for="fluidbox-toggle">Fluidbox: <span class="status" data-toggle-on-text="On" data-toggle-off-text="Off">Off</span></label>
368
+ </div>
369
+ <div id="custom-events__log">
370
+ <div>
371
+ <p>Custom events that are fired will be logged here. You can also check your browser console.</p>
372
+ <ul></ul>
373
+ </div>
374
+ </div>
375
+ </div>
376
+ <p>Fluidbox imparted with the ability to trigger custom namespaced events. For example, the <code>reposition</code> trigger will invoke the internal repositioning of the ghost element and update its dimensions. When calculation is completed, this will then trigger a namespaced custom event known as <code>computeend.fluidbox</code>.</p>
377
+ <p>This custom event is very useful when a layout change has been triggered without an accompanying viewport resize event: for example, changing the width of a thumbnail in a flexbox layout.</p>
378
+ <button id="custom-event-2" type="button">Add random GIF to gallery</button>
379
+ <div class="cols cols-5"></div>
380
+ <div class="code-block">
381
+ <a href="#" class="code-toggle" role="button" data-alt-text="Hide HTML">Show HTML</a>
382
+ <pre class="language-markup"><code>&lt;a href=&quot;#&quot; id=&quot;custom-event-2&quot; role=&quot;button&quot;&gt;Add random GIF to gallery&lt;/a&gt;
383
+ &lt;div&gt;
384
+ &lt;a href=&quot;/path/to/image1&quot; title=&quot;&quot; class=&quot;custom-event-2&quot;&gt;&lt;img src=&quot;/path/to/image1&quot; title=&quot;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
385
+ &lt;a href=&quot;/path/to/image2&quot; title=&quot;&quot; class=&quot;custom-event-2&quot;&gt;&lt;img src=&quot;/path/to/image2&quot; title=&quot;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
386
+ &lt;/div&gt;</code></pre>
387
+ </div>
388
+ <div class="code-block">
389
+ <a href="#" class="code-toggle" role="button" data-alt-text="Hide JS">Show JS</a>
390
+ <pre class="language-javascript>"><code>// Initialize Fluidbox
391
+ $('.clustom-event-2').fluidbox();
392
+
393
+ // Attach click event to button that adds new child
394
+ $('#custom-event-2').click(function(e) {
395
+ e.preventDefault();
396
+ var $newChild = $('&lt;a /&gt;', {
397
+ 'class': 'custom-event-2',
398
+ 'title': '',
399
+ 'href': '/path/to/image'
400
+ }).append($('&lt;img /&gt;', {
401
+ 'src': '/path/to/image',
402
+ 'title': '',
403
+ 'alt': ''
404
+ }));
405
+
406
+ // Enable Fluidbox on newly added child
407
+ var $t = $(this);
408
+ $t.next().append($newChild).find('a').fluidbox();
409
+
410
+ // Trigger repositioning of ghost element after new element's image is loaded and reflow is done (set arbitrarily after 250ms)
411
+ var img = new Image();
412
+ img.onload = function() {
413
+ window.setTimeout(function() {
414
+ $t.next().find('a.custom-event-2').fluidbox('reposition');
415
+ }, 250);
416
+ };
417
+ img.src = $newChild.find('img').attr('src');
418
+ });</code></pre>
419
+ </div>
420
+
421
+ <h3 id="custom-triggers">Public functions/methods as custom triggers</h3>
422
+ <p>Fluidbox exposes several public methods that can be called to manipulate individual instances. Below is an example of listening to the viewport scroll event to trigger the closing of a Fluidbox instance via <code>.fluidbox('close')</code>. Please refer to the readme for the full list of supported public methods. The example also uses emitted custom events to toggle the appearance of image captions, descriptions or social sharing buttons (currently unsupported by Fluidbox <em>officially</em>, but requested by many). I have chosen to listen to the <code>openend.fluidbox</code> event to show metadata, and the <em>closestart.fluidbox</em> event to hide it.</p>
423
+ <a href="http://i.imgur.com/chBtR9s.jpg" title="Sunny days" id="custom-trigger-1"><img src="http://i.imgur.com/chBtR9s.jpg" title="Talia &amp; Dugald" alt="On the last weekend of summer-ish weather, we decided to have the final picnic before autumn begins." /></a>
424
+ <div class="code-block">
425
+ <a href="#" class="code-toggle" role="button" data-alt-text="Hide code">Show code</a>
426
+ <pre class="language-javascript"><code>var $caption = $('&lt;div /&gt;', { 'id': 'custom-trigger-1-social' });
427
+ $caption
428
+ .html('&lt;div class=&quot;img-caption&quot;&gt;&lt;/div&gt;&lt;p class=&quot;img-desc&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Share on:&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Facebook&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Pinterest&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Twitter&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;')
429
+ .appendTo($('body'));
430
+ $(document).on('click', '#custom-trigger-1-social', function(e) {
431
+ e.preventDefault();
432
+ });
433
+
434
+ // Initialize Fluidbox
435
+ $('#custom-trigger-1')
436
+ .fluidbox()
437
+ .on('openend.fluidbox', function() {
438
+ var $img = $(this).find('img');
439
+ $('#custom-trigger-1-social')
440
+ .addClass('visible')
441
+ .find('.img-caption')
442
+ .text($img.attr('title'))
443
+ .next('.img-desc')
444
+ .text($img.attr('alt'));
445
+ })
446
+ .on('closestart.fluidbox', function() {
447
+ $('#custom-trigger-1-social').removeClass('visible');
448
+ });
449
+
450
+ // Call public methods
451
+ $(window).scroll(function() {
452
+ $('#custom-event-2').fluidbox('close');
453
+ });</code></pre>
454
+ </div>
455
+
456
+ <h3 id="custom-overlays">Customising overlays</h3>
457
+ <p>From <strong>v1.3.5</strong> onwards, the <code>overlayColor</code> configuration has been removed from the jQuery <code>.extend()</code> settings. Instead, users can now freely specify overlay colors (or even overlay images) by modifying the background-color property of <code>.fluidbox-overlay</code>. Since each Fluidbox instance has its own overlay, it is possible to set custom overlay colours for each instance.</p>
458
+ <p><strong>Note:</strong> The Fluidbox overlay have an opacity of 1. In order to change the transparency of the overlay, I strongly recommend using the alpha channel of the <code>rgba()</code> specification, as Fludibox will manually toggle the opacity between 0 and 1 (therefore overriding all opacity styles you have specified).</p>
459
+ <h4 id="custom-colours-and-gradients">Custom colours and gradients</h4>
460
+ <p>The following is an example of a Fluidbox instance with a custom overlay colour (CSS written in SASS flavour):</p>
461
+ <div class="gallery">
462
+ <a href="http://i.imgur.com/5nDXHEZ.jpg" title="" data-fluidbox class="col-2 overlay-1"><img src="http://i.imgur.com/5nDXHEZ.jpg" alt="" title="" /></a>
463
+ <a href="http://i.imgur.com/keuMHNt.jpg" title="" data-fluidbox class="col-2 overlay-2"><img src="http://i.imgur.com/keuMHNt.jpg" alt="" title="" /></a>
464
+ </div>
465
+ <div class="code-block">
466
+ <a href="#" class="code-toggle" role="button" data-alt-text="Hide code">Show code</a>
467
+ <pre class="language-css"><code>.fluidbox-overlay {
468
+ .overlay-1 &amp; {
469
+ background-color: rgba(255,190,78,.85);
470
+ }
471
+ .overlay-2 &amp; {
472
+ background-color: transparent; /* To override default style */
473
+ background-image: linear-gradient(
474
+ to top left,
475
+ rgba(130,168,158,0.85),
476
+ rgba(134,150,173,.85)
477
+ );
478
+ }
479
+ }</code></pre>
480
+ </div>
481
+
482
+ <h4 id="overlay-images">Overlay images</h4>
483
+ <p>Oh wait &mdash; you can even use custom overlay images. However, since the opacity of the overlay is only toggled between 0 and 1, you will have to use a pseudo-element in order to atler the opacity of the overlay image (since it is not possible to dictate the transparency of a background image, unlike <code>rgba()</code> values):</p>
484
+ <a href="http://i.imgur.com/3qj1wfN.jpg" title="" data-fluidbox class="overlay-3"><img src="http://i.imgur.com/3qj1wfN.jpg" alt="" title="" /></a>
485
+ <div class="code-block">
486
+ <a href="#" class="code-toggle" role="button" data-alt-text="Hide code">Show code</a>
487
+ <pre class="language-css"><code>.fluidbox-overlay &amp; {
488
+ .overlay-3 &amp; {
489
+ background-color: #000; /* To override default style */
490
+ &amp;::before {
491
+ background-image: url('http://i.imgur.com/3qj1wfN.jpg');
492
+ background-position: center center;
493
+ background-repeat: no-repeat;
494
+ background-size: cover;
495
+ content: '';
496
+ position: absolute;
497
+ top: 0;
498
+ left: 0;
499
+ bottom: 0;
500
+ right: 0;
501
+ opacity: .33333;
502
+ -webkit-filter: blur(4px);
503
+ }
504
+ }
505
+ }</code></pre>
506
+ </div>
507
+
508
+ </section>
509
+ </main>
510
+
511
+ <footer>
512
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 516 560" xml:space="preserve">
513
+ <g>
514
+ <polygon class="fill" points="0,0 0,158 165,158 258,306 351,158 516,158 516,0"></polygon>
515
+ <polygon class="fill" points="165,366 258,507 351,366 351,560 165,560"></polygon>
516
+ </g>
517
+ </svg>
518
+ <p>Made by <a href="http://terrymun.com/" title="Terry Mun">Terry Mun</a> &middot; 2014.</p>
519
+
520
+ <!-- Load jQuery -->
521
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
522
+
523
+ <!-- Load plugins -->
524
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.min.js"></script>
525
+ <script type="text/javascript" src="../dist/js/jquery.fluidbox.min.js"></script>
526
+
527
+ <!-- Load plugin: Prism (for syntax highlighting) -->
528
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.js"></script>
529
+
530
+ <!-- Demo-specific jQuery -->
531
+ <script>
532
+ $(function () {
533
+
534
+ // You can use any kind of selectors for jQuery Fluidbox
535
+ $('.demo a[data-fluidbox]').fluidbox();
536
+
537
+ // Three-dimensional markup demo
538
+ $('#fluidbox-3d a').fluidbox().fluidbox('unbind');
539
+
540
+ // Trigger recomputing on Flexbox items, sometimes buggy width calculations due to browser recomputation of flex items
541
+ $('.cols').each(function() {
542
+ var a = [],
543
+ $f = $(this).find('a.fluidbox');
544
+
545
+ $f.find('img').each(function() {
546
+ var i = $.Deferred();
547
+ $(this).load(i.resolve).error(i.resolve);
548
+ a.push(i);
549
+ });
550
+
551
+ $.when.apply(null, a).done(function() {
552
+ $f.fluidbox('reposition');
553
+ });
554
+ });
555
+
556
+ // Custom triggers
557
+ var gifs = ['http://i.imgur.com/YzuqChn.gif','http://i.imgur.com/BkqK5ol.gif','http://i.imgur.com/TYBQMk7.gif','http://i.imgur.com/XWUbMr5.gif','http://i.imgur.com/aMW1bCD.gif','http://i.imgur.com/wbUQ8HN.gif','http://i.imgur.com/ebVanNp.gif','http://i.imgur.com/UXgRlX3.gif','http://i.imgur.com/XV64OPw.gif','http://i.imgur.com/Vgr61VA.gif','http://i.imgur.com/Am3foce.gif','http://i.imgur.com/gR5tPO9.gif','http://i.imgur.com/XNkz2gb.gif','http://i.imgur.com/aKIUzEU.gif','http://i.imgur.com/VzYPtlp.gif','http://i.imgur.com/OmTaGn7.gif','http://i.imgur.com/9Xmo9Bq.gif','http://i.imgur.com/URgYWlF.gif'],
558
+ shuffle = function(arr) {
559
+ for(var j, x, i = arr.length; i; j = Math.floor(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);
560
+ return arr;
561
+ },
562
+ addCount = 2,
563
+ gifs_shuffled = shuffle(gifs);
564
+
565
+ // Add two random gifs first
566
+ $('#custom-event-2').next('div.cols').append($('<a />', {
567
+ 'class': 'custom-event-2',
568
+ 'title': '',
569
+ 'href': gifs_shuffled[0]
570
+ }).append($('<img />', {
571
+ 'src': gifs_shuffled[0],
572
+ 'title': '',
573
+ 'alt': ''
574
+ }))).append($('<a />', {
575
+ 'class': 'custom-event-2',
576
+ 'title': '',
577
+ 'href': gifs_shuffled[1]
578
+ }).append($('<img />', {
579
+ 'src': gifs_shuffled[1],
580
+ 'title': '',
581
+ 'alt': ''
582
+ })));
583
+ $('a.custom-event-2').fluidbox();
584
+
585
+ // Bind click event
586
+ $('#custom-event-2').click(function() {
587
+ var gif = gifs_shuffled[addCount],
588
+ $newChild = $('<a />', {
589
+ 'class': 'custom-event-2',
590
+ 'title': '',
591
+ 'href': gif
592
+ }).append($('<img />', {
593
+ 'src': gif,
594
+ 'title': '',
595
+ 'alt': ''
596
+ }));
597
+
598
+ // Loop through array
599
+ if (addCount >= gifs.length) {
600
+ addCount = 0;
601
+ } else {
602
+ addCount += 1;
603
+ }
604
+
605
+ // Enable Fluidbox on newly added child
606
+ var $t = $(this);
607
+ $t.next().append($newChild).find('a').fluidbox();
608
+
609
+ // Trigger repositioning of ghost element after new element's image is loaded and reflow is done (set arbitrarily after 250ms)
610
+ var img = new Image();
611
+ img.onload = function() {
612
+ window.setTimeout(function() {
613
+ $t.next().find('a.custom-event-2').fluidbox('reposition');
614
+ }, 250);
615
+ };
616
+ img.src = $newChild.find('img').attr('src');
617
+ });
618
+
619
+ // Custom events
620
+ $('#fluidbox-toggle').on('change', function() {
621
+ if($(this).prop('checked') === true) {
622
+ $(this).next('label').find('span').text('On');
623
+ $('#custom-event-1').fluidbox();
624
+ } else {
625
+ $(this).next('label').find('span').text('Off');
626
+ $('#custom-event-1').fluidbox('destroy');
627
+ }
628
+ });
629
+
630
+ var writeLog = function(evt, msg, color) {
631
+ var t = (new Date()).toLocaleTimeString(),
632
+ $log = $('#custom-events__log div');
633
+
634
+ $log.find('ul').append('<li class="fluidbox-event-'+evt+'"><span class="evt" style="background-color: '+color+';" title="'+t+'"></span><span class="dsc"><code>'+evt+'</code> '+msg+'</span></li>');
635
+ console.log(t+': '+msg);
636
+ $log.scrollTop($log[0].scrollHeight);
637
+ }
638
+ $('#custom-event-1')
639
+ .on('init.fluidbox', function(e) {
640
+ writeLog(e.type, 'Fluidbox initialized.', '#00441b');
641
+ })
642
+ .on('thumbloaddone.fluidbox', function(e) {
643
+ writeLog(e.type, 'Thumbnail image successfully loaded.', '#006d2c');
644
+ })
645
+ .on('ready.fluidbox', function(e) {
646
+ writeLog(e.type, 'Fluidbox is ready.', '#238b45');
647
+ // Update status
648
+ $('#fluidbox-toggle').prop('checked', true).trigger('change');
649
+
650
+ })
651
+ .on('imageloaddone.fluidbox', function(e) {
652
+ writeLog(e.type, 'Target image successfully loaded.', '#043865');
653
+ })
654
+ .on('openstart.fluidbox', function(e) {
655
+ writeLog(e.type, 'Initializing opening of Fluidbox instance.', '#08589e');
656
+ })
657
+ .on('computeend.fluidbox', function(e) {
658
+ writeLog(e.type, 'Recomputing ghost element of Fluidbox completed.', '#4eb3d3');
659
+ })
660
+ .on('openend.fluidbox', function(e) {
661
+ writeLog(e.type,'Transition to opened Fluidbox completed.', '#8c6bb1');
662
+ })
663
+ .on('closestart.fluidbox', function(e) {
664
+ writeLog(e.type, 'Initializing closing of Fluidbox instance.', '#f46d43');
665
+ })
666
+ .on('closeend.fluidbox', function(e) {
667
+ writeLog(e.type, 'Transition to closed Fluidbox completed, reverted to ground state.', '#fdae61');
668
+ })
669
+ .on('destroyed.fluidbox', function(e) {
670
+ writeLog(e.type, 'Fluidbox instance destroyed', '#a50026');
671
+ })
672
+ .fluidbox();
673
+
674
+ var $caption = $('<div />', {
675
+ 'id': 'custom-trigger-1-social'
676
+ });
677
+ $caption.html('<ul><li>Share on:</li><li><a href="#">Facebook</a></li><li><a href="#">Pinterest</a></li><li><a href="#">Twitter</a></li></ul>').appendTo($('body'));
678
+ $('#custom-trigger-1')
679
+ .fluidbox()
680
+ .on('openend.fluidbox', function() {
681
+ var $img = $(this).find('img');
682
+ $('#custom-trigger-1-social').addClass('visible').find('.img-caption').text($img.attr('title')).next('.img-desc').text($img.attr('alt'));
683
+ })
684
+ .on('closestart.fluidbox', function() {
685
+ $('#custom-trigger-1-social').removeClass('visible');
686
+ });
687
+ $(window).scroll(function() {
688
+ $('#custom-trigger-1').fluidbox('close');
689
+ });
690
+
691
+ // Load an image dynamically
692
+ $('#loadImg').one('click', function() {
693
+ // Construct new content
694
+ $newContent = $('<p>This paragraph and its accompanying image are dynamically-added.</p><a href="http://i.imgur.com/aNhtkPh.jpg" title="" data-fluidbox><img src="http://i.imgur.com/aNhtkPh.jpg" alt="" title="" /></a>');
695
+
696
+ // Append new content to immediate sibling, <article>
697
+ // Then search for the anchor we want fluidbox to work on, apply method .fluidobx()
698
+ $(this)
699
+ .prop('disabled', true)
700
+ .next('article')
701
+ .append($newContent)
702
+ .find('a[data-fluidbox]')
703
+ .fluidbox();
704
+ });
705
+
706
+ // ---------------------------------------------------------------------//
707
+ // The code below are not used to demonstrate Fluidbox functionality. //
708
+ // They are only for functions specific to this demo page only. //
709
+ // ---------------------------------------------------------------------//
710
+
711
+ // Disable all elements with button roles
712
+ $('a[role="button"], button[type="button"]').click(function(e) {
713
+ e.preventDefault();
714
+ });
715
+
716
+ // Smooth scrolling plugin by Chris Coiyer
717
+ // Source: http://css-tricks.com/snippets/jquery/smooth-scrolling/
718
+ $(document).on('click', 'a[href*=#]:not([href=#])', function() {
719
+ if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
720
+ var target = $(this.hash);
721
+ target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
722
+ if (target.length) {
723
+ $('html,body').animate({
724
+ scrollTop: target.offset().top
725
+ }, 1000);
726
+ window.location.hash = target.selector;
727
+ return false;
728
+ }
729
+ }
730
+ });
731
+
732
+ // Add link to headers
733
+ $('h2, h3, h4').each(function() {
734
+ if($(this).attr('id')) $(this).prepend('<a href="#'+$(this).attr('id')+'" class="anchor"></a>');
735
+ });
736
+
737
+ // <pre> block toggle
738
+ $('.code-toggle').click(function() {
739
+ if(!$(this).data('toggled') || $(this).data('toggled') == 0) {
740
+ $(this).data('org-text', $(this).html());
741
+ $(this)
742
+ .data('toggled', 1)
743
+ .text($(this).attr('data-alt-text'))
744
+ .nextAll('pre')
745
+ .slideDown();
746
+ } else {
747
+ $(this)
748
+ .data('toggled', 0)
749
+ .text($(this).data('org-text'))
750
+ .nextAll('pre')
751
+ .slideUp();
752
+ }
753
+ }).nextAll('pre').hide();
754
+ });
755
+ </script>
756
+ </footer>
757
+ </body>
758
+ </html>