1
Fork 0

Only load styles on pages which need it

This commit is contained in:
Jake Howard 2022-01-03 13:12:38 +00:00
parent 740d1c085d
commit cce85ea4ed
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 17 additions and 6 deletions

View file

@ -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 }}

View file

@ -23,8 +23,6 @@
</a>
</h4>
</div>
{{ partial "share.html" . }}
{{ partial "related-content.html" . }}
</div>
{{ end }}

View file

@ -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 }}

View file

@ -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 }}