jekyll-theme-hydejack 8.4.0 → 8.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -7
  3. data/_includes/body/footer.html +1 -1
  4. data/_includes/body/menu.html +12 -0
  5. data/_includes/body/scripts.html +4 -17
  6. data/_includes/components/post-list-item.html +1 -3
  7. data/_includes/head/links.html +1 -1
  8. data/_includes/head/meta.html +1 -1
  9. data/_includes/head/scripts.html +9 -15
  10. data/_includes/head/styles.html +10 -22
  11. data/_includes/header.txt +1 -1
  12. data/_includes/styles/inline.scss +3 -13
  13. data/_includes/styles/page-style.scss +8 -0
  14. data/_includes/styles/style.scss +5 -15
  15. data/_includes/templates/back.html +2 -2
  16. data/_includes/templates/forward.html +6 -0
  17. data/_includes/templates/index.html +1 -0
  18. data/_layouts/base.html +1 -1
  19. data/_layouts/compress.html +1 -1
  20. data/_sass/_variables.scss +1 -1
  21. data/_sass/hydejack/__link__/_images.scss +4 -0
  22. data/_sass/hydejack/_images.pre.scss +4 -0
  23. data/_sass/pooleparty/__inline__/_base.scss +4 -0
  24. data/_sass/pooleparty/__link__/_table.scss +0 -1
  25. data/_sass/pooleparty/_base.pre.scss +4 -0
  26. data/_sass/pooleparty/_table.pre.scss +0 -1
  27. data/assets/bower.json +1 -2
  28. data/assets/bower_components/katex/.bower.json +5 -5
  29. data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  30. data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  31. data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  32. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  33. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  34. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  35. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  36. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  37. data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  38. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  39. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  40. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  41. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  42. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  43. data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  44. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  45. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  46. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  47. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  48. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  49. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  50. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  51. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  52. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  53. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  54. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  55. data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  56. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  57. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  58. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  59. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  60. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  61. data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  62. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  63. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  64. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  65. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  66. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  67. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  68. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  69. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  70. data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  71. data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  72. data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  73. data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  74. data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  75. data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  76. data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  77. data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  78. data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  79. data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  80. data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  81. data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  82. data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  83. data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  84. data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  85. data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  86. data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  87. data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  88. data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  89. data/assets/bower_components/katex/dist/katex.css +10 -0
  90. data/assets/bower_components/katex/dist/katex.js +541 -249
  91. data/assets/bower_components/katex/dist/katex.min.css +1 -1
  92. data/assets/bower_components/katex/dist/katex.min.js +1 -1
  93. data/assets/bower_components/katex/dist/katex.mjs +418 -198
  94. data/assets/css/{hydejack-8.4.0.css → hydejack-8.5.0.css} +0 -0
  95. data/assets/icomoon/fonts/icomoon.eot +0 -0
  96. data/assets/icomoon/fonts/icomoon.svg +2 -0
  97. data/assets/icomoon/fonts/icomoon.ttf +0 -0
  98. data/assets/icomoon/fonts/icomoon.woff +0 -0
  99. data/assets/icomoon/selection.json +1 -2555
  100. data/assets/icomoon/style.css +11 -5
  101. data/assets/img/blog/louis-hansel.jpg +0 -0
  102. data/assets/js/hydejack-8.5.0.js +162 -0
  103. data/assets/js/hydejack-8.5.0.js.map +1 -0
  104. data/assets/js/hydejack-legacy-8.5.0.js +191 -0
  105. data/assets/js/hydejack-legacy-8.5.0.js.map +1 -0
  106. data/assets/version.json +1 -1
  107. metadata +9 -22
  108. data/assets/bower_components/fontfaceobserver/.bower.json +0 -33
  109. data/assets/bower_components/fontfaceobserver/.gitignore +0 -2
  110. data/assets/bower_components/fontfaceobserver/.travis.yml +0 -16
  111. data/assets/bower_components/fontfaceobserver/Gruntfile.js +0 -101
  112. data/assets/bower_components/fontfaceobserver/LICENSE +0 -23
  113. data/assets/bower_components/fontfaceobserver/bower.json +0 -22
  114. data/assets/bower_components/fontfaceobserver/exports.js +0 -8
  115. data/assets/bower_components/fontfaceobserver/externs-commonjs.js +0 -10
  116. data/assets/bower_components/fontfaceobserver/externs.js +0 -15
  117. data/assets/bower_components/fontfaceobserver/fontfaceobserver.js +0 -12
  118. data/assets/bower_components/fontfaceobserver/fontfaceobserver.standalone.js +0 -8
  119. data/assets/bower_components/fontfaceobserver/package.json +0 -57
  120. data/assets/bower_components/fontfaceobserver/src/descriptors.js +0 -10
  121. data/assets/bower_components/fontfaceobserver/src/observer.js +0 -349
  122. data/assets/bower_components/fontfaceobserver/src/ruler.js +0 -130
  123. data/assets/bower_components/fontfaceobserver/vendor/google/base.js +0 -1489
  124. data/assets/js/hydejack-8.3.1.js +0 -47
  125. data/assets/js/hydejack-8.3.2.js +0 -47
  126. data/assets/js/hydejack-8.4.0.js +0 -47
@@ -1,33 +0,0 @@
1
- {
2
- "name": "fontfaceobserver",
3
- "description": "Fast and simple web font loading.",
4
- "main": "fontfaceobserver.standalone.js",
5
- "authors": [
6
- "Bram Stein <b.l.stein@gmail.com> (http://www.bramstein.com/)"
7
- ],
8
- "license": "BSD-3-Clause",
9
- "keywords": [
10
- "fontloader",
11
- "fonts",
12
- "font",
13
- "font-face",
14
- "web",
15
- "font",
16
- "font",
17
- "load",
18
- "font",
19
- "events"
20
- ],
21
- "homepage": "https://github.com/bramstein/fontfaceobserver",
22
- "version": "2.0.13",
23
- "_release": "2.0.13",
24
- "_resolution": {
25
- "type": "version",
26
- "tag": "v2.0.13",
27
- "commit": "ed2bd9d70400f4ecc2c832543a30ef58589801b5"
28
- },
29
- "_source": "https://github.com/bramstein/fontfaceobserver.git",
30
- "_target": "^2.0.13",
31
- "_originalSource": "fontfaceobserver",
32
- "_direct": true
33
- }
@@ -1,2 +0,0 @@
1
- build
2
- node_modules
@@ -1,16 +0,0 @@
1
- sudo: false
2
-
3
- language: node_js
4
-
5
- before_install:
6
- - npm install -g grunt-cli
7
-
8
- node_js:
9
- - "4"
10
-
11
- matrix:
12
- fast_finish: true
13
-
14
- cache:
15
- directories:
16
- - node_modules
@@ -1,101 +0,0 @@
1
- var extend = require('extend');
2
-
3
- module.exports = function (grunt) {
4
- require('google-closure-compiler').grunt(grunt);
5
-
6
- var compilerOptions = {
7
- compilation_level: 'ADVANCED_OPTIMIZATIONS',
8
- warning_level: 'VERBOSE',
9
- summary_detail_level: 3,
10
- language_in: 'ECMASCRIPT5_STRICT',
11
- output_wrapper: '(function(){%output%}());',
12
- use_types_for_optimization: true,
13
- externs: ['externs-commonjs.js']
14
- };
15
-
16
- var src = [
17
- 'node_modules/closure-dom/src/dom.js',
18
- 'src/descriptors.js',
19
- 'src/ruler.js',
20
- 'src/observer.js',
21
- 'exports.js'
22
- ];
23
-
24
- grunt.initConfig({
25
- pkg: grunt.file.readJSON('package.json'),
26
- clean: {
27
- options: {
28
- force: true
29
- },
30
- build: ['build']
31
- },
32
- exec: {
33
- test: 'phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html',
34
- deps: 'calcdeps -i src -i exports.js -p src -p ./vendor/google/base.js -p node_modules/closure-dom/src/dom.js -o deps > test/deps.js'
35
- },
36
- jshint: {
37
- all: ['src/**/*.js'],
38
- options: {
39
- // ... better written as dot notation
40
- '-W069': true,
41
-
42
- // type definitions
43
- '-W030': true,
44
-
45
- // Don't make functions within loops
46
- '-W083': true,
47
-
48
- // Wrap the /regexp/ literal in parens to disambiguate the slash operator
49
- '-W092': true
50
- }
51
- },
52
- 'closure-compiler': {
53
- dist: {
54
- files: {
55
- 'fontfaceobserver.js': src
56
- },
57
- options: compilerOptions
58
- },
59
- compile: {
60
- files: {
61
- 'build/fontfaceobserver.js': src
62
- },
63
- options: compilerOptions
64
- },
65
- debug: {
66
- files: {
67
- 'build/fontfaceobserver.debug.js': src
68
- },
69
- options: extend({}, compilerOptions, {
70
- debug: true,
71
- formatting: ['PRETTY_PRINT', 'PRINT_INPUT_DELIMITER']
72
- })
73
- }
74
- },
75
- concat: {
76
- options: {
77
- banner: '/* Font Face Observer v<%= pkg.version %> - © Bram Stein. License: BSD-3-Clause */'
78
- },
79
- dist_promises: {
80
- src: ['node_modules/promis/promise.js', 'build/fontfaceobserver.js'],
81
- dest: 'fontfaceobserver.js'
82
- },
83
- dist: {
84
- src: ['build/fontfaceobserver.js'],
85
- dest: 'fontfaceobserver.standalone.js'
86
- }
87
- }
88
- });
89
-
90
- grunt.loadNpmTasks('grunt-closurecompiler');
91
- grunt.loadNpmTasks('grunt-contrib-clean');
92
- grunt.loadNpmTasks('grunt-contrib-jshint');
93
- grunt.loadNpmTasks('grunt-contrib-concat');
94
- grunt.loadNpmTasks('grunt-exec');
95
-
96
- grunt.registerTask('compile', ['closure-compiler:compile']);
97
- grunt.registerTask('debug', ['closure-compiler:debug']);
98
- grunt.registerTask('default', ['compile']);
99
- grunt.registerTask('test', ['jshint', 'exec:test']);
100
- grunt.registerTask('dist', ['clean', 'closure-compiler:compile', 'concat:dist', 'concat:dist_promises']);
101
- };
@@ -1,23 +0,0 @@
1
- Copyright (c) 2014 - Bram Stein
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions
6
- are met:
7
-
8
- 1. Redistributions of source code must retain the above copyright
9
- notice, this list of conditions and the following disclaimer.
10
- 2. Redistributions in binary form must reproduce the above copyright
11
- notice, this list of conditions and the following disclaimer in the
12
- documentation and/or other materials provided with the distribution.
13
-
14
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
15
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17
- EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,22 +0,0 @@
1
- {
2
- "name": "fontfaceobserver",
3
- "description": "Fast and simple web font loading.",
4
- "main": "fontfaceobserver.standalone.js",
5
- "authors": [
6
- "Bram Stein <b.l.stein@gmail.com> (http://www.bramstein.com/)"
7
- ],
8
- "license": "BSD-3-Clause",
9
- "keywords": [
10
- "fontloader",
11
- "fonts",
12
- "font",
13
- "font-face",
14
- "web",
15
- "font",
16
- "font",
17
- "load",
18
- "font",
19
- "events"
20
- ],
21
- "homepage": "https://github.com/bramstein/fontfaceobserver"
22
- }
@@ -1,8 +0,0 @@
1
- goog.require('fontface.Observer');
2
-
3
- if (typeof module === 'object') {
4
- module.exports = fontface.Observer;
5
- } else {
6
- window['FontFaceObserver'] = fontface.Observer;
7
- window['FontFaceObserver']['prototype']['load'] = fontface.Observer.prototype.load;
8
- }
@@ -1,10 +0,0 @@
1
-
2
- /**
3
- * @type {Object}
4
- */
5
- var module = {};
6
-
7
- /**
8
- * @type {Object}
9
- */
10
- module.exports = {};
@@ -1,15 +0,0 @@
1
- /**
2
- * @constructor
3
- *
4
- * @param {string} family
5
- * @param {Object} descriptors
6
- */
7
- var FontFaceObserver = function (family, descriptors) {};
8
-
9
- /**
10
- * @param {string=} opt_text
11
- * @param {number=} opt_timeout
12
- *
13
- * @return {Promise.<FontFaceObserver>}
14
- */
15
- FontFaceObserver.prototype.load = function (opt_text, opt_timeout) {};
@@ -1,12 +0,0 @@
1
- /* Font Face Observer v2.0.13 - © Bram Stein. License: BSD-3-Clause */(function(){'use strict';var f,g=[];function l(a){g.push(a);1==g.length&&f()}function m(){for(;g.length;)g[0](),g.shift()}f=function(){setTimeout(m)};function n(a){this.a=p;this.b=void 0;this.f=[];var b=this;try{a(function(a){q(b,a)},function(a){r(b,a)})}catch(c){r(b,c)}}var p=2;function t(a){return new n(function(b,c){c(a)})}function u(a){return new n(function(b){b(a)})}function q(a,b){if(a.a==p){if(b==a)throw new TypeError;var c=!1;try{var d=b&&b.then;if(null!=b&&"object"==typeof b&&"function"==typeof d){d.call(b,function(b){c||q(a,b);c=!0},function(b){c||r(a,b);c=!0});return}}catch(e){c||r(a,e);return}a.a=0;a.b=b;v(a)}}
2
- function r(a,b){if(a.a==p){if(b==a)throw new TypeError;a.a=1;a.b=b;v(a)}}function v(a){l(function(){if(a.a!=p)for(;a.f.length;){var b=a.f.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0==a.a?"function"==typeof c?e(c.call(void 0,a.b)):e(a.b):1==a.a&&("function"==typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}})}n.prototype.g=function(a){return this.c(void 0,a)};n.prototype.c=function(a,b){var c=this;return new n(function(d,e){c.f.push([a,b,d,e]);v(c)})};
3
- function w(a){return new n(function(b,c){function d(c){return function(d){h[c]=d;e+=1;e==a.length&&b(h)}}var e=0,h=[];0==a.length&&b(h);for(var k=0;k<a.length;k+=1)u(a[k]).c(d(k),c)})}function x(a){return new n(function(b,c){for(var d=0;d<a.length;d+=1)u(a[d]).c(b,c)})};window.Promise||(window.Promise=n,window.Promise.resolve=u,window.Promise.reject=t,window.Promise.race=x,window.Promise.all=w,window.Promise.prototype.then=n.prototype.c,window.Promise.prototype["catch"]=n.prototype.g);}());
4
-
5
- (function(){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c);a()}):document.attachEvent("onreadystatechange",function k(){if("interactive"==document.readyState||"complete"==document.readyState)document.detachEvent("onreadystatechange",k),a()})};function r(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
6
- this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
7
- function t(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function y(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function z(a,b){function c(){var a=k;y(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);y(a)};function A(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var B=null,C=null,E=null,F=null;function G(){if(null===C)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);C=!!a&&603>parseInt(a[1],10)}else C=!1;return C}function J(){null===F&&(F=!!document.fonts);return F}
8
- function K(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:"","100px",b].join(" ")}
9
- A.prototype.load=function(a,b){var c=this,k=a||"BESbswy",q=0,D=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=D?b():document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},function(){b()})}e()}),N=new Promise(function(a,c){q=setTimeout(c,D)});Promise.race([N,M]).then(function(){clearTimeout(q);a(c)},function(){b(c)})}else m(function(){function u(){var b;if(b=-1!=
10
- f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===B&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),B=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=B&&(f==v&&g==v&&h==v||f==w&&g==w&&h==w||f==x&&g==x&&h==x)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(q),a(c))}function I(){if((new Date).getTime()-H>=D)d.parentNode&&d.parentNode.removeChild(d),b(c);else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,
11
- g=n.a.offsetWidth,h=p.a.offsetWidth,u();q=setTimeout(I,50)}}var e=new r(k),n=new r(k),p=new r(k),f=-1,g=-1,h=-1,v=-1,w=-1,x=-1,d=document.createElement("div");d.dir="ltr";t(e,L(c,"sans-serif"));t(n,L(c,"serif"));t(p,L(c,"monospace"));d.appendChild(e.a);d.appendChild(n.a);d.appendChild(p.a);document.body.appendChild(d);v=e.a.offsetWidth;w=n.a.offsetWidth;x=p.a.offsetWidth;I();z(e,function(a){f=a;u()});t(e,L(c,'"'+c.family+'",sans-serif'));z(n,function(a){g=a;u()});t(n,L(c,'"'+c.family+'",serif'));
12
- z(p,function(a){h=a;u()});t(p,L(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=A:(window.FontFaceObserver=A,window.FontFaceObserver.prototype.load=A.prototype.load);}());
@@ -1,8 +0,0 @@
1
- /* Font Face Observer v2.0.13 - © Bram Stein. License: BSD-3-Clause */(function(){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c);a()}):document.attachEvent("onreadystatechange",function k(){if("interactive"==document.readyState||"complete"==document.readyState)document.detachEvent("onreadystatechange",k),a()})};function r(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
2
- this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
3
- function t(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function y(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function z(a,b){function c(){var a=k;y(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);y(a)};function A(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var B=null,C=null,E=null,F=null;function G(){if(null===C)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);C=!!a&&603>parseInt(a[1],10)}else C=!1;return C}function J(){null===F&&(F=!!document.fonts);return F}
4
- function K(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:"","100px",b].join(" ")}
5
- A.prototype.load=function(a,b){var c=this,k=a||"BESbswy",q=0,D=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=D?b():document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},function(){b()})}e()}),N=new Promise(function(a,c){q=setTimeout(c,D)});Promise.race([N,M]).then(function(){clearTimeout(q);a(c)},function(){b(c)})}else m(function(){function u(){var b;if(b=-1!=
6
- f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===B&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),B=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=B&&(f==v&&g==v&&h==v||f==w&&g==w&&h==w||f==x&&g==x&&h==x)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(q),a(c))}function I(){if((new Date).getTime()-H>=D)d.parentNode&&d.parentNode.removeChild(d),b(c);else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,
7
- g=n.a.offsetWidth,h=p.a.offsetWidth,u();q=setTimeout(I,50)}}var e=new r(k),n=new r(k),p=new r(k),f=-1,g=-1,h=-1,v=-1,w=-1,x=-1,d=document.createElement("div");d.dir="ltr";t(e,L(c,"sans-serif"));t(n,L(c,"serif"));t(p,L(c,"monospace"));d.appendChild(e.a);d.appendChild(n.a);d.appendChild(p.a);document.body.appendChild(d);v=e.a.offsetWidth;w=n.a.offsetWidth;x=p.a.offsetWidth;I();z(e,function(a){f=a;u()});t(e,L(c,'"'+c.family+'",sans-serif'));z(n,function(a){g=a;u()});t(n,L(c,'"'+c.family+'",serif'));
8
- z(p,function(a){h=a;u()});t(p,L(c,'"'+c.family+'",monospace'))})})};"object"===typeof module?module.exports=A:(window.FontFaceObserver=A,window.FontFaceObserver.prototype.load=A.prototype.load);}());
@@ -1,57 +0,0 @@
1
- {
2
- "name": "fontfaceobserver",
3
- "version": "2.0.13",
4
- "description": "Detect if web fonts are available",
5
- "directories": {
6
- "test": "test"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/bramstein/fontfaceobserver.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/bramstein/fontfaceobserver/issues"
14
- },
15
- "homepage": "https://fontfaceobserver.com/",
16
- "main": "fontfaceobserver.standalone.js",
17
- "keywords": [
18
- "fontloader",
19
- "fonts",
20
- "font",
21
- "font-face",
22
- "web font",
23
- "font load",
24
- "font events"
25
- ],
26
- "files": [
27
- "fontfaceobserver.js",
28
- "fontfaceobserver.standalone.js",
29
- "src/*.js",
30
- "externs.js"
31
- ],
32
- "author": "Bram Stein <b.l.stein@gmail.com> (http://www.bramstein.com/)",
33
- "license": "BSD-3-Clause",
34
- "dependencies": {},
35
- "devDependencies": {
36
- "closure-dom": "=0.2.6",
37
- "extend": "^3.0.0",
38
- "google-closure-compiler": "=20161024.0.0",
39
- "grunt": "^0.4.5",
40
- "grunt-contrib-clean": "^1.0.0",
41
- "grunt-contrib-concat": "^1.0.1",
42
- "grunt-contrib-jshint": "^1.0.0",
43
- "grunt-exec": "~1.0.0",
44
- "mocha": "^2.5.3",
45
- "mocha-phantomjs-core": "^2.0.0",
46
- "phantomjs-prebuilt": "^2.1.7",
47
- "promis": "=1.1.4",
48
- "sinon": "^1.17.4",
49
- "unexpected": "^10.14.2"
50
- },
51
- "scripts": {
52
- "preversion": "npm test",
53
- "version": "grunt dist && git add fontfaceobserver.js && git add fontfaceobserver.standalone.js",
54
- "postversion": "git push && git push --tags && rm -rf build && npm publish",
55
- "test": "grunt test"
56
- }
57
- }
@@ -1,10 +0,0 @@
1
- goog.provide('fontface.Descriptors');
2
-
3
- /**
4
- * @typedef {{
5
- * style: (string|undefined),
6
- * weight: (string|undefined),
7
- * stretch: (string|undefined)
8
- * }}
9
- */
10
- fontface.Descriptors;
@@ -1,349 +0,0 @@
1
- goog.provide('fontface.Observer');
2
-
3
- goog.require('fontface.Ruler');
4
- goog.require('dom');
5
-
6
- goog.scope(function () {
7
- var Ruler = fontface.Ruler;
8
-
9
- /**
10
- * @constructor
11
- *
12
- * @param {string} family
13
- * @param {fontface.Descriptors=} opt_descriptors
14
- */
15
- fontface.Observer = function (family, opt_descriptors) {
16
- var descriptors = opt_descriptors || {};
17
-
18
- /**
19
- * @type {string}
20
- */
21
- this['family'] = family;
22
-
23
- /**
24
- * @type {string}
25
- */
26
- this['style'] = descriptors.style || 'normal';
27
-
28
- /**
29
- * @type {string}
30
- */
31
- this['weight'] = descriptors.weight || 'normal';
32
-
33
- /**
34
- * @type {string}
35
- */
36
- this['stretch'] = descriptors.stretch || 'normal';
37
- };
38
-
39
- var Observer = fontface.Observer;
40
-
41
- /**
42
- * @type {null|boolean}
43
- */
44
- Observer.HAS_WEBKIT_FALLBACK_BUG = null;
45
-
46
- /**
47
- * @type {null|boolean}
48
- */
49
- Observer.HAS_SAFARI_10_BUG = null;
50
-
51
- /**
52
- * @type {null|boolean}
53
- */
54
- Observer.SUPPORTS_STRETCH = null;
55
-
56
- /**
57
- * @type {null|boolean}
58
- */
59
- Observer.SUPPORTS_NATIVE_FONT_LOADING = null;
60
-
61
- /**
62
- * @type {number}
63
- */
64
- Observer.DEFAULT_TIMEOUT = 3000;
65
-
66
- /**
67
- * @return {string}
68
- */
69
- Observer.getUserAgent = function () {
70
- return window.navigator.userAgent;
71
- };
72
-
73
- /**
74
- * @return {string}
75
- */
76
- Observer.getNavigatorVendor = function () {
77
- return window.navigator.vendor;
78
- };
79
-
80
- /**
81
- * Returns true if this browser is WebKit and it has the fallback bug
82
- * which is present in WebKit 536.11 and earlier.
83
- *
84
- * @return {boolean}
85
- */
86
- Observer.hasWebKitFallbackBug = function () {
87
- if (Observer.HAS_WEBKIT_FALLBACK_BUG === null) {
88
- var match = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(Observer.getUserAgent());
89
-
90
- Observer.HAS_WEBKIT_FALLBACK_BUG = !!match &&
91
- (parseInt(match[1], 10) < 536 ||
92
- (parseInt(match[1], 10) === 536 &&
93
- parseInt(match[2], 10) <= 11));
94
- }
95
- return Observer.HAS_WEBKIT_FALLBACK_BUG;
96
- };
97
-
98
- /**
99
- * Returns true if the browser has the Safari 10 bugs. The
100
- * native font load API in Safari 10 has two bugs that cause
101
- * the document.fonts.load and FontFace.prototype.load methods
102
- * to return promises that don't reliably get settled.
103
- *
104
- * The bugs are described in more detail here:
105
- * - https://bugs.webkit.org/show_bug.cgi?id=165037
106
- * - https://bugs.webkit.org/show_bug.cgi?id=164902
107
- *
108
- * If the browser is made by Apple, and has native font
109
- * loading support, it is potentially affected. But the API
110
- * was fixed around AppleWebKit version 603, so any newer
111
- * versions that that does not contain the bug.
112
- *
113
- * @return {boolean}
114
- */
115
- Observer.hasSafari10Bug = function () {
116
- if (Observer.HAS_SAFARI_10_BUG === null) {
117
- if (Observer.supportsNativeFontLoading() && /Apple/.test(Observer.getNavigatorVendor())) {
118
- var match = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(Observer.getUserAgent());
119
-
120
- Observer.HAS_SAFARI_10_BUG = !!match && parseInt(match[1], 10) < 603;
121
- } else {
122
- Observer.HAS_SAFARI_10_BUG = false;
123
- }
124
- }
125
- return Observer.HAS_SAFARI_10_BUG;
126
- };
127
-
128
- /**
129
- * Returns true if the browser supports the native font loading
130
- * API.
131
- *
132
- * @return {boolean}
133
- */
134
- Observer.supportsNativeFontLoading = function () {
135
- if (Observer.SUPPORTS_NATIVE_FONT_LOADING === null) {
136
- Observer.SUPPORTS_NATIVE_FONT_LOADING = !!document['fonts'];
137
- }
138
- return Observer.SUPPORTS_NATIVE_FONT_LOADING;
139
- };
140
-
141
- /**
142
- * Returns true if the browser supports font-style in the font
143
- * short-hand syntax.
144
- *
145
- * @return {boolean}
146
- */
147
- Observer.supportStretch = function () {
148
- if (Observer.SUPPORTS_STRETCH === null) {
149
- var div = dom.createElement('div');
150
-
151
- try {
152
- div.style.font = 'condensed 100px sans-serif';
153
- } catch (e) {}
154
- Observer.SUPPORTS_STRETCH = (div.style.font !== '');
155
- }
156
-
157
- return Observer.SUPPORTS_STRETCH;
158
- };
159
-
160
- /**
161
- * @private
162
- *
163
- * @param {string} family
164
- * @return {string}
165
- */
166
- Observer.prototype.getStyle = function (family) {
167
- return [this['style'], this['weight'], Observer.supportStretch() ? this['stretch'] : '', '100px', family].join(' ');
168
- };
169
-
170
- /**
171
- * Returns the current time in milliseconds
172
- *
173
- * @return {number}
174
- */
175
- Observer.prototype.getTime = function () {
176
- return new Date().getTime();
177
- };
178
-
179
- /**
180
- * @param {string=} text Optional test string to use for detecting if a font is available.
181
- * @param {number=} timeout Optional timeout for giving up on font load detection and rejecting the promise (defaults to 3 seconds).
182
- * @return {Promise.<fontface.Observer>}
183
- */
184
- Observer.prototype.load = function (text, timeout) {
185
- var that = this;
186
- var testString = text || 'BESbswy';
187
- var timeoutId = 0;
188
- var timeoutValue = timeout || Observer.DEFAULT_TIMEOUT;
189
- var start = that.getTime();
190
-
191
- return new Promise(function (resolve, reject) {
192
- if (Observer.supportsNativeFontLoading() && !Observer.hasSafari10Bug()) {
193
- var loader = new Promise(function (resolve, reject) {
194
- var check = function () {
195
- var now = that.getTime();
196
-
197
- if (now - start >= timeoutValue) {
198
- reject();
199
- } else {
200
- document.fonts.load(that.getStyle('"' + that['family'] + '"'), testString).then(function (fonts) {
201
- if (fonts.length >= 1) {
202
- resolve();
203
- } else {
204
- setTimeout(check, 25);
205
- }
206
- }, function () {
207
- reject();
208
- });
209
- }
210
- };
211
- check();
212
- });
213
-
214
- var timer = new Promise(function (resolve, reject) {
215
- timeoutId = setTimeout(reject, timeoutValue);
216
- });
217
-
218
- Promise.race([timer, loader]).then(function () {
219
- clearTimeout(timeoutId);
220
- resolve(that);
221
- }, function () {
222
- reject(that);
223
- });
224
- } else {
225
- dom.waitForBody(function () {
226
- var rulerA = new Ruler(testString);
227
- var rulerB = new Ruler(testString);
228
- var rulerC = new Ruler(testString);
229
-
230
- var widthA = -1;
231
- var widthB = -1;
232
- var widthC = -1;
233
-
234
- var fallbackWidthA = -1;
235
- var fallbackWidthB = -1;
236
- var fallbackWidthC = -1;
237
-
238
- var container = dom.createElement('div');
239
-
240
- /**
241
- * @private
242
- */
243
- function removeContainer() {
244
- if (container.parentNode !== null) {
245
- dom.remove(container.parentNode, container);
246
- }
247
- }
248
-
249
- /**
250
- * @private
251
- *
252
- * If metric compatible fonts are detected, one of the widths will be -1. This is
253
- * because a metric compatible font won't trigger a scroll event. We work around
254
- * this by considering a font loaded if at least two of the widths are the same.
255
- * Because we have three widths, this still prevents false positives.
256
- *
257
- * Cases:
258
- * 1) Font loads: both a, b and c are called and have the same value.
259
- * 2) Font fails to load: resize callback is never called and timeout happens.
260
- * 3) WebKit bug: both a, b and c are called and have the same value, but the
261
- * values are equal to one of the last resort fonts, we ignore this and
262
- * continue waiting until we get new values (or a timeout).
263
- */
264
- function check() {
265
- if ((widthA != -1 && widthB != -1) || (widthA != -1 && widthC != -1) || (widthB != -1 && widthC != -1)) {
266
- if (widthA == widthB || widthA == widthC || widthB == widthC) {
267
- // All values are the same, so the browser has most likely loaded the web font
268
-
269
- if (Observer.hasWebKitFallbackBug()) {
270
- // Except if the browser has the WebKit fallback bug, in which case we check to see if all
271
- // values are set to one of the last resort fonts.
272
-
273
- if (((widthA == fallbackWidthA && widthB == fallbackWidthA && widthC == fallbackWidthA) ||
274
- (widthA == fallbackWidthB && widthB == fallbackWidthB && widthC == fallbackWidthB) ||
275
- (widthA == fallbackWidthC && widthB == fallbackWidthC && widthC == fallbackWidthC))) {
276
- // The width we got matches some of the known last resort fonts, so let's assume we're dealing with the last resort font.
277
- return;
278
- }
279
- }
280
- removeContainer();
281
- clearTimeout(timeoutId);
282
- resolve(that);
283
- }
284
- }
285
- }
286
-
287
- // This ensures the scroll direction is correct.
288
- container.dir = 'ltr';
289
-
290
- rulerA.setFont(that.getStyle('sans-serif'));
291
- rulerB.setFont(that.getStyle('serif'));
292
- rulerC.setFont(that.getStyle('monospace'));
293
-
294
- dom.append(container, rulerA.getElement());
295
- dom.append(container, rulerB.getElement());
296
- dom.append(container, rulerC.getElement());
297
-
298
- dom.append(document.body, container);
299
-
300
- fallbackWidthA = rulerA.getWidth();
301
- fallbackWidthB = rulerB.getWidth();
302
- fallbackWidthC = rulerC.getWidth();
303
-
304
- function checkForTimeout() {
305
- var now = that.getTime();
306
-
307
- if (now - start >= timeoutValue) {
308
- removeContainer();
309
- reject(that);
310
- } else {
311
- var hidden = document['hidden'];
312
- if (hidden === true || hidden === undefined) {
313
- widthA = rulerA.getWidth();
314
- widthB = rulerB.getWidth();
315
- widthC = rulerC.getWidth();
316
- check();
317
- }
318
- timeoutId = setTimeout(checkForTimeout, 50);
319
- }
320
- }
321
-
322
- checkForTimeout();
323
-
324
-
325
- rulerA.onResize(function (width) {
326
- widthA = width;
327
- check();
328
- });
329
-
330
- rulerA.setFont(that.getStyle('"' + that['family'] + '",sans-serif'));
331
-
332
- rulerB.onResize(function (width) {
333
- widthB = width;
334
- check();
335
- });
336
-
337
- rulerB.setFont(that.getStyle('"' + that['family'] + '",serif'));
338
-
339
- rulerC.onResize(function (width) {
340
- widthC = width;
341
- check();
342
- });
343
-
344
- rulerC.setFont(that.getStyle('"' + that['family'] + '",monospace'));
345
- });
346
- }
347
- });
348
- };
349
- });