Locally hosting the Roboto font.

This removes the loadCSS() call, which uses setTimer() to repeatedly do
stuff while other stuff is loading. This saves quite a bit of CPU time
spent on JavaScript.
This commit is contained in:
2017-09-15 11:45:09 +02:00
parent b554756f54
commit a7889214cf
16 changed files with 113 additions and 4 deletions

View File

@@ -38,10 +38,6 @@ html(lang="en")
var algolia = algoliasearch("{{config['ALGOLIA_USER']}}", "{{config['ALGOLIA_PUBLIC_KEY']}}");
var algoliaIndex = algolia.initIndex("{{config['ALGOLIA_INDEX_NODES']}}");
!function(e){"use strict";e.loadCSS=function(t,n,o){var r,i=e.document,l=i.createElement("link");if(n)r=n;else{var d=(i.body||i.getElementsByTagName("head")[0]).childNodes;r=d[d.length-1]}var a=i.styleSheets;l.rel="stylesheet",l.href=t,l.media="only x",r.parentNode.insertBefore(l,n?r:r.nextSibling);var f=function(e){for(var t=l.href,n=a.length;n--;)if(a[n].href===t)return e();setTimeout(function(){f(e)})};return l.onloadcssdefined=f,f(function(){l.media=o||"all"}),l},"undefined"!=typeof module&&(module.exports=e.loadCSS)}(this);
loadCSS( "//fonts.googleapis.com/css?family=Roboto:300,400" );
script(src="{{ url_for('static_pillar', filename='assets/js/markdown.min.js', v=17320171) }}")
script(src="{{ url_for('static_pillar', filename='assets/js/tutti.min.js', v=17320171) }}")
@@ -49,6 +45,7 @@ html(lang="en")
link(href="{{ url_for('static', filename='assets/img/apple-touch-icon-precomposed.png') }}", rel="icon apple-touch-icon-precomposed", sizes="192x192")
link(href="{{ url_for('static_pillar', filename='assets/css/vendor/bootstrap.min.css') }}", rel="stylesheet")
link(href="{{ url_for('static', filename='assets/google-font-roboto/roboto.css') }}", rel="stylesheet")
| {% block head %}{% endblock %}