Add suggested modulepreload line

See https://github.com/GoogleChromeLabs/dark-mode-toggle/issues/25
This commit is contained in:
Francis Lavoie 2020-03-30 21:38:25 -04:00
parent 3220233002
commit 7ee79e96fb
No known key found for this signature in database
GPG key ID: 7D1A27F0725BE5D8

View file

@ -1,6 +1,9 @@
{{include "/includes/head.html"}}
<!-- https://github.com/GoogleChromeLabs/dark-mode-toggle -->
<script type="module" src="https://unpkg.com/dark-mode-toggle"></script>
<!-- modulepreload is still experimental as of this writing, but works in Chrome -->
<!-- should help avoid some of the flicker on page load -->
<link rel="modulepreload" src="https://unpkg.com/dark-mode-toggle" crossorigin>
<link rel="stylesheet" href="/resources/css/docs.css">
<link rel="stylesheet" href="/resources/css/docs-dark.css" media="(prefers-color-scheme: dark)">