jekyll-theme-hydejack 7.5.2 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -4
- data/README.md +139 -86
- data/_includes/body/analytics.html +36 -0
- data/_includes/{comments.html → body/comments.html} +0 -0
- data/_includes/{footer.html → body/footer.html} +4 -2
- data/_includes/body/index.html +22 -0
- data/_includes/body/main.html +18 -0
- data/_includes/{menu.html → body/menu.html} +1 -0
- data/_includes/{nav.html → body/nav.html} +0 -0
- data/_includes/body/scripts.html +22 -0
- data/_includes/{sidebar.html → body/sidebar.html} +19 -6
- data/_includes/{about.html → components/about.html} +1 -1
- data/_includes/{author.html → components/author.html} +3 -3
- data/_includes/{avatar-tag.html → components/avatar-tag.html} +0 -0
- data/_includes/{srcset-img.html → components/hy-img.html} +24 -8
- data/_includes/{link.html → components/link.html} +0 -0
- data/_includes/{message.html → components/message.html} +0 -0
- data/_includes/{pagination.html → components/pagination.html} +2 -2
- data/_includes/{post-list-item.html → components/post-list-item.html} +0 -0
- data/_includes/{post.html → components/post.html} +21 -10
- data/_includes/{related-posts.html → components/related-posts.html} +1 -1
- data/_includes/components/social-list-item.html +40 -0
- data/_includes/components/social.html +23 -0
- data/_includes/{tag-list.html → components/tag-list.html} +0 -0
- data/_includes/head/index.html +9 -0
- data/_includes/head/links.html +7 -5
- data/_includes/head/meta.html +3 -3
- data/_includes/{page-style.html → head/page-style.html} +1 -1
- data/_includes/head/scripts.html +10 -39
- data/_includes/head/styles.html +42 -15
- data/_includes/header.txt +1 -1
- data/_includes/my-body.html +42 -0
- data/_includes/my-scripts.html +55 -0
- data/_includes/scripts/load-js.js +60 -0
- data/_includes/scripts/load-js.min.js +1 -0
- data/_includes/{smart-url → smart-url.txt} +0 -0
- data/_includes/styles/inline.scss +15 -19
- data/_includes/styles/style.scss +20 -17
- data/_includes/templates/animation.html +1 -1
- data/_includes/templates/back.html +1 -1
- data/_includes/templates/cookies-banner.html +1 -1
- data/_includes/templates/error.html +1 -1
- data/_includes/{templates.html → templates/index.html} +1 -2
- data/_includes/templates/loading.html +1 -1
- data/_includes/templates/permalink.html +1 -1
- data/_layouts/about.html +29 -30
- data/_layouts/base.html +20 -62
- data/_layouts/blog.html +20 -22
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +13 -18
- data/_layouts/home.html +11 -16
- data/_layouts/list.html +13 -18
- data/_layouts/not-found.html +11 -16
- data/_layouts/page.html +12 -17
- data/_layouts/post.html +15 -20
- data/_layouts/redirect.html +11 -16
- data/_sass/_mixins.scss +10 -15
- data/_sass/_spinner.scss +10 -15
- data/_sass/_variables.scss +35 -19
- data/_sass/hydejack/__inline/_avatar.scss +33 -32
- data/_sass/hydejack/__inline/_base.scss +30 -68
- data/_sass/hydejack/__inline/_break-layout.scss +19 -26
- data/_sass/hydejack/__inline/_content.scss +29 -34
- data/_sass/hydejack/__inline/_footer.scss +19 -26
- data/_sass/hydejack/__inline/_images.scss +38 -0
- data/_sass/hydejack/__inline/_katex.scss +19 -26
- data/_sass/hydejack/__inline/_links.scss +45 -0
- data/_sass/hydejack/__inline/_mark-external.scss +19 -26
- data/_sass/hydejack/__inline/_menu.scss +28 -35
- data/_sass/hydejack/__inline/_sidebar.scss +76 -76
- data/_sass/hydejack/__inline/_social.scss +25 -31
- data/_sass/hydejack/__inline/_utilities.scss +42 -0
- data/_sass/hydejack/__link/_avatar.scss +29 -28
- data/_sass/hydejack/__link/_base.scss +19 -83
- data/_sass/hydejack/__link/_break-layout.scss +35 -34
- data/_sass/hydejack/__link/_content.scss +19 -26
- data/_sass/hydejack/__link/_footer.scss +19 -26
- data/_sass/hydejack/__link/_images.scss +84 -0
- data/_sass/hydejack/__link/_katex.scss +19 -26
- data/_sass/hydejack/__link/_links.scss +53 -0
- data/_sass/hydejack/__link/_mark-external.scss +19 -26
- data/_sass/hydejack/__link/_menu.scss +29 -50
- data/_sass/hydejack/__link/_sidebar.scss +71 -118
- data/_sass/hydejack/__link/_social.scss +19 -26
- data/_sass/hydejack/__link/_utilities.scss +51 -0
- data/_sass/hydejack/_avatar.pre.scss +26 -20
- data/_sass/hydejack/_base.pre.scss +22 -88
- data/_sass/hydejack/_break-layout.pre.scss +26 -23
- data/_sass/hydejack/_content.pre.scss +20 -23
- data/_sass/hydejack/_footer.pre.scss +10 -15
- data/_sass/hydejack/_images.pre.scss +77 -0
- data/_sass/hydejack/_katex.pre.scss +10 -15
- data/_sass/hydejack/_links.pre.scss +47 -0
- data/_sass/hydejack/_mark-external.pre.scss +10 -15
- data/_sass/hydejack/_menu.pre.scss +31 -38
- data/_sass/hydejack/_sidebar.pre.scss +98 -116
- data/_sass/hydejack/_social.pre.scss +16 -20
- data/_sass/hydejack/_utilities.pre.scss +43 -0
- data/_sass/my-variables.scss +0 -8
- data/_sass/pooleparty/__inline/_base.scss +19 -28
- data/_sass/pooleparty/__inline/_code.scss +19 -26
- data/_sass/pooleparty/__inline/_footer.scss +19 -26
- data/_sass/pooleparty/__inline/_footnotes.scss +19 -26
- data/_sass/pooleparty/__inline/_message.scss +19 -26
- data/_sass/pooleparty/__inline/_pagination.scss +19 -26
- data/_sass/pooleparty/__inline/_posts.scss +19 -26
- data/_sass/pooleparty/__inline/_read-more.scss +25 -0
- data/_sass/pooleparty/__inline/_related.scss +19 -26
- data/_sass/pooleparty/__inline/_table.scss +19 -26
- data/_sass/pooleparty/__inline/_type.scss +25 -39
- data/_sass/pooleparty/__link/_base.scss +19 -26
- data/_sass/pooleparty/__link/_code.scss +19 -26
- data/_sass/pooleparty/__link/_footer.scss +19 -26
- data/_sass/pooleparty/__link/_footnotes.scss +30 -26
- data/_sass/pooleparty/__link/_message.scss +19 -26
- data/_sass/pooleparty/__link/_pagination.scss +19 -26
- data/_sass/pooleparty/__link/_posts.scss +20 -27
- data/_sass/pooleparty/__link/_read-more.scss +45 -0
- data/_sass/pooleparty/__link/_related.scss +19 -26
- data/_sass/pooleparty/__link/_table.scss +19 -26
- data/_sass/pooleparty/__link/_type.scss +27 -48
- data/_sass/pooleparty/_base.pre.scss +10 -17
- data/_sass/pooleparty/_code.pre.scss +10 -15
- data/_sass/pooleparty/_footer.pre.scss +10 -15
- data/_sass/pooleparty/_footnotes.pre.scss +21 -15
- data/_sass/pooleparty/_message.pre.scss +10 -15
- data/_sass/pooleparty/_pagination.pre.scss +10 -15
- data/_sass/pooleparty/_posts.pre.scss +11 -16
- data/_sass/pooleparty/_read-more.pre.scss +36 -0
- data/_sass/pooleparty/_related.pre.scss +10 -15
- data/_sass/pooleparty/_table.pre.scss +10 -15
- data/_sass/pooleparty/_type.pre.scss +24 -50
- data/assets/Resume.pdf +0 -0
- data/assets/bower.json +3 -3
- data/assets/bower_components/fontfaceobserver/.bower.json +33 -0
- data/assets/bower_components/fontfaceobserver/.gitignore +2 -0
- data/assets/bower_components/fontfaceobserver/.travis.yml +16 -0
- data/assets/bower_components/fontfaceobserver/Gruntfile.js +101 -0
- data/assets/bower_components/fontfaceobserver/LICENSE +23 -0
- data/assets/bower_components/fontfaceobserver/bower.json +22 -0
- data/assets/bower_components/fontfaceobserver/exports.js +8 -0
- data/assets/bower_components/fontfaceobserver/externs-commonjs.js +10 -0
- data/assets/bower_components/fontfaceobserver/externs.js +15 -0
- data/assets/bower_components/fontfaceobserver/fontfaceobserver.js +12 -0
- data/assets/bower_components/fontfaceobserver/fontfaceobserver.standalone.js +8 -0
- data/assets/bower_components/fontfaceobserver/package.json +57 -0
- data/assets/bower_components/fontfaceobserver/src/descriptors.js +10 -0
- data/assets/bower_components/fontfaceobserver/src/observer.js +349 -0
- data/assets/bower_components/fontfaceobserver/src/ruler.js +130 -0
- data/assets/bower_components/fontfaceobserver/test/assets/index.html +8 -0
- data/assets/bower_components/fontfaceobserver/test/assets/late.css +1 -0
- data/assets/bower_components/fontfaceobserver/test/assets/sourcesanspro-regular.eot +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/sourcesanspro-regular.ttf +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/sourcesanspro-regular.woff +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/subset.eot +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/subset.ttf +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/subset.woff +0 -0
- data/assets/bower_components/fontfaceobserver/test/deps.js +5 -0
- data/assets/bower_components/fontfaceobserver/test/index.html +97 -0
- data/assets/bower_components/fontfaceobserver/test/observer-test.js +465 -0
- data/assets/bower_components/fontfaceobserver/test/ruler-test.js +112 -0
- data/assets/bower_components/fontfaceobserver/vendor/google/base.js +1489 -0
- data/assets/bower_components/katex/.bower.json +7 -6
- data/assets/bower_components/katex/dist/contrib/auto-render.js +790 -0
- data/assets/bower_components/katex/dist/contrib/auto-render.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/copy-tex.css +12 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.js +174 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.min.css +1 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.min.js +1 -0
- data/assets/bower_components/katex/dist/contrib/mathtex-script-type.js +113 -0
- data/assets/bower_components/katex/dist/contrib/mathtex-script-type.min.js +1 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/katex.css +129 -209
- data/assets/bower_components/katex/dist/katex.js +14381 -9023
- data/assets/bower_components/katex/dist/katex.min.css +1 -1
- data/assets/bower_components/katex/dist/katex.min.js +1 -6
- data/assets/bower_components/katex/flow-typed/match-at.js +3 -0
- data/assets/bower_components/katex/flow-typed/object-assign.js +6 -0
- data/assets/bower_components/katex/package-lock.json +13848 -0
- data/assets/css/hydejack-8.0.0.css +3 -0
- data/assets/img/default-1.jpg +0 -0
- data/assets/img/example-content-ii.jpg +0 -0
- data/assets/img/example-content-iii.jpg +0 -0
- data/assets/img/hydejack-8.jpg +0 -0
- data/assets/img/hydejack-8@0,25x.jpg +0 -0
- data/assets/img/hydejack-8@0,5x.jpg +0 -0
- data/assets/img/projects/hy-drawer.svg +12 -0
- data/assets/img/projects/hy-img.svg +17 -0
- data/assets/img/projects/hy-push-state.svg +13 -0
- data/assets/img/resume.png +0 -0
- data/assets/img/sidebar-bg.jpg +0 -0
- data/assets/img/swipe.svg +22 -0
- data/assets/img/w3m.png +0 -0
- data/assets/js/hydejack-8.0.0.js +46 -0
- data/assets/js/sw.js +318 -0
- data/assets/manifest.json +4 -3
- data/assets/version.json +1 -1
- data/licenses/Apache-2.0.md +1 -4
- data/licenses/GPL-3.0.md +1 -4
- data/licenses/MIT.md +1 -4
- data/licenses/PRO.md +2 -6
- data/licenses/README.md +10 -0
- data/licenses/W3C.md +31 -0
- metadata +107 -94
- data/_includes/blog.html +0 -5
- data/_includes/body.html +0 -25
- data/_includes/head.html +0 -5
- data/_includes/scripts/load-js-deferred.js +0 -68
- data/_includes/scripts/load-js-deferred.min.js +0 -1
- data/_includes/social-list-item.html +0 -34
- data/_includes/social.html +0 -20
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.eot +0 -0
- data/assets/bower_components/webfontloader/.bower.json +0 -38
- data/assets/bower_components/webfontloader/CHANGELOG +0 -419
- data/assets/bower_components/webfontloader/Gemfile +0 -3
- data/assets/bower_components/webfontloader/LICENSE +0 -176
- data/assets/bower_components/webfontloader/Rakefile +0 -269
- data/assets/bower_components/webfontloader/bower.json +0 -23
- data/assets/bower_components/webfontloader/browsers.json +0 -133
- data/assets/bower_components/webfontloader/externs.js +0 -19
- data/assets/bower_components/webfontloader/package.json +0 -37
- data/assets/bower_components/webfontloader/src/closure.js +0 -2
- data/assets/bower_components/webfontloader/src/core/cssclassname.js +0 -46
- data/assets/bower_components/webfontloader/src/core/domhelper.js +0 -405
- data/assets/bower_components/webfontloader/src/core/eventdispatcher.js +0 -195
- data/assets/bower_components/webfontloader/src/core/font.js +0 -140
- data/assets/bower_components/webfontloader/src/core/fontmodule.js +0 -16
- data/assets/bower_components/webfontloader/src/core/fontmoduleloader.js +0 -47
- data/assets/bower_components/webfontloader/src/core/fontruler.js +0 -60
- data/assets/bower_components/webfontloader/src/core/fontwatcher.js +0 -171
- data/assets/bower_components/webfontloader/src/core/fontwatchrunner.js +0 -249
- data/assets/bower_components/webfontloader/src/core/initialize.js +0 -97
- data/assets/bower_components/webfontloader/src/core/nativefontwatchrunner.js +0 -69
- data/assets/bower_components/webfontloader/src/core/stylesheetwaiter.js +0 -48
- data/assets/bower_components/webfontloader/src/core/webfont.js +0 -97
- data/assets/bower_components/webfontloader/src/modules.yml +0 -34
- data/assets/bower_components/webfontloader/src/modules/custom.js +0 -63
- data/assets/bower_components/webfontloader/src/modules/fontdeck.js +0 -66
- data/assets/bower_components/webfontloader/src/modules/google/fontapiparser.js +0 -181
- data/assets/bower_components/webfontloader/src/modules/google/fontapiurlbuilder.js +0 -77
- data/assets/bower_components/webfontloader/src/modules/google/googlefontapi.js +0 -54
- data/assets/bower_components/webfontloader/src/modules/monotype.js +0 -110
- data/assets/bower_components/webfontloader/src/modules/typekit.js +0 -73
- data/assets/bower_components/webfontloader/webfontloader.gemspec +0 -191
- data/assets/bower_components/webfontloader/webfontloader.js +0 -17
- data/assets/js/hydejack-7.5.2.js +0 -249
data/assets/Resume.pdf
ADDED
Binary file
|
data/assets/bower.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "hydejack-assets",
|
3
|
-
"homepage": "https://
|
3
|
+
"homepage": "https://hydejack.com/",
|
4
4
|
"author": "Florian Klampfer <mail@qwtel.com> (https://qwtel.com/)",
|
5
5
|
"license": "MIT",
|
6
6
|
"private": true,
|
7
7
|
"dependencies": {
|
8
|
-
"webfontloader": "^1.6.28",
|
9
8
|
"html5shiv": "^3.7.3",
|
10
|
-
"katex": "^0.
|
9
|
+
"katex": "^0.9.0",
|
10
|
+
"fontfaceobserver": "^2.0.13"
|
11
11
|
}
|
12
12
|
}
|
@@ -0,0 +1,33 @@
|
|
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
|
+
}
|
@@ -0,0 +1,101 @@
|
|
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
|
+
};
|
@@ -0,0 +1,23 @@
|
|
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.
|
@@ -0,0 +1,22 @@
|
|
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
|
+
}
|
@@ -0,0 +1,15 @@
|
|
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) {};
|
@@ -0,0 +1,12 @@
|
|
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);}());
|
@@ -0,0 +1,8 @@
|
|
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);}());
|
@@ -0,0 +1,57 @@
|
|
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
|
+
}
|
@@ -0,0 +1,349 @@
|
|
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
|
+
});
|