octopress 3.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. checksums.yaml +15 -0
  2. data/.editorconfig +22 -0
  3. data/.gitattributes +1 -0
  4. data/.gitignore +20 -0
  5. data/.powrc +4 -0
  6. data/.rspec +5 -0
  7. data/.rubocop.yml +119 -0
  8. data/.slugignore +3 -0
  9. data/.themes/classic/.editorconfig +44 -0
  10. data/.themes/classic/_config/adn-timeline.yml +10 -0
  11. data/.themes/classic/_config/delicious-feed.yml +4 -0
  12. data/.themes/classic/_config/deploy/gh_pages.yml +9 -0
  13. data/.themes/classic/_config/deploy/rsync.yml +14 -0
  14. data/.themes/classic/_config/disqus.yml +11 -0
  15. data/.themes/classic/_config/facebook-like.yml +2 -0
  16. data/.themes/classic/_config/gauges-analytics.yml +6 -0
  17. data/.themes/classic/_config/github-repos.yml +24 -0
  18. data/.themes/classic/_config/google-analytics.yml +6 -0
  19. data/.themes/classic/_config/google-plus.yml +13 -0
  20. data/.themes/classic/_config/jekyll.yml +37 -0
  21. data/.themes/classic/_config/pinboard-feed.yml +4 -0
  22. data/.themes/classic/_config/require-js.yml +19 -0
  23. data/.themes/classic/_config/theme.yml +54 -0
  24. data/.themes/classic/_config/twitter-timeline.yml +9 -0
  25. data/.themes/classic/assets/javascripts/lib/ios-rotate-scaling-fix.js +18 -0
  26. data/.themes/classic/assets/javascripts/lib/jquery.cookie.js +92 -0
  27. data/.themes/classic/assets/javascripts/lib/modernizr.js +447 -0
  28. data/.themes/classic/assets/javascripts/lib/octopress.js +83 -0
  29. data/.themes/classic/assets/javascripts/modules/adn-timeline.coffee +68 -0
  30. data/.themes/classic/assets/javascripts/modules/delicious-feed.coffee +38 -0
  31. data/.themes/classic/assets/javascripts/modules/github-repos.coffee +60 -0
  32. data/.themes/classic/assets/javascripts/modules/github.coffee +60 -0
  33. data/.themes/classic/assets/javascripts/modules/helpers.coffee +96 -0
  34. data/.themes/classic/assets/javascripts/modules/pinboard-feed.coffee +42 -0
  35. data/.themes/classic/assets/javascripts/modules/site.coffee +11 -0
  36. data/.themes/classic/assets/stylesheets/_base.scss +5 -0
  37. data/.themes/classic/assets/stylesheets/_partials.scss +8 -0
  38. data/.themes/classic/assets/stylesheets/base/_layout.scss +191 -0
  39. data/.themes/classic/assets/stylesheets/base/_solarized.scss +75 -0
  40. data/.themes/classic/assets/stylesheets/base/_theme.scss +92 -0
  41. data/.themes/classic/assets/stylesheets/base/_typography.scss +168 -0
  42. data/.themes/classic/assets/stylesheets/base/_utilities.scss +27 -0
  43. data/.themes/classic/assets/stylesheets/custom/_colors.scss +49 -0
  44. data/.themes/classic/assets/stylesheets/custom/_fonts.scss +10 -0
  45. data/.themes/classic/assets/stylesheets/custom/_layout.scss +17 -0
  46. data/.themes/classic/assets/stylesheets/custom/_styles.scss +2 -0
  47. data/.themes/classic/assets/stylesheets/partials/_archive.scss +77 -0
  48. data/.themes/classic/assets/stylesheets/partials/_blog.scss +165 -0
  49. data/.themes/classic/assets/stylesheets/partials/_footer.scss +19 -0
  50. data/.themes/classic/assets/stylesheets/partials/_header.scss +18 -0
  51. data/.themes/classic/assets/stylesheets/partials/_navigation.scss +136 -0
  52. data/.themes/classic/assets/stylesheets/partials/_sharing.scss +73 -0
  53. data/.themes/classic/assets/stylesheets/partials/_sidebar.scss +4 -0
  54. data/.themes/classic/assets/stylesheets/partials/_syntax.scss +234 -0
  55. data/.themes/classic/assets/stylesheets/partials/sidebar/_base.scss +106 -0
  56. data/.themes/classic/assets/stylesheets/partials/sidebar/_delicious.scss +4 -0
  57. data/.themes/classic/assets/stylesheets/partials/sidebar/_googleplus.scss +26 -0
  58. data/.themes/classic/assets/stylesheets/partials/sidebar/_pinboard.scss +12 -0
  59. data/.themes/classic/assets/stylesheets/plugins/_plugins.scss +5 -0
  60. data/.themes/classic/assets/stylesheets/screen.scss +11 -0
  61. data/.themes/classic/source/404.markdown +9 -0
  62. data/.themes/classic/source/_includes/after_footer.html +7 -0
  63. data/.themes/classic/source/_includes/archive_post.html +12 -0
  64. data/.themes/classic/source/_includes/article.html +23 -0
  65. data/.themes/classic/source/_includes/comments.html +9 -0
  66. data/.themes/classic/source/_includes/custom/after_footer.html +3 -0
  67. data/.themes/classic/source/_includes/custom/after_page.html +1 -0
  68. data/.themes/classic/source/_includes/custom/after_post.html +0 -0
  69. data/.themes/classic/source/_includes/custom/comments.html +5 -0
  70. data/.themes/classic/source/_includes/custom/footer.html +4 -0
  71. data/.themes/classic/source/_includes/custom/head.html +7 -0
  72. data/.themes/classic/source/_includes/custom/header.html +6 -0
  73. data/.themes/classic/source/_includes/custom/navigation.html +4 -0
  74. data/.themes/classic/source/_includes/custom/page_meta.html +1 -0
  75. data/.themes/classic/source/_includes/custom/post_meta.html +1 -0
  76. data/.themes/classic/source/_includes/custom/sharing.html +3 -0
  77. data/.themes/classic/source/_includes/disqus.html +22 -0
  78. data/.themes/classic/source/_includes/facebook_like.html +10 -0
  79. data/.themes/classic/source/_includes/feed_entry.xml +10 -0
  80. data/.themes/classic/source/_includes/footer.html +1 -0
  81. data/.themes/classic/source/_includes/gauges_analytics.html +15 -0
  82. data/.themes/classic/source/_includes/google_analytics.html +13 -0
  83. data/.themes/classic/source/_includes/google_plus_one.html +9 -0
  84. data/.themes/classic/source/_includes/head.html +33 -0
  85. data/.themes/classic/source/_includes/header.html +1 -0
  86. data/.themes/classic/source/_includes/navigation.html +15 -0
  87. data/.themes/classic/source/_includes/post/author.html +8 -0
  88. data/.themes/classic/source/_includes/post/categories.html +10 -0
  89. data/.themes/classic/source/_includes/post/date.html +15 -0
  90. data/.themes/classic/source/_includes/post/disqus_thread.html +1 -0
  91. data/.themes/classic/source/_includes/post/meta.html +3 -0
  92. data/.themes/classic/source/_includes/post/sharing.html +36 -0
  93. data/.themes/classic/source/_includes/post/title.html +5 -0
  94. data/.themes/classic/source/_includes/post/variables.html +14 -0
  95. data/.themes/classic/source/_includes/sidebars/blog_index_default.html +3 -0
  96. data/.themes/classic/source/_includes/sidebars/page_default.html +4 -0
  97. data/.themes/classic/source/_includes/sidebars/post_default.html +4 -0
  98. data/.themes/classic/source/_includes/sidebars/sections/delicious.html +8 -0
  99. data/.themes/classic/source/_includes/sidebars/sections/github.html +9 -0
  100. data/.themes/classic/source/_includes/sidebars/sections/google_plus.html +5 -0
  101. data/.themes/classic/source/_includes/sidebars/sections/pinboard.html +17 -0
  102. data/.themes/classic/source/_includes/sidebars/sections/recent_posts.html +10 -0
  103. data/.themes/classic/source/_includes/twitter_sharing.html +11 -0
  104. data/.themes/classic/source/_layouts/category_feed.xml +24 -0
  105. data/.themes/classic/source/_layouts/category_index.html +19 -0
  106. data/.themes/classic/source/_layouts/default.html +14 -0
  107. data/.themes/classic/source/_layouts/page.html +34 -0
  108. data/.themes/classic/source/_layouts/post.html +39 -0
  109. data/.themes/classic/source/archives/index.html +20 -0
  110. data/.themes/classic/source/assets/jwplayer/glow/controlbar/background.png +0 -0
  111. data/.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png +0 -0
  112. data/.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png +0 -0
  113. data/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png +0 -0
  114. data/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png +0 -0
  115. data/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png +0 -0
  116. data/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png +0 -0
  117. data/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png +0 -0
  118. data/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png +0 -0
  119. data/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png +0 -0
  120. data/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png +0 -0
  121. data/.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png +0 -0
  122. data/.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png +0 -0
  123. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png +0 -0
  124. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png +0 -0
  125. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png +0 -0
  126. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png +0 -0
  127. data/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png +0 -0
  128. data/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png +0 -0
  129. data/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png +0 -0
  130. data/.themes/classic/source/assets/jwplayer/glow/display/background.png +0 -0
  131. data/.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png +0 -0
  132. data/.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png +0 -0
  133. data/.themes/classic/source/assets/jwplayer/glow/display/playIcon.png +0 -0
  134. data/.themes/classic/source/assets/jwplayer/glow/dock/button.png +0 -0
  135. data/.themes/classic/source/assets/jwplayer/glow/glow.xml +115 -0
  136. data/.themes/classic/source/assets/jwplayer/glow/playlist/item.png +0 -0
  137. data/.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png +0 -0
  138. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png +0 -0
  139. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png +0 -0
  140. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png +0 -0
  141. data/.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png +0 -0
  142. data/.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png +0 -0
  143. data/.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png +0 -0
  144. data/.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png +0 -0
  145. data/.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png +0 -0
  146. data/.themes/classic/source/assets/jwplayer/player.swf +0 -0
  147. data/.themes/classic/source/atom.xml +23 -0
  148. data/.themes/classic/source/images/bird_32_gray.png +0 -0
  149. data/.themes/classic/source/images/bird_32_gray_fail.png +0 -0
  150. data/.themes/classic/source/images/code_bg.png +0 -0
  151. data/.themes/classic/source/images/dotted-border.png +0 -0
  152. data/.themes/classic/source/images/email.png +0 -0
  153. data/.themes/classic/source/images/icon/facebook.png +0 -0
  154. data/.themes/classic/source/images/icon/github.png +0 -0
  155. data/.themes/classic/source/images/icon/googleplus.png +0 -0
  156. data/.themes/classic/source/images/icon/twitter-bird.png +0 -0
  157. data/.themes/classic/source/images/icon/twitter.png +0 -0
  158. data/.themes/classic/source/images/line-tile.png +0 -0
  159. data/.themes/classic/source/images/noise.png +0 -0
  160. data/.themes/classic/source/images/rss.png +0 -0
  161. data/.themes/classic/source/images/search.png +0 -0
  162. data/.themes/classic/source/index.html +30 -0
  163. data/.themes/classic/source/javascripts/jquery.min.js +5 -0
  164. data/.themes/classic/source/octopress-favicon.png +0 -0
  165. data/.themes/classic/source/robots.txt +7 -0
  166. data/.travis.yml +6 -0
  167. data/CHANGELOG.markdown +46 -0
  168. data/CONTRIBUTING.markdown +17 -0
  169. data/Gemfile +2 -0
  170. data/README.markdown +37 -0
  171. data/Rakefile +76 -0
  172. data/bin/octopress +66 -0
  173. data/lib/console +17 -0
  174. data/lib/guard/jekyll.rb +33 -0
  175. data/lib/octopress.rb +89 -0
  176. data/lib/octopress/command.rb +9 -0
  177. data/lib/octopress/commands.rb +14 -0
  178. data/lib/octopress/commands/build.rb +17 -0
  179. data/lib/octopress/commands/build_javascripts.rb +11 -0
  180. data/lib/octopress/commands/build_jekyll.rb +25 -0
  181. data/lib/octopress/commands/build_stylesheets.rb +13 -0
  182. data/lib/octopress/commands/install.rb +45 -0
  183. data/lib/octopress/commands/new.rb +21 -0
  184. data/lib/octopress/commands/scaffold.rb +101 -0
  185. data/lib/octopress/commands/serve.rb +25 -0
  186. data/lib/octopress/configuration.rb +231 -0
  187. data/lib/octopress/core_ext.rb +44 -0
  188. data/lib/octopress/dependency_installer.rb +287 -0
  189. data/lib/octopress/errors.rb +3 -0
  190. data/lib/octopress/filters/content.rb +66 -0
  191. data/lib/octopress/filters/date.rb +46 -0
  192. data/lib/octopress/filters/post.rb +175 -0
  193. data/lib/octopress/filters/url.rb +34 -0
  194. data/lib/octopress/formatters.rb +9 -0
  195. data/lib/octopress/formatters/base_formatter.rb +17 -0
  196. data/lib/octopress/formatters/simple_formatter.rb +9 -0
  197. data/lib/octopress/formatters/verbose_formatter.rb +9 -0
  198. data/lib/octopress/generators/category_generator.rb +196 -0
  199. data/lib/octopress/generators/sitemap_generator.rb +308 -0
  200. data/lib/octopress/guardfile +43 -0
  201. data/lib/octopress/helpers/titlecase.rb +37 -0
  202. data/lib/octopress/ink.rb +12 -0
  203. data/lib/octopress/inquirable_string.rb +12 -0
  204. data/lib/octopress/installer.rb +92 -0
  205. data/lib/octopress/js_asset_manager.rb +98 -0
  206. data/lib/octopress/liquid_helpers/conditional.rb +36 -0
  207. data/lib/octopress/liquid_helpers/config.rb +58 -0
  208. data/lib/octopress/liquid_helpers/include.rb +33 -0
  209. data/lib/octopress/liquid_helpers/url.rb +29 -0
  210. data/lib/octopress/liquid_helpers/vars.rb +30 -0
  211. data/lib/octopress/plugin.rb +33 -0
  212. data/lib/octopress/rake.rb +16 -0
  213. data/lib/octopress/scaffold/.gitignore +18 -0
  214. data/lib/octopress/scaffold/site/Gemfile +3 -0
  215. data/lib/octopress/scaffold/site/config/compass.rb +27 -0
  216. data/lib/octopress/scaffold/site/config/rack.rb +25 -0
  217. data/lib/octopress/scaffold/site/config/site.yml +0 -0
  218. data/lib/octopress/scaffold/site/javascripts/lib/ios-rotate-scaling-fix.js +19 -0
  219. data/lib/octopress/scaffold/site/javascripts/lib/jquery-1.9.1.js +9598 -0
  220. data/lib/octopress/scaffold/site/javascripts/lib/jquery.cookie.js +93 -0
  221. data/lib/octopress/scaffold/site/stylesheets/_config.scss +1 -0
  222. data/lib/octopress/scaffold/site/stylesheets/_style.scss +1 -0
  223. data/lib/octopress/scaffold/site/stylesheets/site.scss +16 -0
  224. data/lib/octopress/tags/assign.rb +34 -0
  225. data/lib/octopress/tags/capture.rb +31 -0
  226. data/lib/octopress/tags/config-tag.rb +23 -0
  227. data/lib/octopress/tags/include.rb +63 -0
  228. data/lib/octopress/tags/js-assets.rb +23 -0
  229. data/lib/octopress/tags/puts.rb +39 -0
  230. data/lib/octopress/tags/render-partial.rb +89 -0
  231. data/lib/octopress/tags/return.rb +21 -0
  232. data/lib/octopress/version.rb +3 -0
  233. data/lib/rake/clean.rake +8 -0
  234. data/lib/rake/clobber.rake +5 -0
  235. data/lib/rake/console.rake +5 -0
  236. data/lib/rake/deploy.rake +4 -0
  237. data/lib/rake/gen_deploy.rake +2 -0
  238. data/lib/rake/generate.rake +4 -0
  239. data/lib/rake/generate_only.rake +14 -0
  240. data/lib/rake/hygiene.rake +29 -0
  241. data/lib/rake/install.rake +8 -0
  242. data/lib/rake/integrate.rake +4 -0
  243. data/lib/rake/isolate.rake +13 -0
  244. data/lib/rake/list_drafts.rake +7 -0
  245. data/lib/rake/new.rake +7 -0
  246. data/lib/rake/new_page.rake +49 -0
  247. data/lib/rake/new_post.rake +32 -0
  248. data/lib/rake/nuke.rake +4 -0
  249. data/lib/rake/preview.rake +4 -0
  250. data/lib/rake/push.rake +37 -0
  251. data/lib/rake/rsync.rake +20 -0
  252. data/lib/rake/set_root_dir.rake +35 -0
  253. data/lib/rake/setup_github_pages.rake +115 -0
  254. data/lib/rake/watch.rake +11 -0
  255. data/lib/scaffold/Rakefile +142 -0
  256. data/lib/scaffold/plugin-name.gemspec +43 -0
  257. data/lib/spec/fixtures/env/defaults/classic.yml +2 -0
  258. data/lib/spec/fixtures/no_override/defaults/classic.yml +11 -0
  259. data/lib/spec/fixtures/override/defaults/classic.yml +11 -0
  260. data/lib/spec/fixtures/override/site.yml +11 -0
  261. data/lib/spec/octopress/configuration_spec.rb +67 -0
  262. data/lib/spec/octopress/dependency_installer_spec.rb +66 -0
  263. data/lib/spec/octopress/ink_spec.rb +10 -0
  264. data/lib/spec/octopress/octopress_spec.rb +97 -0
  265. data/lib/spec/spec_helper.rb +22 -0
  266. data/lib/spec/support/env.rb +36 -0
  267. data/lib/spec/support/simplecov.rb +52 -0
  268. data/octopress.gemspec +52 -0
  269. metadata +697 -0
@@ -0,0 +1,9 @@
1
+ ---
2
+ # -------------------------------- #
3
+ # Tweet Sidebar Plugin Configs #
4
+ # -------------------------------- #
5
+
6
+ twitter:
7
+ user:
8
+ # Sharing button on posts
9
+ # tweet-button: true
@@ -0,0 +1,18 @@
1
+ // iOS scaling bug fix
2
+ // By @mathias, @cheeaun and @jdalton
3
+ // Source url: https://gist.github.com/901295
4
+
5
+ var addEvent = 'addEventListener',
6
+ type = 'gesturestart',
7
+ qsa = 'querySelectorAll',
8
+ scales = [1, 1],
9
+ meta = qsa in document ? document[qsa]('meta[name=viewport]') : [];
10
+ function fix() {
11
+ meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
12
+ document.removeEventListener(type, fix, true);
13
+ }
14
+ if ((meta = meta[meta.length - 1]) && addEvent in document) {
15
+ fix();
16
+ scales = [0.25, 1.6];
17
+ document[addEvent](type, fix, true);
18
+ }
@@ -0,0 +1,92 @@
1
+ /*!
2
+ * jQuery Cookie Plugin v1.3.1
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2013 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd && define.amd.jQuery) {
10
+ // AMD. Register as anonymous module.
11
+ define(['jquery'], factory);
12
+ } else {
13
+ // Browser globals.
14
+ factory(jQuery);
15
+ }
16
+ }(function ($) {
17
+
18
+ var pluses = /\+/g;
19
+
20
+ function raw(s) {
21
+ return s;
22
+ }
23
+
24
+ function decoded(s) {
25
+ return decodeURIComponent(s.replace(pluses, ' '));
26
+ }
27
+
28
+ function converted(s) {
29
+ if (s.indexOf('"') === 0) {
30
+ // This is a quoted cookie as according to RFC2068, unescape
31
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
32
+ }
33
+ try {
34
+ return config.json ? JSON.parse(s) : s;
35
+ } catch(er) {}
36
+ }
37
+
38
+ var config = $.cookie = function (key, value, options) {
39
+
40
+ // write
41
+ if (value !== undefined) {
42
+ options = $.extend({}, config.defaults, options);
43
+
44
+ if (typeof options.expires === 'number') {
45
+ var days = options.expires, t = options.expires = new Date();
46
+ t.setDate(t.getDate() + days);
47
+ }
48
+
49
+ value = config.json ? JSON.stringify(value) : String(value);
50
+
51
+ return (document.cookie = [
52
+ encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
53
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
54
+ options.path ? '; path=' + options.path : '',
55
+ options.domain ? '; domain=' + options.domain : '',
56
+ options.secure ? '; secure' : ''
57
+ ].join(''));
58
+ }
59
+
60
+ // read
61
+ var decode = config.raw ? raw : decoded;
62
+ var cookies = document.cookie.split('; ');
63
+ var result = key ? undefined : {};
64
+ for (var i = 0, l = cookies.length; i < l; i++) {
65
+ var parts = cookies[i].split('=');
66
+ var name = decode(parts.shift());
67
+ var cookie = decode(parts.join('='));
68
+
69
+ if (key && key === name) {
70
+ result = converted(cookie);
71
+ break;
72
+ }
73
+
74
+ if (!key) {
75
+ result[name] = converted(cookie);
76
+ }
77
+ }
78
+
79
+ return result;
80
+ };
81
+
82
+ config.defaults = {};
83
+
84
+ $.removeCookie = function (key, options) {
85
+ if ($.cookie(key) !== undefined) {
86
+ $.cookie(key, '', $.extend(options, { expires: -1 }));
87
+ return true;
88
+ }
89
+ return false;
90
+ };
91
+
92
+ }));
@@ -0,0 +1,447 @@
1
+ /* Modernizr 2.6.2 (Custom Build) | MIT & BSD
2
+ * Build: http://modernizr.com/download/#-shiv-cssclasses-addtest-testprop-testallprops-domprefixes-forms_placeholder-load
3
+ */
4
+ ;
5
+
6
+
7
+
8
+ window.Modernizr = (function( window, document, undefined ) {
9
+
10
+ var version = '2.6.2',
11
+
12
+ Modernizr = {},
13
+
14
+ enableClasses = true,
15
+
16
+ docElement = document.documentElement,
17
+
18
+ mod = 'modernizr',
19
+ modElem = document.createElement(mod),
20
+ mStyle = modElem.style,
21
+
22
+ inputElem = document.createElement('input') ,
23
+
24
+ smile = ':)',
25
+
26
+ toString = {}.toString, omPrefixes = 'Webkit Moz O ms',
27
+
28
+ cssomPrefixes = omPrefixes.split(' '),
29
+
30
+ domPrefixes = omPrefixes.toLowerCase().split(' '),
31
+
32
+
33
+ tests = {},
34
+ inputs = {},
35
+ attrs = {},
36
+
37
+ classes = [],
38
+
39
+ slice = classes.slice,
40
+
41
+ featureName,
42
+
43
+
44
+
45
+ _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
46
+
47
+ if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
48
+ hasOwnProp = function (object, property) {
49
+ return _hasOwnProperty.call(object, property);
50
+ };
51
+ }
52
+ else {
53
+ hasOwnProp = function (object, property) {
54
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
55
+ };
56
+ }
57
+
58
+
59
+ if (!Function.prototype.bind) {
60
+ Function.prototype.bind = function bind(that) {
61
+
62
+ var target = this;
63
+
64
+ if (typeof target != "function") {
65
+ throw new TypeError();
66
+ }
67
+
68
+ var args = slice.call(arguments, 1),
69
+ bound = function () {
70
+
71
+ if (this instanceof bound) {
72
+
73
+ var F = function(){};
74
+ F.prototype = target.prototype;
75
+ var self = new F();
76
+
77
+ var result = target.apply(
78
+ self,
79
+ args.concat(slice.call(arguments))
80
+ );
81
+ if (Object(result) === result) {
82
+ return result;
83
+ }
84
+ return self;
85
+
86
+ } else {
87
+
88
+ return target.apply(
89
+ that,
90
+ args.concat(slice.call(arguments))
91
+ );
92
+
93
+ }
94
+
95
+ };
96
+
97
+ return bound;
98
+ };
99
+ }
100
+
101
+ function setCss( str ) {
102
+ mStyle.cssText = str;
103
+ }
104
+
105
+ function setCssAll( str1, str2 ) {
106
+ return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
107
+ }
108
+
109
+ function is( obj, type ) {
110
+ return typeof obj === type;
111
+ }
112
+
113
+ function contains( str, substr ) {
114
+ return !!~('' + str).indexOf(substr);
115
+ }
116
+
117
+ function testProps( props, prefixed ) {
118
+ for ( var i in props ) {
119
+ var prop = props[i];
120
+ if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
121
+ return prefixed == 'pfx' ? prop : true;
122
+ }
123
+ }
124
+ return false;
125
+ }
126
+
127
+ function testDOMProps( props, obj, elem ) {
128
+ for ( var i in props ) {
129
+ var item = obj[props[i]];
130
+ if ( item !== undefined) {
131
+
132
+ if (elem === false) return props[i];
133
+
134
+ if (is(item, 'function')){
135
+ return item.bind(elem || obj);
136
+ }
137
+
138
+ return item;
139
+ }
140
+ }
141
+ return false;
142
+ }
143
+
144
+ function testPropsAll( prop, prefixed, elem ) {
145
+
146
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
147
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
148
+
149
+ if(is(prefixed, "string") || is(prefixed, "undefined")) {
150
+ return testProps(props, prefixed);
151
+
152
+ } else {
153
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
154
+ return testDOMProps(props, prefixed, elem);
155
+ }
156
+ } function webforms() {
157
+ Modernizr['input'] = (function( props ) {
158
+ for ( var i = 0, len = props.length; i < len; i++ ) {
159
+ attrs[ props[i] ] = !!(props[i] in inputElem);
160
+ }
161
+ if (attrs.list){
162
+ attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
163
+ }
164
+ return attrs;
165
+ })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
166
+ Modernizr['inputtypes'] = (function(props) {
167
+
168
+ for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
169
+
170
+ inputElem.setAttribute('type', inputElemType = props[i]);
171
+ bool = inputElem.type !== 'text';
172
+
173
+ if ( bool ) {
174
+
175
+ inputElem.value = smile;
176
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
177
+
178
+ if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
179
+
180
+ docElement.appendChild(inputElem);
181
+ defaultView = document.defaultView;
182
+
183
+ bool = defaultView.getComputedStyle &&
184
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
185
+ (inputElem.offsetHeight !== 0);
186
+
187
+ docElement.removeChild(inputElem);
188
+
189
+ } else if ( /^(search|tel)$/.test(inputElemType) ){
190
+ } else if ( /^(url|email)$/.test(inputElemType) ) {
191
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
192
+
193
+ } else {
194
+ bool = inputElem.value != smile;
195
+ }
196
+ }
197
+
198
+ inputs[ props[i] ] = !!bool;
199
+ }
200
+ return inputs;
201
+ })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
202
+ }
203
+ for ( var feature in tests ) {
204
+ if ( hasOwnProp(tests, feature) ) {
205
+ featureName = feature.toLowerCase();
206
+ Modernizr[featureName] = tests[feature]();
207
+
208
+ classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
209
+ }
210
+ }
211
+
212
+ Modernizr.input || webforms();
213
+
214
+
215
+ Modernizr.addTest = function ( feature, test ) {
216
+ if ( typeof feature == 'object' ) {
217
+ for ( var key in feature ) {
218
+ if ( hasOwnProp( feature, key ) ) {
219
+ Modernizr.addTest( key, feature[ key ] );
220
+ }
221
+ }
222
+ } else {
223
+
224
+ feature = feature.toLowerCase();
225
+
226
+ if ( Modernizr[feature] !== undefined ) {
227
+ return Modernizr;
228
+ }
229
+
230
+ test = typeof test == 'function' ? test() : test;
231
+
232
+ if (typeof enableClasses !== "undefined" && enableClasses) {
233
+ docElement.className += ' ' + (test ? '' : 'no-') + feature;
234
+ }
235
+ Modernizr[feature] = test;
236
+
237
+ }
238
+
239
+ return Modernizr;
240
+ };
241
+
242
+
243
+ setCss('');
244
+ modElem = inputElem = null;
245
+
246
+ ;(function(window, document) {
247
+ var options = window.html5 || {};
248
+
249
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
250
+
251
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
252
+
253
+ var supportsHtml5Styles;
254
+
255
+ var expando = '_html5shiv';
256
+
257
+ var expanID = 0;
258
+
259
+ var expandoData = {};
260
+
261
+ var supportsUnknownElements;
262
+
263
+ (function() {
264
+ try {
265
+ var a = document.createElement('a');
266
+ a.innerHTML = '<xyz></xyz>';
267
+ supportsHtml5Styles = ('hidden' in a);
268
+
269
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
270
+ (document.createElement)('a');
271
+ var frag = document.createDocumentFragment();
272
+ return (
273
+ typeof frag.cloneNode == 'undefined' ||
274
+ typeof frag.createDocumentFragment == 'undefined' ||
275
+ typeof frag.createElement == 'undefined'
276
+ );
277
+ }());
278
+ } catch(e) {
279
+ supportsHtml5Styles = true;
280
+ supportsUnknownElements = true;
281
+ }
282
+
283
+ }()); function addStyleSheet(ownerDocument, cssText) {
284
+ var p = ownerDocument.createElement('p'),
285
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
286
+
287
+ p.innerHTML = 'x<style>' + cssText + '</style>';
288
+ return parent.insertBefore(p.lastChild, parent.firstChild);
289
+ }
290
+
291
+ function getElements() {
292
+ var elements = html5.elements;
293
+ return typeof elements == 'string' ? elements.split(' ') : elements;
294
+ }
295
+
296
+ function getExpandoData(ownerDocument) {
297
+ var data = expandoData[ownerDocument[expando]];
298
+ if (!data) {
299
+ data = {};
300
+ expanID++;
301
+ ownerDocument[expando] = expanID;
302
+ expandoData[expanID] = data;
303
+ }
304
+ return data;
305
+ }
306
+
307
+ function createElement(nodeName, ownerDocument, data){
308
+ if (!ownerDocument) {
309
+ ownerDocument = document;
310
+ }
311
+ if(supportsUnknownElements){
312
+ return ownerDocument.createElement(nodeName);
313
+ }
314
+ if (!data) {
315
+ data = getExpandoData(ownerDocument);
316
+ }
317
+ var node;
318
+
319
+ if (data.cache[nodeName]) {
320
+ node = data.cache[nodeName].cloneNode();
321
+ } else if (saveClones.test(nodeName)) {
322
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
323
+ } else {
324
+ node = data.createElem(nodeName);
325
+ }
326
+
327
+ return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
328
+ }
329
+
330
+ function createDocumentFragment(ownerDocument, data){
331
+ if (!ownerDocument) {
332
+ ownerDocument = document;
333
+ }
334
+ if(supportsUnknownElements){
335
+ return ownerDocument.createDocumentFragment();
336
+ }
337
+ data = data || getExpandoData(ownerDocument);
338
+ var clone = data.frag.cloneNode(),
339
+ i = 0,
340
+ elems = getElements(),
341
+ l = elems.length;
342
+ for(;i<l;i++){
343
+ clone.createElement(elems[i]);
344
+ }
345
+ return clone;
346
+ }
347
+
348
+ function shivMethods(ownerDocument, data) {
349
+ if (!data.cache) {
350
+ data.cache = {};
351
+ data.createElem = ownerDocument.createElement;
352
+ data.createFrag = ownerDocument.createDocumentFragment;
353
+ data.frag = data.createFrag();
354
+ }
355
+
356
+
357
+ ownerDocument.createElement = function(nodeName) {
358
+ if (!html5.shivMethods) {
359
+ return data.createElem(nodeName);
360
+ }
361
+ return createElement(nodeName, ownerDocument, data);
362
+ };
363
+
364
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
365
+ 'var n=f.cloneNode(),c=n.createElement;' +
366
+ 'h.shivMethods&&(' +
367
+ getElements().join().replace(/\w+/g, function(nodeName) {
368
+ data.createElem(nodeName);
369
+ data.frag.createElement(nodeName);
370
+ return 'c("' + nodeName + '")';
371
+ }) +
372
+ ');return n}'
373
+ )(html5, data.frag);
374
+ } function shivDocument(ownerDocument) {
375
+ if (!ownerDocument) {
376
+ ownerDocument = document;
377
+ }
378
+ var data = getExpandoData(ownerDocument);
379
+
380
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
381
+ data.hasCSS = !!addStyleSheet(ownerDocument,
382
+ 'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
383
+ 'mark{background:#FF0;color:#000}'
384
+ );
385
+ }
386
+ if (!supportsUnknownElements) {
387
+ shivMethods(ownerDocument, data);
388
+ }
389
+ return ownerDocument;
390
+ } var html5 = {
391
+
392
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
393
+
394
+ 'shivCSS': (options.shivCSS !== false),
395
+
396
+ 'supportsUnknownElements': supportsUnknownElements,
397
+
398
+ 'shivMethods': (options.shivMethods !== false),
399
+
400
+ 'type': 'default',
401
+
402
+ 'shivDocument': shivDocument,
403
+
404
+ createElement: createElement,
405
+
406
+ createDocumentFragment: createDocumentFragment
407
+ }; window.html5 = html5;
408
+
409
+ shivDocument(document);
410
+
411
+ }(this, document));
412
+
413
+ Modernizr._version = version;
414
+
415
+ Modernizr._domPrefixes = domPrefixes;
416
+ Modernizr._cssomPrefixes = cssomPrefixes;
417
+
418
+
419
+
420
+ Modernizr.testProp = function(prop){
421
+ return testProps([prop]);
422
+ };
423
+
424
+ Modernizr.testAllProps = testPropsAll;
425
+
426
+ docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
427
+
428
+ (enableClasses ? ' js ' + classes.join(' ') : '');
429
+
430
+ return Modernizr;
431
+
432
+ })(this, this.document);
433
+ /*yepnope1.5.4|WTFPL*/
434
+ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}})(this,document);
435
+ Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0));};
436
+ // testing for placeholder attribute in inputs and textareas
437
+ // re-using Modernizr.input if available
438
+
439
+ Modernizr.addTest('placeholder', function(){
440
+
441
+ return !!( 'placeholder' in ( Modernizr.input || document.createElement('input') ) &&
442
+ 'placeholder' in ( Modernizr.textarea || document.createElement('textarea') )
443
+ );
444
+
445
+ });
446
+ ;
447
+