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 }}
|
{{ end }}
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
</div>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||||
<base href="{{ .Permalink }}">
|
<base href="{{ .Permalink }}">
|
||||||
<link rel="canonical" href="{{ .Permalink }}">
|
<link rel="canonical" href="{{ .Permalink }}">
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/main.css" />
|
||||||
{{ if .RSSlink }}
|
{{ if .RSSlink }}
|
||||||
<link href="{{ .RSSlink }}" rel="alternative" type="application/rss+xml" title="{{ .Title }}" />
|
<link href="{{ .RSSlink }}" rel="alternative" type="application/rss+xml" title="{{ .Title }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue