Skip to content

Commit 276bbd6

Browse files
authored
Merge pull request #93 from BeAPI/feature/font-loading
Feature/font loading
2 parents f7382b5 + a0b6ce6 commit 276bbd6

23 files changed

+652
-862
lines changed

header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<!--[if lte IE 9 ]> <html class="no-js ie lte-ie9 ie9" <?php language_attributes( ); ?>> <![endif]-->
33
<!--[if !(IE)]><! -->
4-
<html class="fonts-loading no-js" <?php language_attributes( ); ?>>
4+
<html class="no-js" <?php language_attributes( ); ?>>
55
<!--<![endif]-->
66
<head>
77
<script type="text/javascript">

inc/async/loadfont.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,2 @@
11
<!-- Polyfill.io -->
22
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=es5,es6,fetch,Array.prototype.includes,CustomEvent,Element.prototype.closest,NodeList.prototype.forEach"></script>
3-
4-
<script>
5-
// inline loadJS
6-
function loadJS(e,t){"use strict";var n=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");return o.src=e,o.async=!0,n.parentNode.insertBefore(o,n),t&&"function"==typeof t&&(o.onload=t),o}
7-
// then load your JS
8-
if (sessionStorage.getItem('fonts-loaded')) {
9-
// fonts cached, add class to document
10-
document.documentElement.classList.remove('fonts-loading');
11-
} else {
12-
// load script with font observing logic
13-
loadJS('<?php echo get_theme_file_uri( '/src/js/vendor_async/fonts-css-async.js' );?>');
14-
}
15-
</script>

package-lock.json

Lines changed: 554 additions & 680 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"browser-sync": "^2.26.7",
2828
"browser-sync-webpack-plugin": "^2.2.2",
2929
"concurrently": "^4.1.0",
30-
"copy-webpack-plugin": "^5.0.3",
30+
"copy-webpack-plugin": "^5.1.1",
3131
"css-loader": "^2.1.1",
3232
"eslint": "^5.16.0",
3333
"eslint-config-prettier": "^4.3.0",
@@ -40,7 +40,7 @@
4040
"eslint-plugin-standard": "^4.0.0",
4141
"json2csv": "^4.5.1",
4242
"mini-css-extract-plugin": "^0.7.0",
43-
"node-sass": "^4.12.0",
43+
"node-sass": "^4.13.1",
4444
"optimize-css-assets-webpack-plugin": "^5.0.1",
4545
"postcss-loader": "^3.0.0",
4646
"prettier": "^1.17.1",
@@ -52,7 +52,7 @@
5252
"dependencies": {
5353
"autoprefixer": "^9.5.1",
5454
"cheerio": "^1.0.0-rc.3",
55-
"favicons": "^5.4.1",
55+
"favicons": "^6.0.0",
5656
"lazysizes": "^5.1.0",
5757
"normalize-scss": "^7.0.1",
5858
"ora": "^3.4.0",
-38.1 KB
Binary file not shown.
-28.4 KB
Binary file not shown.
-38.4 KB
Binary file not shown.
-28.4 KB
Binary file not shown.
-33.9 KB
Binary file not shown.
-25 KB
Binary file not shown.

0 commit comments

Comments
 (0)