diff --git a/apps/help/theme.js b/apps/help/theme.js index 00bf5822..c32bdac9 100644 --- a/apps/help/theme.js +++ b/apps/help/theme.js @@ -37,7 +37,7 @@ let Theme = { let colCount = Math.min(5, Math.max(parseInt(helpConfig?.colCount) || 3, 2)) let colWidth = Math.min(500, Math.max(100, parseInt(helpConfig?.colWidth) || 265)) let width = Math.min(2500, Math.max(800, colCount * colWidth + 30)) - let theme = await Theme.getThemeCfg(helpConfig.theme, helpConfig.themeExclude) + let theme = await Theme.getThemeCfg(helpConfig.theme, diyStyle.themeExclude || sysStyle.themeExclude) let themeStyle = theme.style || {} let ret = [` body{background-image:url(${theme.bg});width:${width}px;} @@ -52,10 +52,7 @@ let Theme = { ret.push(`${sel}{${css}:${val}}`) } css('.help-title,.help-group', 'color', 'fontColor', '#ceb78b') - css('.help-title,.help-group', 'text-shadow', 'contBgColor', 'rgba(6, 21, 31, 0.5)', (c) => { - c = c.replace(/,[^,]+\)/, ',1)') - return `0 0 1px ${c};` - }) + css('.help-title,.help-group', 'text-shadow', 'fontShadow', 'none') css('.help-desc', 'color', 'descColor', '#eee') css('.cont-box', 'background', 'contBgColor', 'rgba(43, 52, 61, 0.8)') css('.cont-box', 'backdrop-filter', 'contBgBlur', 3, (n) => `blur(${n}px)`) diff --git a/config/help_default.js b/config/help_default.js index 004a6dc1..b0b5d7cd 100644 --- a/config/help_default.js +++ b/config/help_default.js @@ -8,10 +8,15 @@ // 帮助配置 export const helpCfg = { - title: '喵喵帮助', // 帮助标题 - subTitle: 'Yunzai-Bot & Miao-Plugin', // 帮助副标题 - colCount: 3, // 帮助表格列数,2-5 - colWidth: 265, // 单列宽度,默认265 + // 帮助标题 + title: '喵喵帮助', + // 帮助副标题 + subTitle: 'Yunzai-Bot & Miao-Plugin', + // 帮助表格列数,可选:2-5 + // 注意:设置列数过多可能导致阅读困难,请参考实际效果设置 + colCount: 3, + // 单列宽度,默认265,过窄可能导致较多换行,请根据实际配置项长度设定 + colWidth: 265, /* 皮肤选择,可多选,或设置为all 皮肤包放置于 resources/help/theme 皮肤名为对应文件夹名 @@ -19,7 +24,9 @@ export const helpCfg = { theme: ['default','theme2'], // 设置为指定皮肤 */ theme: 'all', - themeExclude: ['default'] // 排除皮肤:在有其他可选项时会忽略此中列举的皮肤 + // 排除皮肤:使用全部皮肤时会忽略该项设置的皮肤 + // 如使用其他皮肤时仍希望随机default皮肤可删除default + themeExclude: ['default'] } // 帮助菜单内容 diff --git a/resources/help/theme/default/config.js b/resources/help/theme/default/config.js index b5a5f9d7..fe2ba525 100644 --- a/resources/help/theme/default/config.js +++ b/resources/help/theme/default/config.js @@ -1,9 +1,24 @@ export const style = { - fontColor: '#ceb78b', // 主文字颜色 - descColor: '#eee', // 描述文字颜色 - contBgColor: 'rgba(6, 21, 31, .5)', // 面板整体底色,注意与主文字颜色过近或太透明可能导致阅读困难 - contBgBlur: 3, // 面板底图毛玻璃效果,数字越大越模糊,0-10 ,可为小数 - headerBgColor: 'rgba(6, 21, 31, .4)', // 板块标题栏底色 - rowBgColor1: 'rgba(6, 21, 31, .2)', // 帮助奇数行底色 - rowBgColor2: 'rgba(6, 21, 31, .35)' // 帮助偶数行底色 + // 主文字颜色 + fontColor: '#ceb78b', + // 主文字阴影: 横向距离 垂直距离 阴影大小 阴影颜色 + // fontShadow: '0px 0px 1px rgba(6, 21, 31, .9)', + fontShadow: 'none', + // 描述文字颜色 + descColor: '#eee', + + /* 面板整体底色,会叠加在标题栏及帮助行之下,方便整体帮助有一个基础底色 + * 若无需此项可将rgba最后一位置为0即为完全透明 + * 注意若综合透明度较低,或颜色与主文字颜色过近或太透明可能导致阅读困难 */ + contBgColor: 'rgba(6, 21, 31, .5)', + + // 面板底图毛玻璃效果,数字越大越模糊,0-10 ,可为小数 + contBgBlur: 3, + + // 板块标题栏底色 + headerBgColor: 'rgba(6, 21, 31, .4)', + // 帮助奇数行底色 + rowBgColor1: 'rgba(6, 21, 31, .2)', + // 帮助偶数行底色 + rowBgColor2: 'rgba(6, 21, 31, .35)' }