diff options
author | jeffreytse <jeffreytse.mail@gmail.com> | 2021-05-26 21:51:32 +0800 |
---|---|---|
committer | jeffreytse <jeffreytse.mail@gmail.com> | 2021-05-26 21:51:32 +0800 |
commit | c5212c60ad8058732c17b3107ffd1b6a05850bd4 (patch) | |
tree | c61b2f37e451673f34d78619bc7ce162ff28387b /assets | |
parent | de8c813aea0c96733c14de26305b3ad91a31ad80 (diff) |
feat: support to customize the brand color
Diffstat (limited to 'assets')
-rw-r--r-- | assets/css/main.scss | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/assets/css/main.scss b/assets/css/main.scss index afe4e59..8926243 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -4,13 +4,22 @@ // Default theme colors $theme-colors: ( - coolblack: #090a0b, - spacegrey: #353535, - snowwhite: #ffffff, + "coolblack": #090a0b, + "spacegrey": #353535, + "snowwhite": #ffffff, +); + +// Default brand colors +$brand-colors: ( + "orangered": #ff5100, + "greatgold": #f2cb05, + "greenblue": #389092, ); $theme-name: "{{ site.theme_color }}"; +$brand-name: "{{ site.brand_color }}"; $theme-color: map-get($theme-colors, "snowwhite"); +$brand-color: map-get($brand-colors, "orangered"); @if map-has-key($theme-colors, $theme-name) { $theme-color: map-get($theme-colors, $theme-name); @@ -18,4 +27,10 @@ $theme-color: map-get($theme-colors, "snowwhite"); $theme-color: {{ site.theme_color | default: '#ffffff' }}; } +@if map-has-key($brand-colors, $brand-name) { + $brand-color: map-get($brand-colors, $brand-name); +} @else if str-index($brand-name, "#") == 1 { + $brand-color: {{ site.brand_color | default: '#ff5100' }}; +} + @import "yat"; |