自定义主题色&网站字体大小 (#131)

* 自定义主题色与全站字体大小

* 新增主题配色与字体大小

* waline适配主题色

* 新增主题色

* 主题色

* waline适配主题色

* twikoo主题色跟随

* waline主题色跟随

* twikoo主题色跟随
This commit is contained in:
涛声依旧 2022-10-19 13:08:26 +08:00 committed by GitHub
parent 80978e38c9
commit 3c73ce674c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 13 deletions

View File

@ -365,13 +365,21 @@ plugins:
style: style:
darkmode: auto # auto / always / false darkmode: auto # auto / always / false
smooth_scroll: true # true / false smooth_scroll: true # true / false
font-size: 16px
font-family: font-family:
logo: system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif logo: system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif
body: system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif body: system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif
code: Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif code: Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif
theme: theme:
light: '#f8f8f8' main: '#1BCDFC'
dark: '#313438' link: '#2196f3'
button: '#1BCDFC'
hover: '#ff5722'
highlight: '#ff5722'
inner: '#fff'
cat: '#FF7844'
light: '#f8f8f8' #浅色背景颜色
dark: '#313438' #深色背景颜色
animated_avatar: animated_avatar:
animate: auto # auto, always animate: auto # auto, always
background: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.2/avatar/round/rainbow64@3x.webp background: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.2/avatar/round/rainbow64@3x.webp

View File

@ -1,13 +1,13 @@
@require('_defines/const') @require('_defines/const')
// //
$color-theme = #1BCDFC $color-theme = convert(hexo-config('style.theme.main'))
$color-link = #2196f3 $color-link = convert(hexo-config('style.theme.link'))
$color-button = #1BCDFC $color-button = convert(hexo-config('style.theme.button'))
$color-hover = #ff5722 $color-hover = convert(hexo-config('style.theme.hover'))
$color-highlight = #ff5722 $color-highlight = convert(hexo-config('style.theme.highlight'))
$color-inner = #fff $color-inner = convert(hexo-config('style.theme.inner'))
$color-cat = #FF7844 $color-cat = convert(hexo-config('style.theme.cat'))
$color-cat-hover = darken($color-cat, 20) $color-cat-hover = darken($color-cat, 20)
// //
@ -51,7 +51,7 @@ if hexo-config('style.font-family.logo')
// font size // font size
$fs-root = 16px $fs-root = convert(hexo-config('style.font-size'))
$fs-15 = .9375rem $fs-15 = .9375rem
$fs-14 = .875rem $fs-14 = .875rem
$fs-13 = .8125rem $fs-13 = .8125rem

View File

@ -2,7 +2,7 @@
--twikoo-lighttext: #ef794f; --twikoo-lighttext: #ef794f;
--twikoo-secondtext: #909094; --twikoo-secondtext: #909094;
--twikoo-emoji-background: #f8f8f8; --twikoo-emoji-background: #f8f8f8;
--twikoo-theme: #409eff; --twikoo-theme: $color-theme;
margin-top: 1.5rem margin-top: 1.5rem
.tk-content .tk-content
@ -112,4 +112,4 @@ if hexo-config('style.darkmode') == 'auto'
--twikoo-lighttext: #f2b94b; --twikoo-lighttext: #f2b94b;
--twikoo-secondtext: #a1a2b8; --twikoo-secondtext: #a1a2b8;
--twikoo-emoji-background: darken($dark-block, 1); --twikoo-emoji-background: darken($dark-block, 1);
--twikoo-theme: #409eff; --twikoo-theme: #409eff;

View File

@ -5,7 +5,7 @@
--waline-light-grey: #999; --waline-light-grey: #999;
--waline-dark-grey: #666; --waline-dark-grey: #666;
/* */ /* */
--waline-theme-color: #3498db; --waline-theme-color: $color-theme;
--waline-active-color: #2ecc71; --waline-active-color: #2ecc71;
/* */ /* */
--waline-color: #444; --waline-color: #444;