hugo-theme-more-contentful/assets/templates/theme.scss
Gabriel Arazas 2f06fd7861 Initial release
All of the changes should be documented in the changelog.
2020-11-03 00:55:18 +08:00

19 lines
644 B
SCSS

{{- range $name, $scheme := (index $.Site.Data "more-contentful").themes }}
// This is a template for a colorscheme based from a Base16 data file from https://github.com/chriskempson/base16.
@mixin createColorScheme($invert: false) {
{{- range $i := seq 0 15 }}
{{- $hex := upper (printf "%02x" $i) }}
{{- $key := printf "base%s" $hex }}
@if $invert {
--{{ $key }}: #{invert(#{{ index $scheme $key }}, 100%)};
} @else {
--{{ $key }}: #{{ index $scheme $key }};
}
{{- end }}
}
{{- if ne $name "_index" }}[data-theme="{{ .scheme }}"]{{ end }}:root {
@include createColorScheme;
}
{{- end }}