Only load styles on pages which need it
This commit is contained in:
parent
740d1c085d
commit
cce85ea4ed
4 changed files with 17 additions and 6 deletions
|
@ -12,8 +12,6 @@
|
|||
|
||||
{{ partial "style.html" "scss/style.scss" }}
|
||||
{{ partial "style.html" "css/font-awesome.css" }}
|
||||
{{ partial "style.html" "css/highlight.css" }}
|
||||
{{ partial "style.html" "css/shareon.css" }}
|
||||
|
||||
{{ block "style_extra" . }}{{ end }}
|
||||
|
||||
|
@ -38,8 +36,6 @@
|
|||
|
||||
{{ partial "script_async.html" "js/app.js" }}
|
||||
|
||||
{{ partial "script_async.html" "js/shareon.js" }}
|
||||
|
||||
{{ block "scripts_extra" . }}{{ end }}
|
||||
|
||||
{{ if not .Site.IsServer }}
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
{{ partial "share.html" . }}
|
||||
{{ partial "related-content.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -7,3 +7,12 @@
|
|||
{{ partial "related-content.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "style_extra" }}
|
||||
{{ partial "style.html" "css/shareon.css" }}
|
||||
{{ partial "style.html" "css/highlight.css" }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "scripts_extra" }}
|
||||
{{ partial "script_async.html" "js/shareon.js" }}
|
||||
{{ end }}
|
||||
|
|
|
@ -56,3 +56,11 @@
|
|||
{{ partial "related-content.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "style_extra" }}
|
||||
{{ partial "style.html" "css/shareon.css" }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "scripts_extra" }}
|
||||
{{ partial "script_async.html" "js/shareon.js" }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue