switches to deferred FA javascript

This commit is contained in:
Huy Tran 2018-07-26 17:49:47 +10:00
parent 9aefa9b55a
commit 0b25bef171
5 changed files with 14 additions and 6 deletions

View file

@ -2,10 +2,18 @@
__2018-07__
* Renames `header/font-awesome.html` to `header/font-awesome-css.html` and
adds [_footer/font-awesome-js.html_](layouts/partials/footer/font-awesome-js.html), uses Font-Awesome 5 deferred JavaScript loading to reduce rendering blocking by CSSs
* Refactors and consolidates all responsive breakpoints and creates a new style [_\_responsive.scss_](static-src/scss/hyde-hyde/_responsive.scss)
* Refactors portfolio's projects into [_\_project.scss_](static-src/scss/hyde-hyde/_project.scss)
* Refactors styles for a list of posts into [_\_list.scss_](static-src/scss/hyde-hyde/_list.scss)
* Refactors misc. styles into [_\_misc.scss_](static-src/scss/hyde-hyde/_misc.scss)
* Removes [_\_customised.scss_](static-src/scss/hyde-hyde/_customised.scss)
__Version 2.0__

View file

@ -1,4 +1,5 @@
{{ if and (not .Site.BuildDrafts) (.Site.GoogleAnalytics) -}}
{{ "<!-- Google Analytics -->" | safeHTML }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}
{{ partial "footer/font-awesome-js.html" . }}
{{ if (.Site.GoogleAnalytics) -}}
{{ "<!-- Google Analytics -->" | safeHTML }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}

View file

@ -0,0 +1 @@
<script defer src="https://use.fontawesome.com/releases/v5.2.0/js/all.js" integrity="sha384-4oV5EgaV02iISL2ban6c/RmotsABqE4yZxZLcYMAdG7FAPsyHYAPpywE9PJo+Khy" crossorigin="anonymous"></script>

View file

@ -1,8 +1,6 @@
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
{{ partial "header/meta.html" . }}
{{ "<!-- Font-Awesome -->" | safeHTML }}
{{ partial "header/font-awesome.html" . }}
{{ "<!-- highlighting -->" | safeHTML }}
{{ partial "header/highlight-css.html" . }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/print.min.css" media="print">