Zuoqiu-Yingyi / siyuan-theme-dark-plus

思源笔记的一款多功能双模式主题 | A multifunctional dual-mode theme of SiYuan Note.
GNU Affero General Public License v3.0
139 stars 14 forks source link

建议:关于theme.js中的changeThemeMode调用 #153

Closed winter60 closed 1 year ago

winter60 commented 1 year ago
/* 根据当前主题模式加载样式配置文件 */
window.theme.changeThemeMode(
    `/appearance/themes/Dark+/style/color/light.css`,
    `/appearance/themes/Dark+/style/color/dark.css`,
    `/widgets/custom-light.css`,
    `/widgets/custom-dark.css`,
);

萌佬您好,这段代码大概在line274-279之间,建议加上一个判断if(window.siyuan.config.appearance[window.siyuan.config.appearance.mode?"themeDark":"themeLight"] == "Dark+") 这样的话方便在其他主题调用Dark+的theme.js时,不会二次加载样式,比如我使用的notion主题会重复加载。 特别喜欢Dark+,期待回复~

Zuoqiu-Yingyi commented 1 year ago

妙呀