mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-01-31 04:58:14 +00:00
2f06fd7861
All of the changes should be documented in the changelog.
19 lines
644 B
SCSS
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 }}
|