Move per-page CSS to HTML head

This commit is contained in:
James 2018-07-09 21:25:52 +10:00
parent 275a34b0a2
commit f108e5d9f0
2 changed files with 8 additions and 4 deletions

View File

@ -22,6 +22,7 @@
<link href="https://fonts.googleapis.com/css?family=Ubuntu|Dosis" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Ubuntu|Dosis" rel="stylesheet">
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet"> <link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css" /> <link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css" />
{{- block "css" . }}{{- end }}
{{ if eq (getenv "HUGO_ENV") "PRD" }} {{ if eq (getenv "HUGO_ENV") "PRD" }}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

View File

@ -28,9 +28,12 @@
</section> </section>
{{ end }} {{ end }}
{{ define "css" }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.css" type="text/css" />
{{ end }}
{{ define "scripts" }} {{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.css" type="text/css" />
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener("DOMContentLoaded", function() { window.addEventListener("DOMContentLoaded", function() {