@sugarat/create-theme 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import BlogTheme from '@sugarat/theme'
2
2
 
3
- // 默认颜色仍然使用绿色
4
- import './green-theme.var.css'
5
-
6
3
  // 自定义样式重载
7
4
  // import './style.scss'
8
5
 
6
+ // 自定义主题色
7
+ // import './user-theme.css'
8
+
9
9
  export default BlogTheme
@@ -0,0 +1,26 @@
1
+ /* 所有变量:https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */
2
+ /* 自定义主题色示例,如下 */
3
+
4
+ /* 浅色模式使用的变量 */
5
+ html[theme] {
6
+ --vp-c-user-1:red;
7
+ --vp-c-user-2:blue;
8
+ --vp-c-user-3:green;
9
+ --vp-c-user-soft:rgba(255,0,0,.5);
10
+ }
11
+
12
+ /* 深色模式使用的变量 */
13
+ html[theme].dark {
14
+ --vp-c-user-1:yellow;
15
+ --vp-c-user-2:purple;
16
+ --vp-c-user-3:orange;
17
+ --vp-c-user-soft:rgba(255,255,0,.5);
18
+ }
19
+
20
+ /* 覆盖默认变量 */
21
+ html[theme],html[theme].dark {
22
+ --vp-c-brand-1: var(--vp-c-user-1);
23
+ --vp-c-brand-2: var(--vp-c-user-2);
24
+ --vp-c-brand-3: var(--vp-c-user-3);
25
+ --vp-c-brand-soft: var(--vp-c-user-soft);
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sugarat/create-theme",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
5
  "author": "粥里有勺糖",
6
6
  "license": "MIT",
@@ -1,13 +0,0 @@
1
- :root {
2
- /* 使用之前的绿色主题,重写当前紫色的 */
3
- /* 所有变量:https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */
4
- --vp-c-brand: var(--vp-c-green);
5
- --vp-c-brand-light: var(--vp-c-green-light);
6
- --vp-c-brand-lighter: var(--vp-c-green-lighter);
7
- --vp-c-brand-dark: var(--vp-c-green-dark);
8
- --vp-c-brand-darker: var(--vp-c-green-darker);
9
- --vp-c-brand-dimm-1: var(--vp-c-green-dimm-1);
10
- --vp-c-brand-dimm-2: var(--vp-c-green-dimm-2);
11
- --vp-c-brand-dimm-3: var(--vp-c-green-dimm-3);
12
- --vp-c-brand-text: var(--vp-c-green);
13
- }