@foeewni/web-core 2.8.1 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/foe.critical.min.css +8 -8
- package/dist/css/foe.extras.min.css +1 -1
- package/dist/css/foe.main.min.css +9 -9
- package/dist/js/foe.critical.min.js +1 -1
- package/dist/js/foe.extras.min.js +1 -1
- package/dist/js/foe.fonts.min.js +1 -1
- package/dist/js/foe.main.min.js +1 -1
- package/package.json +1 -1
- package/src/components/tools/data-defer-src.js +2 -7
- package/src/fonts.js +9 -6
package/src/fonts.js
CHANGED
|
@@ -136,13 +136,16 @@ library.add(
|
|
|
136
136
|
// We avoiding using @import url(); because the new URL has semicolons on it
|
|
137
137
|
// and it tremendously gets broken from some preprocessors.
|
|
138
138
|
|
|
139
|
-
const fonts = window.document.createElement('link');
|
|
140
139
|
// eslint-disable-next-line max-len
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
fonts.
|
|
145
|
-
|
|
140
|
+
const googleFontsHref = 'https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital@0;1&family=Libre+Franklin:ital,wght@0,400;0,700;1,400;1,700&display=swap';
|
|
141
|
+
const googleFontsLink = window.document.querySelector(`link[href="${googleFontsHref}"]`);
|
|
142
|
+
if (!googleFontsLink) {
|
|
143
|
+
const fonts = window.document.createElement('link');
|
|
144
|
+
fonts.setAttribute('rel', 'stylesheet');
|
|
145
|
+
fonts.setAttribute('crossorigin', 'anonymous');
|
|
146
|
+
fonts.setAttribute('href', googleFontsHref);
|
|
147
|
+
document.head.appendChild(fonts);
|
|
148
|
+
}
|
|
146
149
|
|
|
147
150
|
// Kicks off the process of finding <i> tags and replacing with <svg>
|
|
148
151
|
dom.watch();
|