jekyll-chalk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -0
  3. data/README.md +89 -0
  4. data/_includes/footer.html +7 -0
  5. data/_includes/head.html +33 -0
  6. data/_includes/image.html +3 -0
  7. data/_includes/javascripts.html +21 -0
  8. data/_includes/navigation.html +75 -0
  9. data/_layouts/articles_by_tag.html +38 -0
  10. data/_layouts/default.html +16 -0
  11. data/_layouts/page.html +5 -0
  12. data/_layouts/post.html +71 -0
  13. data/assets/bower/fluidbox/.bower.json +44 -0
  14. data/assets/bower/fluidbox/Gruntfile.js +8 -0
  15. data/assets/bower/fluidbox/LICENSE.md +23 -0
  16. data/assets/bower/fluidbox/README.md +396 -0
  17. data/assets/bower/fluidbox/bower.json +35 -0
  18. data/assets/bower/fluidbox/demo/css/styles.min.css +2 -0
  19. data/assets/bower/fluidbox/demo/css/styles.min.css.map +1 -0
  20. data/assets/bower/fluidbox/demo/fonts/BLOKKRegular.eot +0 -0
  21. data/assets/bower/fluidbox/demo/fonts/BLOKKRegular.svg +233 -0
  22. data/assets/bower/fluidbox/demo/fonts/BLOKKRegular.ttf +0 -0
  23. data/assets/bower/fluidbox/demo/fonts/BLOKKRegular.woff +0 -0
  24. data/assets/bower/fluidbox/demo/fonts/fontello.eot +0 -0
  25. data/assets/bower/fluidbox/demo/fonts/fontello.svg +13 -0
  26. data/assets/bower/fluidbox/demo/fonts/fontello.ttf +0 -0
  27. data/assets/bower/fluidbox/demo/fonts/fontello.woff +0 -0
  28. data/assets/bower/fluidbox/demo/index.html +758 -0
  29. data/assets/bower/fluidbox/demo/src/css/styles.scss +1131 -0
  30. data/assets/bower/fluidbox/dist/css/fluidbox.min.css +2 -0
  31. data/assets/bower/fluidbox/dist/css/fluidbox.min.css.map +1 -0
  32. data/assets/bower/fluidbox/dist/js/jquery.fluidbox.min.js +1 -0
  33. data/assets/bower/fluidbox/grunt/aliases.yaml +20 -0
  34. data/assets/bower/fluidbox/grunt/clean.js +5 -0
  35. data/assets/bower/fluidbox/grunt/concurrent.js +33 -0
  36. data/assets/bower/fluidbox/grunt/jshint.js +10 -0
  37. data/assets/bower/fluidbox/grunt/postcss.js +47 -0
  38. data/assets/bower/fluidbox/grunt/sass.js +42 -0
  39. data/assets/bower/fluidbox/grunt/uglify.js +7 -0
  40. data/assets/bower/fluidbox/grunt/watch.js +28 -0
  41. data/assets/bower/fluidbox/index.html +8 -0
  42. data/assets/bower/fluidbox/license.txt +21 -0
  43. data/assets/bower/fluidbox/src/css/_fluidbox.scss +95 -0
  44. data/assets/bower/fluidbox/src/css/fluidbox.scss +2 -0
  45. data/assets/bower/fluidbox/src/js/jquery.fluidbox.js +722 -0
  46. data/assets/bower/jquery/.bower.json +25 -0
  47. data/assets/bower/jquery/AUTHORS.txt +295 -0
  48. data/assets/bower/jquery/LICENSE.txt +36 -0
  49. data/assets/bower/jquery/README.md +65 -0
  50. data/assets/bower/jquery/bower.json +14 -0
  51. data/assets/bower/jquery/dist/core.js +482 -0
  52. data/assets/bower/jquery/dist/jquery.js +10220 -0
  53. data/assets/bower/jquery/dist/jquery.min.js +4 -0
  54. data/assets/bower/jquery/dist/jquery.min.map +1 -0
  55. data/assets/bower/jquery/dist/jquery.slim.js +8107 -0
  56. data/assets/bower/jquery/dist/jquery.slim.min.js +4 -0
  57. data/assets/bower/jquery/dist/jquery.slim.min.map +1 -0
  58. data/assets/bower/jquery/external/sizzle/LICENSE.txt +36 -0
  59. data/assets/bower/jquery/external/sizzle/dist/sizzle.js +2272 -0
  60. data/assets/bower/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  61. data/assets/bower/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  62. data/assets/bower/jquery/src/.eslintrc.json +18 -0
  63. data/assets/bower/jquery/src/ajax.js +855 -0
  64. data/assets/bower/jquery/src/ajax/jsonp.js +102 -0
  65. data/assets/bower/jquery/src/ajax/load.js +76 -0
  66. data/assets/bower/jquery/src/ajax/parseXML.js +30 -0
  67. data/assets/bower/jquery/src/ajax/script.js +77 -0
  68. data/assets/bower/jquery/src/ajax/var/location.js +5 -0
  69. data/assets/bower/jquery/src/ajax/var/nonce.js +7 -0
  70. data/assets/bower/jquery/src/ajax/var/rquery.js +5 -0
  71. data/assets/bower/jquery/src/ajax/xhr.js +169 -0
  72. data/assets/bower/jquery/src/attributes.js +13 -0
  73. data/assets/bower/jquery/src/attributes/attr.js +140 -0
  74. data/assets/bower/jquery/src/attributes/classes.js +174 -0
  75. data/assets/bower/jquery/src/attributes/prop.js +143 -0
  76. data/assets/bower/jquery/src/attributes/support.js +33 -0
  77. data/assets/bower/jquery/src/attributes/val.js +188 -0
  78. data/assets/bower/jquery/src/callbacks.js +234 -0
  79. data/assets/bower/jquery/src/core.js +482 -0
  80. data/assets/bower/jquery/src/core/DOMEval.js +16 -0
  81. data/assets/bower/jquery/src/core/access.js +70 -0
  82. data/assets/bower/jquery/src/core/init.js +127 -0
  83. data/assets/bower/jquery/src/core/parseHTML.js +65 -0
  84. data/assets/bower/jquery/src/core/ready-no-deferred.js +105 -0
  85. data/assets/bower/jquery/src/core/ready.js +95 -0
  86. data/assets/bower/jquery/src/core/readyException.js +13 -0
  87. data/assets/bower/jquery/src/core/stripAndCollapse.js +14 -0
  88. data/assets/bower/jquery/src/core/support.js +20 -0
  89. data/assets/bower/jquery/src/core/var/rsingleTag.js +6 -0
  90. data/assets/bower/jquery/src/css.js +426 -0
  91. data/assets/bower/jquery/src/css/addGetHookIf.js +26 -0
  92. data/assets/bower/jquery/src/css/adjustCSS.js +71 -0
  93. data/assets/bower/jquery/src/css/curCSS.js +59 -0
  94. data/assets/bower/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  95. data/assets/bower/jquery/src/css/showHide.js +105 -0
  96. data/assets/bower/jquery/src/css/support.js +89 -0
  97. data/assets/bower/jquery/src/css/var/cssExpand.js +5 -0
  98. data/assets/bower/jquery/src/css/var/getStyles.js +17 -0
  99. data/assets/bower/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  100. data/assets/bower/jquery/src/css/var/rmargin.js +5 -0
  101. data/assets/bower/jquery/src/css/var/rnumnonpx.js +7 -0
  102. data/assets/bower/jquery/src/css/var/swap.js +26 -0
  103. data/assets/bower/jquery/src/data.js +179 -0
  104. data/assets/bower/jquery/src/data/Data.js +161 -0
  105. data/assets/bower/jquery/src/data/var/acceptData.js +19 -0
  106. data/assets/bower/jquery/src/data/var/dataPriv.js +7 -0
  107. data/assets/bower/jquery/src/data/var/dataUser.js +7 -0
  108. data/assets/bower/jquery/src/deferred.js +389 -0
  109. data/assets/bower/jquery/src/deferred/exceptionHook.js +21 -0
  110. data/assets/bower/jquery/src/deprecated.js +30 -0
  111. data/assets/bower/jquery/src/dimensions.js +56 -0
  112. data/assets/bower/jquery/src/effects.js +693 -0
  113. data/assets/bower/jquery/src/effects/Tween.js +123 -0
  114. data/assets/bower/jquery/src/effects/animatedSelector.js +15 -0
  115. data/assets/bower/jquery/src/event.js +745 -0
  116. data/assets/bower/jquery/src/event/ajax.js +22 -0
  117. data/assets/bower/jquery/src/event/alias.js +29 -0
  118. data/assets/bower/jquery/src/event/focusin.js +55 -0
  119. data/assets/bower/jquery/src/event/support.js +11 -0
  120. data/assets/bower/jquery/src/event/trigger.js +185 -0
  121. data/assets/bower/jquery/src/exports/amd.js +26 -0
  122. data/assets/bower/jquery/src/exports/global.js +34 -0
  123. data/assets/bower/jquery/src/jquery.js +41 -0
  124. data/assets/bower/jquery/src/manipulation.js +486 -0
  125. data/assets/bower/jquery/src/manipulation/_evalUrl.js +23 -0
  126. data/assets/bower/jquery/src/manipulation/buildFragment.js +104 -0
  127. data/assets/bower/jquery/src/manipulation/getAll.js +31 -0
  128. data/assets/bower/jquery/src/manipulation/setGlobalEval.js +22 -0
  129. data/assets/bower/jquery/src/manipulation/support.js +35 -0
  130. data/assets/bower/jquery/src/manipulation/var/rcheckableType.js +5 -0
  131. data/assets/bower/jquery/src/manipulation/var/rscriptType.js +5 -0
  132. data/assets/bower/jquery/src/manipulation/var/rtagName.js +5 -0
  133. data/assets/bower/jquery/src/manipulation/wrapMap.js +29 -0
  134. data/assets/bower/jquery/src/offset.js +232 -0
  135. data/assets/bower/jquery/src/queue.js +145 -0
  136. data/assets/bower/jquery/src/queue/delay.js +24 -0
  137. data/assets/bower/jquery/src/selector-native.js +237 -0
  138. data/assets/bower/jquery/src/selector-sizzle.js +19 -0
  139. data/assets/bower/jquery/src/selector.js +3 -0
  140. data/assets/bower/jquery/src/serialize.js +130 -0
  141. data/assets/bower/jquery/src/traversing.js +178 -0
  142. data/assets/bower/jquery/src/traversing/findFilter.js +106 -0
  143. data/assets/bower/jquery/src/traversing/var/dir.js +22 -0
  144. data/assets/bower/jquery/src/traversing/var/rneedsContext.js +8 -0
  145. data/assets/bower/jquery/src/traversing/var/siblings.js +17 -0
  146. data/assets/bower/jquery/src/var/ObjectFunctionString.js +7 -0
  147. data/assets/bower/jquery/src/var/arr.js +5 -0
  148. data/assets/bower/jquery/src/var/class2type.js +6 -0
  149. data/assets/bower/jquery/src/var/concat.js +7 -0
  150. data/assets/bower/jquery/src/var/document.js +5 -0
  151. data/assets/bower/jquery/src/var/documentElement.js +7 -0
  152. data/assets/bower/jquery/src/var/fnToString.js +7 -0
  153. data/assets/bower/jquery/src/var/getProto.js +5 -0
  154. data/assets/bower/jquery/src/var/hasOwn.js +7 -0
  155. data/assets/bower/jquery/src/var/indexOf.js +7 -0
  156. data/assets/bower/jquery/src/var/pnum.js +5 -0
  157. data/assets/bower/jquery/src/var/push.js +7 -0
  158. data/assets/bower/jquery/src/var/rcssNum.js +9 -0
  159. data/assets/bower/jquery/src/var/rnothtmlwhite.js +8 -0
  160. data/assets/bower/jquery/src/var/slice.js +7 -0
  161. data/assets/bower/jquery/src/var/support.js +6 -0
  162. data/assets/bower/jquery/src/var/toString.js +7 -0
  163. data/assets/bower/jquery/src/wrap.js +77 -0
  164. data/assets/bower/scrollreveal/.bower.json +36 -0
  165. data/assets/bower/scrollreveal/CHANGELOG.md +268 -0
  166. data/assets/bower/scrollreveal/LICENSE.md +12 -0
  167. data/assets/bower/scrollreveal/README.md +413 -0
  168. data/assets/bower/scrollreveal/bower.json +24 -0
  169. data/assets/bower/scrollreveal/dist/scrollreveal.js +860 -0
  170. data/assets/bower/scrollreveal/dist/scrollreveal.min.js +1 -0
  171. data/assets/bower/turbolinks5/.blade.yml +15 -0
  172. data/assets/bower/turbolinks5/.bower.json +14 -0
  173. data/assets/bower/turbolinks5/.gitignore +2 -0
  174. data/assets/bower/turbolinks5/CONDUCT.md +79 -0
  175. data/assets/bower/turbolinks5/Gemfile +9 -0
  176. data/assets/bower/turbolinks5/LICENSE +20 -0
  177. data/assets/bower/turbolinks5/README.md +435 -0
  178. data/assets/bower/turbolinks5/bin/blade +16 -0
  179. data/assets/bower/turbolinks5/bin/rackup +16 -0
  180. data/assets/bower/turbolinks5/config.ru +8 -0
  181. data/assets/bower/turbolinks5/dist/turbolinks.js +6 -0
  182. data/assets/bower/turbolinks5/package.json +31 -0
  183. data/assets/bower/turbolinks5/src/turbolinks/BANNER.js.erb +4 -0
  184. data/assets/bower/turbolinks5/src/turbolinks/VERSION +1 -0
  185. data/assets/bower/turbolinks5/src/turbolinks/browser_adapter.coffee +61 -0
  186. data/assets/bower/turbolinks5/src/turbolinks/compatibility.coffee +30 -0
  187. data/assets/bower/turbolinks5/src/turbolinks/controller.coffee +239 -0
  188. data/assets/bower/turbolinks5/src/turbolinks/error_renderer.coffee +21 -0
  189. data/assets/bower/turbolinks5/src/turbolinks/head_details.coffee +51 -0
  190. data/assets/bower/turbolinks5/src/turbolinks/helpers.coffee +51 -0
  191. data/assets/bower/turbolinks5/src/turbolinks/history.coffee +46 -0
  192. data/assets/bower/turbolinks5/src/turbolinks/http_request.coffee +88 -0
  193. data/assets/bower/turbolinks5/src/turbolinks/index.coffee +16 -0
  194. data/assets/bower/turbolinks5/src/turbolinks/location.coffee +70 -0
  195. data/assets/bower/turbolinks5/src/turbolinks/progress_bar.coffee +83 -0
  196. data/assets/bower/turbolinks5/src/turbolinks/renderer.coffee +27 -0
  197. data/assets/bower/turbolinks5/src/turbolinks/scroll_manager.coffee +27 -0
  198. data/assets/bower/turbolinks5/src/turbolinks/snapshot.coffee +47 -0
  199. data/assets/bower/turbolinks5/src/turbolinks/snapshot_cache.coffee +43 -0
  200. data/assets/bower/turbolinks5/src/turbolinks/snapshot_renderer.coffee +88 -0
  201. data/assets/bower/turbolinks5/src/turbolinks/start.coffee +18 -0
  202. data/assets/bower/turbolinks5/src/turbolinks/view.coffee +34 -0
  203. data/assets/bower/turbolinks5/src/turbolinks/visit.coffee +162 -0
  204. data/assets/bower/turbolinks5/test/src/fixtures/additional_assets.html +12 -0
  205. data/assets/bower/turbolinks5/test/src/fixtures/body_script.html +18 -0
  206. data/assets/bower/turbolinks5/test/src/fixtures/eval_false_script.html +18 -0
  207. data/assets/bower/turbolinks5/test/src/fixtures/head_script.html +18 -0
  208. data/assets/bower/turbolinks5/test/src/fixtures/navigation.html +21 -0
  209. data/assets/bower/turbolinks5/test/src/fixtures/one.html +12 -0
  210. data/assets/bower/turbolinks5/test/src/fixtures/rendering.html +20 -0
  211. data/assets/bower/turbolinks5/test/src/fixtures/tracked_asset_change.html +11 -0
  212. data/assets/bower/turbolinks5/test/src/fixtures/visit.html +14 -0
  213. data/assets/bower/turbolinks5/test/src/head.html.erb +1 -0
  214. data/assets/bower/turbolinks5/test/src/helpers/replicant_helpers.coffee +18 -0
  215. data/assets/bower/turbolinks5/test/src/modules/navigation_tests.coffee +75 -0
  216. data/assets/bower/turbolinks5/test/src/modules/rendering_tests.coffee +123 -0
  217. data/assets/bower/turbolinks5/test/src/modules/visit_tests.coffee +49 -0
  218. data/assets/bower/turbolinks5/test/src/test.coffee +4 -0
  219. data/assets/bower/turbolinks5/test/src/test.css +20 -0
  220. data/assets/bower/turbolinks5/test/vendor/replicant.js +10 -0
  221. data/assets/fonts/cormorant-garamond/Cormorant-Garamond-700.eot +0 -0
  222. data/assets/fonts/cormorant-garamond/Cormorant-Garamond-700.ttf +0 -0
  223. data/assets/fonts/cormorant-garamond/Cormorant-Garamond-700.woff +0 -0
  224. data/assets/fonts/cormorant-garamond/Cormorant-Garamond-700.woff2 +0 -0
  225. data/assets/fonts/ionicons/ionicons.eot +0 -0
  226. data/assets/fonts/ionicons/ionicons.svg +2232 -0
  227. data/assets/fonts/ionicons/ionicons.ttf +0 -0
  228. data/assets/fonts/ionicons/ionicons.woff +0 -0
  229. data/assets/fonts/lato/Lato-300.eot +0 -0
  230. data/assets/fonts/lato/Lato-300.ttf +0 -0
  231. data/assets/fonts/lato/Lato-300.woff +0 -0
  232. data/assets/fonts/lato/Lato-300.woff2 +0 -0
  233. data/assets/fonts/lato/Lato-700.eot +0 -0
  234. data/assets/fonts/lato/Lato-700.ttf +0 -0
  235. data/assets/fonts/lato/Lato-700.woff +0 -0
  236. data/assets/fonts/lato/Lato-700.woff2 +0 -0
  237. data/assets/fonts/lato/Lato-regular.eot +0 -0
  238. data/assets/fonts/lato/Lato-regular.ttf +0 -0
  239. data/assets/fonts/lato/Lato-regular.woff +0 -0
  240. data/assets/fonts/lato/Lato-regular.woff2 +0 -0
  241. data/assets/images/about.jpg +0 -0
  242. data/assets/images/about@2x.jpg +0 -0
  243. data/assets/images/apple-touch-icon.png +0 -0
  244. data/assets/images/documentation/chalk-intro.png +0 -0
  245. data/assets/images/documentation/chalk-intro@2x.png +0 -0
  246. data/assets/images/documentation/enlarge.gif +0 -0
  247. data/assets/images/documentation/enlarge@2x.gif +0 -0
  248. data/assets/images/documentation/sample-image.jpg +0 -0
  249. data/assets/images/documentation/sample-image@2x.jpg +0 -0
  250. data/assets/images/og-image.jpg +0 -0
  251. data/assets/javascripts/application.js +24 -0
  252. data/assets/javascripts/vendor.js +6 -0
  253. data/assets/javascripts/vendor/jquery-throttle-debounce.js +9 -0
  254. data/assets/javascripts/vendor/retina.js +182 -0
  255. data/assets/stylesheets/.csscomb.json +197 -0
  256. data/assets/stylesheets/.scss-lint.yml +33 -0
  257. data/assets/stylesheets/_base.scss +151 -0
  258. data/assets/stylesheets/_mixins.scss +28 -0
  259. data/assets/stylesheets/_variables.scss +47 -0
  260. data/assets/stylesheets/dark.scss +70 -0
  261. data/assets/stylesheets/fonts.scss +63 -0
  262. data/assets/stylesheets/layouts/_footer.scss +17 -0
  263. data/assets/stylesheets/layouts/_grid.scss +102 -0
  264. data/assets/stylesheets/light.scss +70 -0
  265. data/assets/stylesheets/modules/_about.scss +10 -0
  266. data/assets/stylesheets/modules/_articles.scss +211 -0
  267. data/assets/stylesheets/modules/_embed.scss +31 -0
  268. data/assets/stylesheets/modules/_header.scss +57 -0
  269. data/assets/stylesheets/modules/_highlights-dark.scss +415 -0
  270. data/assets/stylesheets/modules/_highlights-light.scss +409 -0
  271. data/assets/stylesheets/modules/_icons.scss +2967 -0
  272. data/assets/stylesheets/notfound-dark.scss +90 -0
  273. data/assets/stylesheets/notfound-light.scss +90 -0
  274. data/assets/stylesheets/vendor/_normalize.scss +461 -0
  275. metadata +276 -3
@@ -0,0 +1,16 @@
1
+ define( [
2
+ "../var/document"
3
+ ], function( document ) {
4
+ "use strict";
5
+
6
+ function DOMEval( code, doc ) {
7
+ doc = doc || document;
8
+
9
+ var script = doc.createElement( "script" );
10
+
11
+ script.text = code;
12
+ doc.head.appendChild( script ).parentNode.removeChild( script );
13
+ }
14
+
15
+ return DOMEval;
16
+ } );
@@ -0,0 +1,70 @@
1
+ define( [
2
+ "../core"
3
+ ], function( jQuery ) {
4
+
5
+ "use strict";
6
+
7
+ // Multifunctional method to get and set values of a collection
8
+ // The value/s can optionally be executed if it's a function
9
+ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
10
+ var i = 0,
11
+ len = elems.length,
12
+ bulk = key == null;
13
+
14
+ // Sets many values
15
+ if ( jQuery.type( key ) === "object" ) {
16
+ chainable = true;
17
+ for ( i in key ) {
18
+ access( elems, fn, i, key[ i ], true, emptyGet, raw );
19
+ }
20
+
21
+ // Sets one value
22
+ } else if ( value !== undefined ) {
23
+ chainable = true;
24
+
25
+ if ( !jQuery.isFunction( value ) ) {
26
+ raw = true;
27
+ }
28
+
29
+ if ( bulk ) {
30
+
31
+ // Bulk operations run against the entire set
32
+ if ( raw ) {
33
+ fn.call( elems, value );
34
+ fn = null;
35
+
36
+ // ...except when executing function values
37
+ } else {
38
+ bulk = fn;
39
+ fn = function( elem, key, value ) {
40
+ return bulk.call( jQuery( elem ), value );
41
+ };
42
+ }
43
+ }
44
+
45
+ if ( fn ) {
46
+ for ( ; i < len; i++ ) {
47
+ fn(
48
+ elems[ i ], key, raw ?
49
+ value :
50
+ value.call( elems[ i ], i, fn( elems[ i ], key ) )
51
+ );
52
+ }
53
+ }
54
+ }
55
+
56
+ if ( chainable ) {
57
+ return elems;
58
+ }
59
+
60
+ // Gets
61
+ if ( bulk ) {
62
+ return fn.call( elems );
63
+ }
64
+
65
+ return len ? fn( elems[ 0 ], key ) : emptyGet;
66
+ };
67
+
68
+ return access;
69
+
70
+ } );
@@ -0,0 +1,127 @@
1
+ // Initialize a jQuery object
2
+ define( [
3
+ "../core",
4
+ "../var/document",
5
+ "./var/rsingleTag",
6
+ "../traversing/findFilter"
7
+ ], function( jQuery, document, rsingleTag ) {
8
+
9
+ "use strict";
10
+
11
+ // A central reference to the root jQuery(document)
12
+ var rootjQuery,
13
+
14
+ // A simple way to check for HTML strings
15
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
16
+ // Strict HTML recognition (#11290: must start with <)
17
+ // Shortcut simple #id case for speed
18
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
19
+
20
+ init = jQuery.fn.init = function( selector, context, root ) {
21
+ var match, elem;
22
+
23
+ // HANDLE: $(""), $(null), $(undefined), $(false)
24
+ if ( !selector ) {
25
+ return this;
26
+ }
27
+
28
+ // Method init() accepts an alternate rootjQuery
29
+ // so migrate can support jQuery.sub (gh-2101)
30
+ root = root || rootjQuery;
31
+
32
+ // Handle HTML strings
33
+ if ( typeof selector === "string" ) {
34
+ if ( selector[ 0 ] === "<" &&
35
+ selector[ selector.length - 1 ] === ">" &&
36
+ selector.length >= 3 ) {
37
+
38
+ // Assume that strings that start and end with <> are HTML and skip the regex check
39
+ match = [ null, selector, null ];
40
+
41
+ } else {
42
+ match = rquickExpr.exec( selector );
43
+ }
44
+
45
+ // Match html or make sure no context is specified for #id
46
+ if ( match && ( match[ 1 ] || !context ) ) {
47
+
48
+ // HANDLE: $(html) -> $(array)
49
+ if ( match[ 1 ] ) {
50
+ context = context instanceof jQuery ? context[ 0 ] : context;
51
+
52
+ // Option to run scripts is true for back-compat
53
+ // Intentionally let the error be thrown if parseHTML is not present
54
+ jQuery.merge( this, jQuery.parseHTML(
55
+ match[ 1 ],
56
+ context && context.nodeType ? context.ownerDocument || context : document,
57
+ true
58
+ ) );
59
+
60
+ // HANDLE: $(html, props)
61
+ if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
62
+ for ( match in context ) {
63
+
64
+ // Properties of context are called as methods if possible
65
+ if ( jQuery.isFunction( this[ match ] ) ) {
66
+ this[ match ]( context[ match ] );
67
+
68
+ // ...and otherwise set as attributes
69
+ } else {
70
+ this.attr( match, context[ match ] );
71
+ }
72
+ }
73
+ }
74
+
75
+ return this;
76
+
77
+ // HANDLE: $(#id)
78
+ } else {
79
+ elem = document.getElementById( match[ 2 ] );
80
+
81
+ if ( elem ) {
82
+
83
+ // Inject the element directly into the jQuery object
84
+ this[ 0 ] = elem;
85
+ this.length = 1;
86
+ }
87
+ return this;
88
+ }
89
+
90
+ // HANDLE: $(expr, $(...))
91
+ } else if ( !context || context.jquery ) {
92
+ return ( context || root ).find( selector );
93
+
94
+ // HANDLE: $(expr, context)
95
+ // (which is just equivalent to: $(context).find(expr)
96
+ } else {
97
+ return this.constructor( context ).find( selector );
98
+ }
99
+
100
+ // HANDLE: $(DOMElement)
101
+ } else if ( selector.nodeType ) {
102
+ this[ 0 ] = selector;
103
+ this.length = 1;
104
+ return this;
105
+
106
+ // HANDLE: $(function)
107
+ // Shortcut for document ready
108
+ } else if ( jQuery.isFunction( selector ) ) {
109
+ return root.ready !== undefined ?
110
+ root.ready( selector ) :
111
+
112
+ // Execute immediately if ready is not present
113
+ selector( jQuery );
114
+ }
115
+
116
+ return jQuery.makeArray( selector, this );
117
+ };
118
+
119
+ // Give the init function the jQuery prototype for later instantiation
120
+ init.prototype = jQuery.fn;
121
+
122
+ // Initialize central reference
123
+ rootjQuery = jQuery( document );
124
+
125
+ return init;
126
+
127
+ } );
@@ -0,0 +1,65 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document",
4
+ "./var/rsingleTag",
5
+ "../manipulation/buildFragment",
6
+
7
+ // This is the only module that needs core/support
8
+ "./support"
9
+ ], function( jQuery, document, rsingleTag, buildFragment, support ) {
10
+
11
+ "use strict";
12
+
13
+ // Argument "data" should be string of html
14
+ // context (optional): If specified, the fragment will be created in this context,
15
+ // defaults to document
16
+ // keepScripts (optional): If true, will include scripts passed in the html string
17
+ jQuery.parseHTML = function( data, context, keepScripts ) {
18
+ if ( typeof data !== "string" ) {
19
+ return [];
20
+ }
21
+ if ( typeof context === "boolean" ) {
22
+ keepScripts = context;
23
+ context = false;
24
+ }
25
+
26
+ var base, parsed, scripts;
27
+
28
+ if ( !context ) {
29
+
30
+ // Stop scripts or inline event handlers from being executed immediately
31
+ // by using document.implementation
32
+ if ( support.createHTMLDocument ) {
33
+ context = document.implementation.createHTMLDocument( "" );
34
+
35
+ // Set the base href for the created document
36
+ // so any parsed elements with URLs
37
+ // are based on the document's URL (gh-2965)
38
+ base = context.createElement( "base" );
39
+ base.href = document.location.href;
40
+ context.head.appendChild( base );
41
+ } else {
42
+ context = document;
43
+ }
44
+ }
45
+
46
+ parsed = rsingleTag.exec( data );
47
+ scripts = !keepScripts && [];
48
+
49
+ // Single tag
50
+ if ( parsed ) {
51
+ return [ context.createElement( parsed[ 1 ] ) ];
52
+ }
53
+
54
+ parsed = buildFragment( [ data ], context, scripts );
55
+
56
+ if ( scripts && scripts.length ) {
57
+ jQuery( scripts ).remove();
58
+ }
59
+
60
+ return jQuery.merge( [], parsed.childNodes );
61
+ };
62
+
63
+ return jQuery.parseHTML;
64
+
65
+ } );
@@ -0,0 +1,105 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document"
4
+ ], function( jQuery, document ) {
5
+
6
+ "use strict";
7
+
8
+ var readyCallbacks = [],
9
+ whenReady = function( fn ) {
10
+ readyCallbacks.push( fn );
11
+ },
12
+ executeReady = function( fn ) {
13
+
14
+ // Prevent errors from freezing future callback execution (gh-1823)
15
+ // Not backwards-compatible as this does not execute sync
16
+ window.setTimeout( function() {
17
+ fn.call( document, jQuery );
18
+ } );
19
+ };
20
+
21
+ jQuery.fn.ready = function( fn ) {
22
+ whenReady( fn );
23
+ return this;
24
+ };
25
+
26
+ jQuery.extend( {
27
+
28
+ // Is the DOM ready to be used? Set to true once it occurs.
29
+ isReady: false,
30
+
31
+ // A counter to track how many items to wait for before
32
+ // the ready event fires. See #6781
33
+ readyWait: 1,
34
+
35
+ // Hold (or release) the ready event
36
+ holdReady: function( hold ) {
37
+ if ( hold ) {
38
+ jQuery.readyWait++;
39
+ } else {
40
+ jQuery.ready( true );
41
+ }
42
+ },
43
+
44
+ ready: function( wait ) {
45
+
46
+ // Abort if there are pending holds or we're already ready
47
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
48
+ return;
49
+ }
50
+
51
+ // Remember that the DOM is ready
52
+ jQuery.isReady = true;
53
+
54
+ // If a normal DOM Ready event fired, decrement, and wait if need be
55
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
56
+ return;
57
+ }
58
+
59
+ whenReady = function( fn ) {
60
+ readyCallbacks.push( fn );
61
+
62
+ while ( readyCallbacks.length ) {
63
+ fn = readyCallbacks.shift();
64
+ if ( jQuery.isFunction( fn ) ) {
65
+ executeReady( fn );
66
+ }
67
+ }
68
+ };
69
+
70
+ whenReady();
71
+ }
72
+ } );
73
+
74
+ // Make jQuery.ready Promise consumable (gh-1778)
75
+ jQuery.ready.then = jQuery.fn.ready;
76
+
77
+ /**
78
+ * The ready event handler and self cleanup method
79
+ */
80
+ function completed() {
81
+ document.removeEventListener( "DOMContentLoaded", completed );
82
+ window.removeEventListener( "load", completed );
83
+ jQuery.ready();
84
+ }
85
+
86
+ // Catch cases where $(document).ready() is called
87
+ // after the browser event has already occurred.
88
+ // Support: IE9-10 only
89
+ // Older IE sometimes signals "interactive" too soon
90
+ if ( document.readyState === "complete" ||
91
+ ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
92
+
93
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
94
+ window.setTimeout( jQuery.ready );
95
+
96
+ } else {
97
+
98
+ // Use the handy event callback
99
+ document.addEventListener( "DOMContentLoaded", completed );
100
+
101
+ // A fallback to window.onload, that will always work
102
+ window.addEventListener( "load", completed );
103
+ }
104
+
105
+ } );
@@ -0,0 +1,95 @@
1
+ define( [
2
+ "../core",
3
+ "../var/document",
4
+ "../core/readyException",
5
+ "../deferred"
6
+ ], function( jQuery, document ) {
7
+
8
+ "use strict";
9
+
10
+ // The deferred used on DOM ready
11
+ var readyList = jQuery.Deferred();
12
+
13
+ jQuery.fn.ready = function( fn ) {
14
+
15
+ readyList
16
+ .then( fn )
17
+
18
+ // Wrap jQuery.readyException in a function so that the lookup
19
+ // happens at the time of error handling instead of callback
20
+ // registration.
21
+ .catch( function( error ) {
22
+ jQuery.readyException( error );
23
+ } );
24
+
25
+ return this;
26
+ };
27
+
28
+ jQuery.extend( {
29
+
30
+ // Is the DOM ready to be used? Set to true once it occurs.
31
+ isReady: false,
32
+
33
+ // A counter to track how many items to wait for before
34
+ // the ready event fires. See #6781
35
+ readyWait: 1,
36
+
37
+ // Hold (or release) the ready event
38
+ holdReady: function( hold ) {
39
+ if ( hold ) {
40
+ jQuery.readyWait++;
41
+ } else {
42
+ jQuery.ready( true );
43
+ }
44
+ },
45
+
46
+ // Handle when the DOM is ready
47
+ ready: function( wait ) {
48
+
49
+ // Abort if there are pending holds or we're already ready
50
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
51
+ return;
52
+ }
53
+
54
+ // Remember that the DOM is ready
55
+ jQuery.isReady = true;
56
+
57
+ // If a normal DOM Ready event fired, decrement, and wait if need be
58
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
59
+ return;
60
+ }
61
+
62
+ // If there are functions bound, to execute
63
+ readyList.resolveWith( document, [ jQuery ] );
64
+ }
65
+ } );
66
+
67
+ jQuery.ready.then = readyList.then;
68
+
69
+ // The ready event handler and self cleanup method
70
+ function completed() {
71
+ document.removeEventListener( "DOMContentLoaded", completed );
72
+ window.removeEventListener( "load", completed );
73
+ jQuery.ready();
74
+ }
75
+
76
+ // Catch cases where $(document).ready() is called
77
+ // after the browser event has already occurred.
78
+ // Support: IE <=9 - 10 only
79
+ // Older IE sometimes signals "interactive" too soon
80
+ if ( document.readyState === "complete" ||
81
+ ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
82
+
83
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
84
+ window.setTimeout( jQuery.ready );
85
+
86
+ } else {
87
+
88
+ // Use the handy event callback
89
+ document.addEventListener( "DOMContentLoaded", completed );
90
+
91
+ // A fallback to window.onload, that will always work
92
+ window.addEventListener( "load", completed );
93
+ }
94
+
95
+ } );