valaxy 0.1.1 → 0.2.1
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.
- package/bin/valaxy.js +1 -1
- package/dist/chunk-B2JVVNA4.js +88 -0
- package/dist/chunk-FH6NMGNX.mjs +88 -0
- package/dist/chunk-TSLYS2VY.js +1 -0
- package/dist/chunk-U4ZDCBEC.mjs +1 -0
- package/dist/config-24b4f209.d.ts +188 -0
- package/dist/index.d.ts +337 -150
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{cli.d.ts → node/cli.d.ts} +0 -0
- package/dist/node/cli.js +45 -0
- package/dist/node/cli.mjs +45 -0
- package/dist/node/index.d.ts +46 -0
- package/dist/node/index.js +1 -0
- package/dist/node/index.mjs +1 -0
- package/package.json +23 -20
- package/src/client/components/PostCard.vue +16 -17
- package/src/client/components/PostList.vue +3 -3
- package/src/client/components/ValaxyCopyright.vue +1 -1
- package/src/client/components/ValaxyFooter.vue +1 -1
- package/src/client/components/ValaxyMd.vue +1 -1
- package/src/client/components/ValaxyOverlay.vue +4 -4
- package/src/client/components/ValaxyPagination.vue +14 -11
- package/src/client/components/ValaxyRightSidebar.vue +2 -2
- package/src/client/components/ValaxySidebar.vue +4 -10
- package/src/client/components/ValaxyToc.vue +12 -10
- package/src/client/composables/category.ts +24 -5
- package/src/client/composables/comments/index.ts +1 -0
- package/src/client/composables/comments/twikoo.ts +37 -0
- package/src/client/composables/comments/waline.ts +8 -5
- package/src/client/composables/common.ts +3 -4
- package/src/client/composables/post.ts +26 -1
- package/src/client/composables/search/algolia.ts +2 -1
- package/src/client/composables/sidebar.ts +2 -2
- package/src/client/composables/tag.ts +9 -2
- package/src/client/composables/widgets/backToTop.ts +10 -4
- package/src/client/index.html +5 -0
- package/src/client/layouts/404.vue +5 -1
- package/src/client/main.ts +2 -9
- package/src/client/modules/valaxy.ts +31 -13
- package/src/client/shims.d.ts +5 -5
- package/src/client/styles/common/button.scss +3 -5
- package/src/client/styles/common/code.scss +181 -9
- package/src/client/styles/common/custom-blocks.scss +84 -0
- package/src/client/styles/common/hamburger.scss +2 -2
- package/src/client/styles/common/markdown.scss +4 -6
- package/src/client/styles/common/sidebar.scss +3 -3
- package/src/client/styles/common/transition.scss +2 -2
- package/src/client/styles/css-vars.scss +39 -0
- package/src/client/styles/global/helper.scss +2 -2
- package/src/client/styles/global/i18n.scss +20 -0
- package/src/client/styles/global/index.scss +1 -1
- package/src/client/styles/global/nprogress.scss +1 -1
- package/src/client/styles/global/reset.scss +1 -1
- package/src/client/styles/index.scss +21 -8
- package/src/client/styles/mixins/config.scss +1 -1
- package/src/client/styles/mixins/index.scss +1 -0
- package/src/client/styles/palette.scss +58 -44
- package/src/client/styles/vars.scss +1 -13
- package/src/client/styles/widgets/banner.scss +2 -2
- package/src/client/utils/index.ts +0 -2
- package/src/node/build.ts +20 -1
- package/src/node/cli.ts +32 -19
- package/src/node/markdown/headings.ts +3 -2
- package/src/node/markdown/highlight.ts +50 -0
- package/src/node/markdown/highlightLines.ts +96 -0
- package/src/node/markdown/index.ts +23 -12
- package/src/node/markdown/markdown-it-container.ts +9 -1
- package/src/node/markdown/markdown-it-katex.ts +20 -10
- package/src/node/markdown/parseHeader.ts +4 -2
- package/src/node/options.ts +3 -1
- package/src/node/plugins/index.ts +53 -24
- package/src/node/plugins/markdown.ts +1 -1
- package/src/node/plugins/preset.ts +46 -10
- package/src/node/plugins/unocss.ts +21 -19
- package/src/node/rss.ts +127 -0
- package/src/node/server.ts +1 -1
- package/src/node/shims.d.ts +15 -0
- package/src/node/utils/cli.ts +0 -1
- package/src/node/vite.ts +7 -15
- package/src/types/config.ts +28 -2
- package/src/types/posts.ts +6 -1
- package/tsup.config.ts +1 -0
- package/dist/build-VGAF4K5S.js +0 -1
- package/dist/build-Y5F7AZ2V.mjs +0 -1
- package/dist/chunk-5KQ3UFYI.js +0 -1
- package/dist/chunk-ESCOXVP6.mjs +0 -83
- package/dist/chunk-JWA76JND.mjs +0 -1
- package/dist/chunk-WYCH73X6.js +0 -83
- package/dist/cli.js +0 -6
- package/dist/cli.mjs +0 -6
- package/src/client/pages/about/index.md +0 -5
- package/src/client/pages/posts/index.md +0 -5
- package/src/client/styles/css-vars/dark.scss +0 -17
- package/src/client/styles/css-vars/index.scss +0 -18
- package/src/client/styles/css-vars/light.scss +0 -9
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@use "../palette.scss" as * ;
|
|
2
|
-
|
|
3
1
|
.yun-icon-btn {
|
|
4
2
|
cursor: pointer;
|
|
5
3
|
|
|
@@ -13,17 +11,17 @@
|
|
|
13
11
|
|
|
14
12
|
border-radius: 50%;
|
|
15
13
|
|
|
16
|
-
transition: var(--
|
|
14
|
+
transition: background-color var(--va-transition-duration);
|
|
17
15
|
|
|
18
16
|
div {
|
|
19
17
|
font-size: 1.2rem;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
&:hover {
|
|
23
|
-
background-color: rgba(var(--
|
|
21
|
+
background-color: rgba(var(--va-c-primary-rgb), 0.08);
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
&:active {
|
|
27
|
-
background-color: rgba(var(--
|
|
25
|
+
background-color: rgba(var(--va-c-primary-rgb), 0.16);
|
|
28
26
|
}
|
|
29
27
|
}
|
|
@@ -1,5 +1,73 @@
|
|
|
1
|
+
@use "~/styles/mixins" as *;
|
|
2
|
+
|
|
3
|
+
/* https://github.com/antfu/prism-theme-vars */
|
|
4
|
+
@use "prism-theme-vars/base.css" as *;
|
|
5
|
+
|
|
6
|
+
@include mobile {
|
|
7
|
+
.markdown-body {
|
|
8
|
+
div[class*="language-"] {
|
|
9
|
+
margin: 0 -1rem;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.markdown-body {
|
|
15
|
+
div[class*="language-"] {
|
|
16
|
+
position: relative;
|
|
17
|
+
padding: 0;
|
|
18
|
+
background-color: var(--smc-code-bg-color);
|
|
19
|
+
|
|
20
|
+
pre {
|
|
21
|
+
position: relative;
|
|
22
|
+
padding: 1rem;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
background: none;
|
|
25
|
+
|
|
26
|
+
// expand
|
|
27
|
+
code {
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Line highlighting */
|
|
35
|
+
|
|
36
|
+
.highlight-lines {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
left: 0;
|
|
41
|
+
padding: 1rem 0;
|
|
42
|
+
width: 100%;
|
|
43
|
+
line-height: var(--prism-line-height);
|
|
44
|
+
user-select: none;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
|
|
47
|
+
.highlighted {
|
|
48
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dark {
|
|
53
|
+
.highlight-lines {
|
|
54
|
+
.highlighted {
|
|
55
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.markdown-body {
|
|
61
|
+
code {
|
|
62
|
+
color: var(--prism-foreground) !important;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// prism
|
|
1
67
|
html:not(.dark) {
|
|
2
|
-
|
|
68
|
+
// text
|
|
69
|
+
--prism-foreground: #224466;
|
|
70
|
+
|
|
3
71
|
--prism-background: #f8f8f8;
|
|
4
72
|
--prism-comment: #758575;
|
|
5
73
|
--prism-namespace: #444444;
|
|
@@ -7,7 +75,7 @@ html:not(.dark) {
|
|
|
7
75
|
--prism-punctuation: #80817d;
|
|
8
76
|
--prism-literal: #36acaa;
|
|
9
77
|
--prism-keyword: #248459;
|
|
10
|
-
--prism-function: #
|
|
78
|
+
--prism-function: #0088bb;
|
|
11
79
|
--prism-deleted: #9a050f;
|
|
12
80
|
--prism-class: #2b91af;
|
|
13
81
|
--prism-builtin: #800000;
|
|
@@ -16,20 +84,124 @@ html:not(.dark) {
|
|
|
16
84
|
}
|
|
17
85
|
|
|
18
86
|
html.dark {
|
|
19
|
-
--prism-foreground: #
|
|
87
|
+
--prism-foreground: #a6accd;
|
|
88
|
+
|
|
20
89
|
--prism-background: #242424;
|
|
21
90
|
--prism-namespace: #aaaaaa;
|
|
22
91
|
--prism-comment: #758575;
|
|
23
92
|
--prism-namespace: #444444;
|
|
24
|
-
--prism-string: #
|
|
25
|
-
--prism-punctuation: #
|
|
93
|
+
--prism-string: #c3e88d;
|
|
94
|
+
--prism-punctuation: #a6accd;
|
|
26
95
|
--prism-literal: #36acaa;
|
|
27
|
-
--prism-keyword: #
|
|
28
|
-
--prism-function: #
|
|
96
|
+
--prism-keyword: #89ddff;
|
|
97
|
+
--prism-function: #82aaff;
|
|
29
98
|
--prism-deleted: #9a050f;
|
|
30
99
|
--prism-class: #4ec9b0;
|
|
31
100
|
--prism-builtin: #d16969;
|
|
32
|
-
--prism-property: #
|
|
101
|
+
--prism-property: #c792ea;
|
|
33
102
|
--prism-regex: #ad502b;
|
|
34
|
-
--prism-selector: #
|
|
103
|
+
--prism-selector: #c3e88d;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Language marker */
|
|
107
|
+
// @use 'prism-theme-vars/marker.css' as *; * not div
|
|
108
|
+
div[class*="language-"]:before {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 0.6em;
|
|
111
|
+
right: 1em;
|
|
112
|
+
z-index: 2;
|
|
113
|
+
font-size: 0.8rem;
|
|
114
|
+
color: #888;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
div[class~="language-html"]:before,
|
|
118
|
+
div[class~="language-markup"]:before {
|
|
119
|
+
content: "html";
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
div[class~="language-md"]:before,
|
|
123
|
+
div[class~="language-markdown"]:before {
|
|
124
|
+
content: "md";
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
div[class~="language-css"]:before {
|
|
128
|
+
content: "css";
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
div[class~="language-sass"]:before {
|
|
132
|
+
content: "sass";
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
div[class~="language-scss"]:before {
|
|
136
|
+
content: "scss";
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
div[class~="language-less"]:before {
|
|
140
|
+
content: "less";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
div[class~="language-stylus"]:before {
|
|
144
|
+
content: "styl";
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
div[class~="language-js"]:before,
|
|
148
|
+
div[class~="language-javascript"]:before {
|
|
149
|
+
content: "js";
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
div[class~="language-ts"]:before,
|
|
153
|
+
div[class~="language-typescript"]:before {
|
|
154
|
+
content: "ts";
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
div[class~="language-json"]:before {
|
|
158
|
+
content: "json";
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
div[class~="language-rb"]:before,
|
|
162
|
+
div[class~="language-ruby"]:before {
|
|
163
|
+
content: "rb";
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
div[class~="language-py"]:before,
|
|
167
|
+
div[class~="language-python"]:before {
|
|
168
|
+
content: "py";
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
div[class~="language-sh"]:before,
|
|
172
|
+
div[class~="language-bash"]:before {
|
|
173
|
+
content: "sh";
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
div[class~="language-php"]:before {
|
|
177
|
+
content: "php";
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
div[class~="language-go"]:before {
|
|
181
|
+
content: "go";
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
div[class~="language-rust"]:before {
|
|
185
|
+
content: "rust";
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
div[class~="language-java"]:before {
|
|
189
|
+
content: "java";
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
div[class~="language-c"]:before {
|
|
193
|
+
content: "c";
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
div[class~="language-yml"]:before,
|
|
197
|
+
div[class~="language-yaml"]:before {
|
|
198
|
+
content: "yaml";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
div[class~="language-dockerfile"]:before {
|
|
202
|
+
content: "dockerfile";
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
div[class~="language-vue"]:before {
|
|
206
|
+
content: "vue";
|
|
35
207
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.custom-block.tip,
|
|
2
|
+
.custom-block.info,
|
|
3
|
+
.custom-block.warning,
|
|
4
|
+
.custom-block.danger {
|
|
5
|
+
margin: 1rem 0;
|
|
6
|
+
border-left: 6px solid;
|
|
7
|
+
padding: 0.1rem 1.5rem;
|
|
8
|
+
overflow-x: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
--va-c-text-warning: #544500;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
html.dark {
|
|
16
|
+
--va-c-text-warning: #ffea8a;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.custom-block {
|
|
20
|
+
&.info {
|
|
21
|
+
background-color: rgba(200, 200, 200, 0.1);
|
|
22
|
+
}
|
|
23
|
+
&.tip {
|
|
24
|
+
background-color: rgba(200, 200, 200, 0.1);
|
|
25
|
+
border-color: var(--va-c-primary);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.warning {
|
|
29
|
+
border-color: #e7c000;
|
|
30
|
+
color: var(--va-c-text-warning);
|
|
31
|
+
background-color: rgba(255, 229, 100, 0.3);
|
|
32
|
+
|
|
33
|
+
a {
|
|
34
|
+
color: var(--va-c-text);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.custom-block.info {
|
|
40
|
+
border-color: var(--c-text-light-2);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.custom-block.warning .custom-block-title {
|
|
44
|
+
color: #b29400;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.custom-block.danger {
|
|
48
|
+
border-color: #c00;
|
|
49
|
+
color: #4d0000;
|
|
50
|
+
background-color: #ffe6e6;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.custom-block.danger .custom-block-title {
|
|
54
|
+
color: #900;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.custom-block.details {
|
|
58
|
+
position: relative;
|
|
59
|
+
display: block;
|
|
60
|
+
border-radius: 2px;
|
|
61
|
+
margin: 1.6em 0;
|
|
62
|
+
padding: 1.6em;
|
|
63
|
+
background-color: rgba(200, 200, 200, 0.2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.custom-block.details h4 {
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.custom-block.details figure:last-child,
|
|
71
|
+
.custom-block.details p:last-child {
|
|
72
|
+
margin-bottom: 0;
|
|
73
|
+
padding-bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.custom-block.details summary {
|
|
77
|
+
outline: none;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.custom-block-title {
|
|
82
|
+
margin-bottom: -0.4rem;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
}
|
|
@@ -19,7 +19,7 @@ $hamburger-size: 22px;
|
|
|
19
19
|
.vt-hamburger.is-active:hover .vt-hamburger-top,
|
|
20
20
|
.vt-hamburger.is-active:hover .vt-hamburger-middle,
|
|
21
21
|
.vt-hamburger.is-active:hover .vt-hamburger-bottom {
|
|
22
|
-
background-color: var(--
|
|
22
|
+
background-color: var(--va-c-primary);
|
|
23
23
|
transition: top .25s, background-color .25s, transform .25s;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -38,7 +38,7 @@ $hamburger-size: 22px;
|
|
|
38
38
|
position: absolute;
|
|
39
39
|
width: $hamburger-size;
|
|
40
40
|
height: 2px;
|
|
41
|
-
background-color: var(--
|
|
41
|
+
background-color: var(--va-c-primary);
|
|
42
42
|
transition: top .25s, background-color .5s, transform .25s;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
@use 'prism-theme-vars/base.css' as *;
|
|
3
|
-
@use './code.scss' as *;
|
|
1
|
+
@use 'sass:map';
|
|
4
2
|
|
|
5
3
|
.markdown-body {
|
|
6
|
-
--prism-font-family: var(--
|
|
4
|
+
--prism-font-family: var(--va-font-mono);
|
|
7
5
|
|
|
8
|
-
--smc-
|
|
6
|
+
--smc-font-family: var(--va-font-sans);
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
// for anchor
|
|
@@ -33,7 +31,7 @@ a.header-anchor {
|
|
|
33
31
|
font-size: 0.85em;
|
|
34
32
|
visibility: hidden;
|
|
35
33
|
opacity: 0;
|
|
36
|
-
transition: opacity var(--
|
|
34
|
+
transition: opacity var(--va-transition-duration);
|
|
37
35
|
|
|
38
36
|
&::before {
|
|
39
37
|
content: none;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
left: 0;
|
|
12
12
|
|
|
13
13
|
width: calc(100vw - 64px);
|
|
14
|
-
max-width: var(--
|
|
14
|
+
max-width: var(--va-sidebar-width-mobile);
|
|
15
15
|
|
|
16
16
|
background-image: var(--yun-sidebar-bg-image);
|
|
17
17
|
background-color: var(--yun-sidebar-bg-color);
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
background-repeat: no-repeat;
|
|
20
20
|
background-position: bottom 1rem center;
|
|
21
21
|
text-align: center;
|
|
22
|
-
z-index:
|
|
22
|
+
z-index: var(--yun-z-sidebar);
|
|
23
23
|
|
|
24
24
|
transform: translateX(-100%);
|
|
25
|
-
transition: transform var(--
|
|
25
|
+
transition: transform var(--va-transition-duration);
|
|
26
26
|
|
|
27
27
|
&.open {
|
|
28
28
|
transform: translateX(0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.v {
|
|
2
2
|
&-enter-active,
|
|
3
3
|
&-leave-active {
|
|
4
|
-
transition: opacity 0.
|
|
4
|
+
transition: opacity var(--va-transition-duration, 0.4s) ease;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
&-enter-from,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
.fade {
|
|
14
14
|
&-enter-active,
|
|
15
15
|
&-leave-active {
|
|
16
|
-
transition: opacity 0.
|
|
16
|
+
transition: opacity var(--va-transition-duration, 0.4s) ease;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&-enter-from,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "./mixins" as *;
|
|
3
|
+
@use "./vars" as *;
|
|
4
|
+
|
|
5
|
+
$c-primary: #0078E7 !default;
|
|
6
|
+
|
|
7
|
+
@use "./palette" with (
|
|
8
|
+
$colors: (
|
|
9
|
+
'primary': $c-primary,
|
|
10
|
+
)
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
// common
|
|
14
|
+
:root {
|
|
15
|
+
@include set-css-var-from-map($common);
|
|
16
|
+
@include set-css-var-from-map($border, 'border');
|
|
17
|
+
@include set-css-var-from-map($font, 'font');
|
|
18
|
+
@include set-css-var-from-map($transition, 'transition');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// colors
|
|
22
|
+
:root {
|
|
23
|
+
// palette different with colors
|
|
24
|
+
@include set-css-var-from-map(palette.$palette, 'c');
|
|
25
|
+
// primary
|
|
26
|
+
@include set-css-var-from-map(palette.$colors, 'c');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// light
|
|
30
|
+
:root {
|
|
31
|
+
color-scheme: light;
|
|
32
|
+
@include set-css-var-from-map(palette.$light);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// dark
|
|
36
|
+
html.dark {
|
|
37
|
+
color-scheme: dark;
|
|
38
|
+
@include set-css-var-from-map(palette.$dark);
|
|
39
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.
|
|
2
|
-
background-color: var(--
|
|
1
|
+
.va-card {
|
|
2
|
+
background-color: var(--va-c-bg-light);
|
|
3
3
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
$languages: zh-CN, en;
|
|
2
|
+
|
|
3
|
+
html[lang] {
|
|
4
|
+
.markdown-body {
|
|
5
|
+
div[lang] {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@each $lang in $languages {
|
|
12
|
+
html[lang="#{$lang}"] {
|
|
13
|
+
// only for markdown
|
|
14
|
+
.markdown-body {
|
|
15
|
+
div[lang="#{$lang}"] {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
// import common and light/dark css vars in main.ts
|
|
2
2
|
|
|
3
|
+
$c-primary: #0078e7 !default;
|
|
4
|
+
|
|
3
5
|
// global css
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
7
|
-
@use
|
|
6
|
+
@use "./global/reset.scss" as *;
|
|
7
|
+
@use "./global/helper.scss" as *;
|
|
8
|
+
@use "./global/index.scss" as *;
|
|
9
|
+
@use "./global/i18n.scss" as *;
|
|
10
|
+
@use "./global/nprogress.scss" as *;
|
|
8
11
|
|
|
9
12
|
// common
|
|
10
|
-
@use
|
|
11
|
-
@use
|
|
12
|
-
@use
|
|
13
|
+
@use "./common/button.scss" as *;
|
|
14
|
+
@use "./common/code.scss" as *;
|
|
15
|
+
@use "./common/custom-blocks.scss" as *;
|
|
16
|
+
@use "./common/hamburger.scss" as *;
|
|
17
|
+
|
|
13
18
|
@use "./common/scrollbar.scss" as *;
|
|
14
19
|
@use "./common/sidebar.scss" as *;
|
|
15
20
|
@use "./common/transition.scss" as *;
|
|
16
21
|
|
|
17
22
|
// banner
|
|
18
|
-
@use
|
|
23
|
+
@use "./widgets/banner.scss" as *;
|
|
24
|
+
|
|
25
|
+
// markdown
|
|
26
|
+
@use "./common/markdown.scss";
|
|
27
|
+
@forward "star-markdown-css/src/scss/theme/yun.scss" with (
|
|
28
|
+
$colors: (
|
|
29
|
+
"primary": $c-primary,
|
|
30
|
+
)
|
|
31
|
+
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
$namespace: '
|
|
1
|
+
$namespace: 'va' !default;
|
|
@@ -1,62 +1,76 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
2
3
|
|
|
3
4
|
@use "./mixins" as *;
|
|
4
5
|
|
|
5
6
|
$palette: () !default;
|
|
6
|
-
$palette: map.merge(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
$palette: map.merge(
|
|
8
|
+
(
|
|
9
|
+
"white": #ffffff,
|
|
10
|
+
"black": #1a1a1a,
|
|
11
|
+
"gray": #8e8e8e,
|
|
12
|
+
"danger": #db2828,
|
|
13
|
+
"warning": #f2711c,
|
|
14
|
+
),
|
|
15
|
+
$palette
|
|
16
|
+
);
|
|
13
17
|
|
|
14
18
|
$colors: () !default;
|
|
15
|
-
$colors: map.merge(
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
$colors: map.merge(
|
|
20
|
+
(
|
|
21
|
+
"primary": #0078e7,
|
|
22
|
+
),
|
|
23
|
+
$colors
|
|
24
|
+
);
|
|
18
25
|
|
|
19
|
-
$c-primary: map.get($colors,
|
|
20
|
-
|
|
21
|
-
$colors: map.merge((
|
|
22
|
-
'primary-light': lighten($c-primary, 15%),
|
|
23
|
-
'primary-lighter': lighten($c-primary, 30%),
|
|
24
|
-
'primary-dark': darken($c-primary, 5%),
|
|
25
|
-
), $colors);
|
|
26
|
+
$c-primary: map.get($colors, "primary") !default;
|
|
26
27
|
|
|
28
|
+
$colors: map.merge(
|
|
29
|
+
(
|
|
30
|
+
"primary-light": lighten($c-primary, 15%),
|
|
31
|
+
"primary-lighter": lighten($c-primary, 30%),
|
|
32
|
+
"primary-dark": darken($c-primary, 5%),
|
|
33
|
+
),
|
|
34
|
+
$colors
|
|
35
|
+
);
|
|
27
36
|
|
|
28
37
|
$light: () !default;
|
|
29
|
-
$light: map.merge(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'c-bg': white,
|
|
34
|
-
'c-bg-light': white,
|
|
35
|
-
'c-bg-dark': #fafafa,
|
|
36
|
-
'c-text': #333,
|
|
37
|
-
'c-text-light': #555,
|
|
38
|
-
'c-text-dark': #111,
|
|
38
|
+
$light: map.merge(
|
|
39
|
+
(
|
|
40
|
+
"border-color": #222,
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
"c-bg": white,
|
|
43
|
+
"c-bg-light": white,
|
|
44
|
+
"c-bg-dark": #fafafa,
|
|
45
|
+
"c-text": #333,
|
|
46
|
+
"c-text-light": #555,
|
|
47
|
+
"c-text-dark": #111,
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
"c-primary-rgb": #{red($c-primary),
|
|
50
|
+
green(
|
|
51
|
+
$c-primary,
|
|
52
|
+
),
|
|
53
|
+
blue($c-primary)},
|
|
43
54
|
|
|
44
|
-
|
|
45
|
-
),
|
|
55
|
+
"c-link": get-css-var("c-primary-dark"),
|
|
56
|
+
),
|
|
57
|
+
$light
|
|
58
|
+
);
|
|
46
59
|
|
|
47
60
|
$dark: () !default;
|
|
48
|
-
$dark: map.merge(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'c-bg': #1a1a1a,
|
|
53
|
-
'c-bg-light': #22252e,
|
|
54
|
-
'c-bg-dark': #1a1a1a,
|
|
61
|
+
$dark: map.merge(
|
|
62
|
+
(
|
|
63
|
+
"border-color": #e6e6e6,
|
|
55
64
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
'c-text-dark': rgba(#ebebeb, 0.8),
|
|
65
|
+
"c-bg": #1a1a1a,
|
|
66
|
+
"c-bg-light": #22252e,
|
|
67
|
+
"c-bg-dark": #1a1a1a,
|
|
60
68
|
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
"c-text": #f2f2f2,
|
|
70
|
+
"c-text-light": #eee,
|
|
71
|
+
"c-text-lighter": #ddd,
|
|
72
|
+
"c-text-dark": rgba(#ebebeb, 0.8),
|
|
73
|
+
"c-link": map.get($colors, "primary-light"),
|
|
74
|
+
),
|
|
75
|
+
$dark
|
|
76
|
+
);
|