1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-28 05:10:31 -04:00
Jake Jarvis b13da8e05b
dark mode 😎 (#112)
* prepare dark mode stuffs

* themed all global colors

* store preference in local storage

* toggle styling

* lightbulb position

* minify bundled script with uglify-js instead of hugo

* detect whether user has an OS-wide dark mode preference and use that by default

* two different colors for each homepage link

* inline bulb SVGs into stylesheet

* fingerprint and cache styles for a year

* fix lightbulb positioning with weird magic numbers, will come back to that

* themed syntax highlighting

* use terser instead of uglify-js (b/c of ES6)
2020-04-20 15:04:30 -04:00

6 lines
283 B
HTML

{{ $darkmode := resources.Get "js/dark-mode.js" }}
{{ $twemoji := resources.Get "vendor/emoji/emoji.js" | resources.ExecuteAsTemplate "vendor/emoji/emoji.min.js" . }}
{{ $js := slice $darkmode $twemoji | resources.Concat "/js/main.js" }}
<script src="{{ $js.Permalink }}"></script>