make google fonts also an async call

This commit is contained in:
Michael Q Larson
2015-03-07 01:08:08 -08:00
parent 297c7f3287
commit 19afeda949
2 changed files with 14 additions and 4 deletions

View File

@ -4,9 +4,6 @@
@import "lib/animate.min.less";
@import "lib/bootstrap/variables";
@import url(http://fonts.googleapis.com/css?family=Lato:400);
@import url(http://fonts.googleapis.com/css?family=Inconsolata);
html,body,div,span,a,li,td,th {
font-family: 'Lato', sans-serif;
font-weight: 300;

View File

@ -12,7 +12,8 @@ script.
else window.addEventListener('load', cb);
var cb = function() {
var l = document.createElement('link'); l.rel = 'stylesheet';
var l = document.createElement('link');
l.rel = 'stylesheet';
l.href = '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css';
var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h);
};
@ -31,4 +32,16 @@ script.
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);
var cb = function () {
var l = document.createElement('link');
l.rel = 'stylesheet';
l.href = 'http://fonts.googleapis.com/css?family=Lato:400|Inconsolata';
var h = document.getElementsByTagName('head')[0];
h.parentNode.insertBefore(l, h);
};
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);