Move the p5 script includes to the bottom of the <body>
This commit is contained in:
parent
476bac98e6
commit
2e2afbdd44
2 changed files with 9 additions and 7 deletions
|
@ -9,6 +9,15 @@
|
|||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
|
||||
{{ if and .IsPage .Params.is_p5js_sketch }}
|
||||
<script src="{{ `scripts/p5-1.4.1.min.js` | absURL }}"></script>
|
||||
<script src="{{ `scripts/sketch-utils.js` | absURL }}"></script>"
|
||||
{{ with .Resources.GetMatch "sketch.js" }}
|
||||
<script src="{{ .RelPermalink }}"></script>"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<script>
|
||||
const bodyClasses = document.body.classList;
|
||||
const systemDarkModeMatch = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
|
|
|
@ -31,13 +31,6 @@
|
|||
<script defer src="{{ `scripts/highlight.min.js` | absURL }}" onload="hljs.initHighlightingOnLoad();"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if and .IsPage .Params.is_p5js_sketch }}
|
||||
<script src="{{ `scripts/p5-1.4.1.min.js` | absURL }}"></script>
|
||||
{{ with .Resources.GetMatch "sketch.js" }}
|
||||
<script src="{{ .RelPermalink }}"></script>"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $.Scratch.Get "social-list" }}
|
||||
<link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}">
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue