Skip to content

Commit

Permalink
Merge pull request y7kim#31 from rphaedrus/FixingFOUC
Browse files Browse the repository at this point in the history
Changed usage of WebFontLoader to avoid FOUC
  • Loading branch information
Phlow committed Jul 14, 2015
2 parents 3cd69c3 + 0acc356 commit abbc885
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,19 @@
<link rel="stylesheet" href="{{ site.url }}{{ site.baseurl }}/assets/css/styles_feeling_responsive.css">
<script src="{{ site.url }}{{ site.baseurl }}/assets/js/modernizr.min.js"></script>

<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js"></script>
<script>
WebFontConfig = {
google: { families: [ 'Lato:400,700,400italic:latin', 'Volkhov::latin' ] }
};

(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1.5.6/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
WebFont.load({
google: {
families: [ 'Lato:400,700,400italic:latin', 'Volkhov::latin' ]
}
});
</script>

<noscript>
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic%7cVolkhov' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic|Volkhov' rel='stylesheet' type='text/css'>
</noscript>

{% if site.google_site_verification %}<meta name="google-site-verification" content="{{ site.google_site_verification}}" />{% endif %}
{% if site.bing_webmastertools_id %}<meta name="msvalidate.01" content="{{ site.bing_webmastertools_id }}" />{% endif %}
{% if page.meta_description %}<meta name="description" content="{{ page.meta_description | strip_html | escape }}"/>{% elsif page.teaser %}<meta name="description" content="{{ page.teaser | strip_html | escape }}"/>{% elsif site.description %}<meta name="description" content="{{ site.description | strip_html | escape }}"/>{% endif %}
Expand Down

0 comments on commit abbc885

Please sign in to comment.