attempt to make css loading asynchronous
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
@import "lib/ionicons/ionicons";
|
||||
@import "lib/animate.min.less";
|
||||
@import "lib/bootstrap/variables";
|
||||
@import "lib/font-awesome-4.3.0/less/font-awesome";
|
||||
|
||||
@import url(http://fonts.googleapis.com/css?family=Lato:400);
|
||||
@import url(http://fonts.googleapis.com/css?family=Inconsolata);
|
||||
|
@ -4,6 +4,7 @@ html(ng-app='profileValidation', lang='en')
|
||||
include partials/universal-head
|
||||
|
||||
body.no-top-and-bottom-margins.full-screen-body-background
|
||||
include partials/css-cdns
|
||||
include partials/navbar-wide
|
||||
include partials/flash
|
||||
block content
|
||||
|
@ -4,6 +4,7 @@ html(ng-app='profileValidation', lang='en')
|
||||
include partials/universal-head
|
||||
|
||||
body.top-and-bottom-margins
|
||||
include partials/css-cdns
|
||||
include partials/navbar-narrow
|
||||
.container
|
||||
include partials/flash
|
||||
|
22
views/partials/css-cdns.jade
Normal file
22
views/partials/css-cdns.jade
Normal file
@ -0,0 +1,22 @@
|
||||
script.
|
||||
var cb = function() {
|
||||
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);
|
||||
};
|
||||
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 = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css';
|
||||
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);
|
Reference in New Issue
Block a user