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

不同级别标题前面的颜色是按照什么顺序排的? #48

Closed Geo123abc closed 2 years ago

Geo123abc commented 2 years ago

大纲视图和正文中的标题颜色是按照什么顺序排的(黑蓝黄绿红紫)?个人习惯吗?

PS:-p,-c,-t,-u,-o,这个提示的有什么区别啊? 我笔记里面都是 -p的效果 --custom-empty-p: "这里是空的 (´・-・)ノ㊫"; --custom-empty-c: "这里是空的 (´・-・)ノ↹"; --custom-empty-t: "这里是空的 (´・-・)ノ☑"; --custom-empty-u: "这里是空的 (´・-・)ノ◉"; --custom-empty-o: "这里是空的 (´・-・)ノ①";

Zuoqiu-Yingyi commented 2 years ago
Geo123abc commented 2 years ago
  • --custom-empty-p: 空段落块
  • --custom-empty-c: 空代码块
  • --custom-empty-t: 空任务列表项
  • --custom-empty-u: 空无序列表项
  • --custom-empty-o: 空有序列表项

谢谢,那个标题颜色排序呢?

Zuoqiu-Yingyi commented 2 years ago

谢谢,那个标题颜色排序呢?

是为了增加对比度, 暖色冷色相间排列的 可以通过如下 6 个 CSS 变量自定义

--custom-h1-color --custom-h2-color --custom-h3-color --custom-h4-color --custom-h5-color --custom-h6-color

Geo123abc commented 2 years ago

好的,如果是为了增加对比度,可能彩虹色这样的就不太合适了,那我还是自己改一下吧,谢谢

Geo123abc commented 2 years ago

@Zuoqiu-Yingyi 根绝你的提示,我新建了文件“<工作空间>/data/widgets/custom.css”,内容如下(调整子标题及对应的大纲色、取消空行提示),但是没有效果,能麻烦帮忙看下那个地方不对吗?

/ 配置文件 / /*

自定义配置方法 | CUSTOM CONFIG METHOD

  1. 创建文件 <工作空间>/data/widgets/custom.css
    Create a file <workspace>/data/widgets/custom.css
  2. 在文件 <工作空间>/data/widgets/custom.css 中定义的值将覆盖 <工作空间>/conf/appearance/themes/Dark+/style/module/config.css 中对应的值
    The value defined in file <workspace>/data/widgets/custom.css overwrites the corresponding value in file <workspace>/conf/appearance/themes/Dark+/style/module/config.css. */

/ 导入基础配色(如果需要导入其他配色, 请修改 URL) / / @import url(/appearance/themes/midnight/theme.css); /

/ 自定义属性 / :root {

/* 子标题及其对应大纲颜色 | Subheadings and their corresponding outline colors *,彩虹色/
--custom-h1-color: var(--b3-card-error-color);
--custom-h2-color: var(--b3-card-warning-color);
--custom-h3-color: #F2F279;
--custom-h4-color: var(--b3-card-success-color);
--custom-h5-color: var(--b3-card-info-color);
--custom-h6-color: var(--custom-color-8-3);

/* 空行聚焦提示 | Blank line focus prompt */
--custom-empty-focus-p: ;
--custom-empty-focus-c: "´・-・)ノ↹";
--custom-empty-focus-t: "´・-・)ノ☑";
--custom-empty-focus-u: "´・-・)ノ◉";
--custom-empty-focus-o: "´・-・)ノ①";

/* 空行提示 | Blank line prompt */
--custom-empty-p: ;
--custom-empty-c: "这里是空的 (´・-・)ノ↹";
--custom-empty-t: "这里是空的 (´・-・)ノ☑";
--custom-empty-u: "这里是空的 (´・-・)ノ◉";
--custom-empty-o: "这里是空的 (´・-・)ノ①";

}

Zuoqiu-Yingyi commented 2 years ago

如果取消空行提示的话需要将变量设置为空字符串

:root {
    /* 子标题及其对应大纲颜色 */
    --custom-h1-color: var(--b3-card-error-color);
    --custom-h2-color: var(--b3-card-warning-color);
    --custom-h3-color: #F2F279;
    --custom-h4-color: var(--b3-card-success-color);
    --custom-h5-color: var(--b3-card-info-color);
    --custom-h6-color: var(--custom-color-8-3);

    /* 空行聚焦提示 */
    --custom-empty-focus-p: "";
    --custom-empty-focus-c: "´・-・)ノ↹";
    --custom-empty-focus-t: "´・-・)ノ☑";
    --custom-empty-focus-u: "´・-・)ノ◉";
    --custom-empty-focus-o: "´・-・)ノ①";

    /* 空行提示 */
    --custom-empty-p: "";
    --custom-empty-c: "这里是空的 (´・-・)ノ↹";
    --custom-empty-t: "这里是空的 (´・-・)ノ☑";
    --custom-empty-u: "这里是空的 (´・-・)ノ◉";
    --custom-empty-o: "这里是空的 (´・-・)ノ①";
}
Geo123abc commented 2 years ago
子标题及其对应大纲颜色

空行提示解决了,但是大纲颜色还是没变

Zuoqiu-Yingyi commented 2 years ago

空行提示解决了,但是大纲颜色还是没变

哦哦, 不好意思, 代码注释的格式有点问题, 我刚刚重新编辑了上一个回复

Geo123abc commented 2 years ago

空行提示解决了,但是大纲颜色还是没变

哦哦, 不好意思, 代码注释的格式有点问题, 我刚刚重新编辑了上一个回复

我又试了一下,但是还是有些颜色不能使用,我决定使用固定颜色值(取自你的主题中 / 自定义标准颜色(Office 标准颜色) /),但是还是不能完全正确显示

:root { / 子标题及其对应大纲颜色 / --custom-h1-color: #FA0000; --custom-h2-color: #FFC001; --custom-h3-color: #F2F279; --custom-h4-color: #00B050; --custom-h5-color: #00B0F0; --custom-h6-color: #7030A0;

/* 空行聚焦提示 */
--custom-empty-focus-p: "";
--custom-empty-focus-c: "´・-・)ノ↹";
--custom-empty-focus-t: "´・-・)ノ☑";
--custom-empty-focus-u: "´・-・)ノ◉";
--custom-empty-focus-o: "´・-・)ノ①";

/* 空行提示 */
--custom-empty-p: "";
--custom-empty-c: "这里是空的 (´・-・)ノ↹";
--custom-empty-t: "这里是空的 (´・-・)ノ☑";
--custom-empty-u: "这里是空的 (´・-・)ノ◉";
--custom-empty-o: "这里是空的 (´・-・)ノ①";

}

显示效果

(github编辑没搞好,见谅)

Zuoqiu-Yingyi commented 2 years ago

我又试了一下,但是还是有些颜色不能使用,我决定使用固定颜色值(取自你的主题中 / 自定义标准颜色(Office 标准颜色) /),但是还是不能完全正确显示

颜色有两套, 分别是暗色主题的颜色与亮色主题的颜色, 如果你想要自定义亮色主题的颜色, 那么需要新建文件 widgets/custom-light.css 并写入你的自定义颜色

:root {
    /* 子标题及其对应大纲颜色 */
    --custom-h1-color: #FA0000;
    --custom-h2-color: #FFC001;
    --custom-h3-color: #F2F279;
    --custom-h4-color: #00B050;
    --custom-h5-color: #00B0F0;
    --custom-h6-color: #7030A0;
}
Geo123abc commented 2 years ago

我又试了一下,但是还是有些颜色不能使用,我决定使用固定颜色值(取自你的主题中 / 自定义标准颜色(Office 标准颜色) /),但是还是不能完全正确显示

颜色有两套, 分别是暗色主题的颜色与亮色主题的颜色, 如果你想要自定义亮色主题的颜色, 那么需要新建文件 widgets/custom-light.css 并写入你的自定义颜色

:root {
    /* 子标题及其对应大纲颜色 */
    --custom-h1-color: #FA0000;
    --custom-h2-color: #FFC001;
    --custom-h3-color: #F2F279;
    --custom-h4-color: #00B050;
    --custom-h5-color: #00B0F0;
    --custom-h6-color: #7030A0;
}

soga!成功了,谢谢! 那么下次更新这段说明是否要备注一下custom-light.css 和custom-dark.css(?)命名区别?

  1. 在文件 <工作空间>/data/widgets/custom.css 中定义的值将覆盖 <工作空间>/conf/appearance/themes/Dark+/style/module/config.css 中对应的值
    The value defined in file <workspace>/data/widgets/custom.css overwrites the corresponding value in file
Zuoqiu-Yingyi commented 2 years ago

soga!成功了,谢谢! 那么下次更新这段说明是否要备注一下custom-light.css 和custom-dark.css(?)命名区别?

其实这里写得挺清楚了~ 自定义配置 | CUSTOM CONFIG

Geo123abc commented 2 years ago

soga!成功了,谢谢! 那么下次更新这段说明是否要备注一下custom-light.css 和custom-dark.css(?)命名区别?

其实这里写得挺清楚了~ 自定义配置 | CUSTOM CONFIG

emmmm,谢谢,最近眼神不好使~~~

Geo123abc commented 2 years ago

背景图的定义代码放在 custom-light.css 中可以生效吗?

我想把背景搞成一个全灰色的、没有线条的样子,但是 放在 custom-light.css 中,没有生效

代码如下:

:root { / 子标题及其对应大纲颜色 ,使用dark+主题中 D:\SiYuan\conf\appearance\themes\Dark+\style\module\config.css 自定义标准颜色(Office 标准颜色) ,由于黄色在主题中显示度太差,因此改为黑色/ --custom-h1-color: #FA0000; --custom-h2-color: #FFC001; --custom-h3-color: #000000; --custom-h4-color: #00B050; --custom-h5-color: #00B0F0; --custom-h6-color: #7030A0;

/* 空行聚焦提示 */
--custom-empty-focus-p: "";
--custom-empty-focus-c: "´・-・)ノ↹";
--custom-empty-focus-t: "´・-・)ノ☑";
--custom-empty-focus-u: "´・-・)ノ◉";
--custom-empty-focus-o: "´・-・)ノ①";

/* 空行提示 */
--custom-empty-p: "";
--custom-empty-c: "";
--custom-empty-t: "";
--custom-empty-u: "";
--custom-empty-o: "";

/**

export const config = { theme: { background: { image: { custom: { random: false, default: true, light: [ '/appearance/themes/background (07).png', ], dark: [ '/appearance/themes/Dark+/image/background (01).jpg', ], }, }, }, }, } }

Zuoqiu-Yingyi commented 2 years ago

背景图 URL 变量是 --custom-background-image, 因此在 custom-light.css 中设置即可

:root {
    /* 子标题及其对应大纲颜色 */
    --custom-h1-color: #FA0000;
    --custom-h2-color: #FFC001;
    --custom-h3-color: #000000;
    --custom-h4-color: #00B050;
    --custom-h5-color: #00B0F0;
    --custom-h6-color: #7030A0;

    /* 空行聚焦提示 */
    --custom-empty-focus-p: "";
    --custom-empty-focus-c: "´・-・)ノ↹";
    --custom-empty-focus-t: "´・-・)ノ☑";
    --custom-empty-focus-u: "´・-・)ノ◉";
    --custom-empty-focus-o: "´・-・)ノ①";

    /* 空行提示 */
    --custom-empty-p: "";
    --custom-empty-c: "";
    --custom-empty-t: "";
    --custom-empty-u: "";
    --custom-empty-o: "";

    /* 默认背景图片 */
    --custom-background-image: url("/appearance/themes/background (07).png");
}
Geo123abc commented 2 years ago

背景图 URL 变量是 --custom-background-image, 因此在 custom-light.css 中设置即可

:root {
    /* 子标题及其对应大纲颜色 */
    --custom-h1-color: #FA0000;
    --custom-h2-color: #FFC001;
    --custom-h3-color: #000000;
    --custom-h4-color: #00B050;
    --custom-h5-color: #00B0F0;
    --custom-h6-color: #7030A0;

    /* 空行聚焦提示 */
    --custom-empty-focus-p: "";
    --custom-empty-focus-c: "´・-・)ノ↹";
    --custom-empty-focus-t: "´・-・)ノ☑";
    --custom-empty-focus-u: "´・-・)ノ◉";
    --custom-empty-focus-o: "´・-・)ノ①";

    /* 空行提示 */
    --custom-empty-p: "";
    --custom-empty-c: "";
    --custom-empty-t: "";
    --custom-empty-u: "";
    --custom-empty-o: "";

    /* 默认背景图片 */
    --custom-background-image: url("/appearance/themes/background (07).png");
}

漂亮,谢谢