diff --git a/themes/hexo/config.js b/themes/hexo/config.js index 024c12e0..c4b0be31 100644 --- a/themes/hexo/config.js +++ b/themes/hexo/config.js @@ -39,6 +39,8 @@ const CONFIG = { HEXO_WIDGET_TO_TOP: true, HEXO_WIDGET_TO_COMMENT: true, // 跳到评论区 HEXO_WIDGET_DARK_MODE: true, // 夜间模式 - HEXO_WIDGET_TOC: true // 移动端悬浮目录 + HEXO_WIDGET_TOC: true, // 移动端悬浮目录 + + HEXO_THEME_COLOR: '#928CEE' // 主题色配置(默认为 #928CEE) } export default CONFIG diff --git a/themes/hexo/style.js b/themes/hexo/style.js index 33d2878a..dcba9a2d 100644 --- a/themes/hexo/style.js +++ b/themes/hexo/style.js @@ -1,76 +1,240 @@ /* eslint-disable react/no-unknown-property */ +import { siteConfig } from '@/lib/config' +import CONFIG from './config' + /** * 这里的css样式只对当前主题生效 * 主题客制化css * @returns */ const Style = () => { - return () + * { + scrollbar-width: thin; + scrollbar-color: var(--theme-color) transparent; + } + `} + ) } export { Style }