mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 06:58:28 -04:00
* 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)
13 lines
650 B
HTML
13 lines
650 B
HTML
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "css/main.css") | resources.PostCSS (dict "config" "postcss.config.js") }}
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
|
|
|
{{/* Page-specific styles set via front matter, scoped via SCSS */}}
|
|
{{ with .Params.css }}
|
|
{{- $sass := printf "div#content { %s }" . }}
|
|
{{- $target := path.Join $.File.Dir "inline.scss" }}
|
|
|
|
{{- $css := $sass | resources.FromString $target | resources.ToCSS | resources.PostCSS (dict "config" "postcss.config.js") -}}
|
|
|
|
<link rel="stylesheet" href="{{ $css.Permalink }}">
|
|
{{ end }}
|