Remove deferred loading of css. Causes nasty page fluidity on page changes.
This commit is contained in:
parent
6db1e12b76
commit
ddcf6a28d0
2 changed files with 1 additions and 16 deletions
|
@ -8,21 +8,5 @@
|
|||
{{ end }}
|
||||
<a href="#top">Top</a>
|
||||
</div>
|
||||
<noscript id="deferred-styles">
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/main.css"/>
|
||||
</noscript>
|
||||
<script>
|
||||
var loadDeferredStyles = function() {
|
||||
var addStylesNode = document.getElementById("deferred-styles");
|
||||
var replacement = document.createElement("div");
|
||||
replacement.innerHTML = addStylesNode.textContent;
|
||||
document.body.appendChild(replacement);
|
||||
addStylesNode.parentElement.removeChild(addStylesNode);
|
||||
};
|
||||
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
|
||||
webkitRequestAnimationFrame || msRequestAnimationFrame;
|
||||
if (raf) raf(function() { window.setTimeout(loadDeferredStyles, 0); });
|
||||
else window.addEventListener('load', loadDeferredStyles);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||
<base href="{{ .Permalink }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/main.css" />
|
||||
{{ if .RSSlink }}
|
||||
<link href="{{ .RSSlink }}" rel="alternative" type="application/rss+xml" title="{{ .Title }}" />
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue