mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 08:43:40 +00:00
Tweak theme
This commit is contained in:
10
themes/custom-theme/layouts/partials/head/dark-mode.html
Normal file
10
themes/custom-theme/layouts/partials/head/dark-mode.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ $jsBuildOptions := dict "target" "es6" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $jsBuildOptions = $jsBuildOptions | merge (dict "minify" "true") }}
|
||||
{{ end }}
|
||||
|
||||
{{ $darkMode := resources.Get "js/dark-mode.js" | js.Build $jsBuildOptions }}
|
||||
|
||||
<script>
|
||||
{{ $darkMode.Content | safeJS }}
|
||||
</script>
|
Reference in New Issue
Block a user