@vuepress/theme-default 2.0.0-rc.43 → 2.0.0-rc.45
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/lib/client/components/VPPageNav.vue +1 -1
- package/lib/client/components/global/Badge.vue +29 -15
- package/lib/client/styles/code-group.scss +1 -1
- package/lib/client/styles/content/normalize.scss +2 -2
- package/lib/client/styles/normalize.scss +0 -63
- package/lib/client/styles/vars-dark.scss +2 -2
- package/lib/client/styles/vars.scss +17 -8
- package/lib/node/defaultTheme.js +0 -3
- package/package.json +20 -20
- package/templates/build.html +1 -1
|
@@ -49,39 +49,53 @@ defineSlots<{
|
|
|
49
49
|
padding: 0 6px;
|
|
50
50
|
border-radius: 3px;
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
background: var(--vp-c-accent-soft);
|
|
53
|
+
color: var(--vp-c-accent);
|
|
53
54
|
|
|
54
|
-
font-weight: 600;
|
|
55
55
|
font-size: 14px;
|
|
56
56
|
line-height: 18px;
|
|
57
57
|
|
|
58
58
|
transition:
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
background var(--vp-t-color),
|
|
60
|
+
color var(--vp-t-color);
|
|
61
|
+
|
|
62
|
+
& + & {
|
|
63
|
+
margin-inline-start: 5px;
|
|
64
|
+
}
|
|
61
65
|
|
|
62
66
|
&.tip {
|
|
63
|
-
background
|
|
64
|
-
color: var(--c-
|
|
67
|
+
background: var(--badge-c-tip-bg);
|
|
68
|
+
color: var(--badge-c-tip-text);
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
&.warning {
|
|
68
|
-
background
|
|
69
|
-
color: var(--c-
|
|
72
|
+
background: var(--badge-c-warning-bg);
|
|
73
|
+
color: var(--badge-c-warning-text);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
&.danger {
|
|
73
|
-
background
|
|
74
|
-
color: var(--c-
|
|
77
|
+
background: var(--badge-c-danger-bg);
|
|
78
|
+
color: var(--badge-c-danger-text);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.important {
|
|
82
|
+
background: var(--badge-c-important-bg);
|
|
83
|
+
color: var(--badge-c-important-text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.info {
|
|
87
|
+
background: var(--badge-c-info-bg);
|
|
88
|
+
color: var(--badge-c-info-text);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.note {
|
|
92
|
+
background: var(--badge-c-note-bg);
|
|
93
|
+
color: var(--badge-c-note-text);
|
|
75
94
|
}
|
|
76
95
|
|
|
77
96
|
// update the vertical align for the badge in toc
|
|
78
97
|
.table-of-contents & {
|
|
79
98
|
vertical-align: middle;
|
|
80
99
|
}
|
|
81
|
-
|
|
82
|
-
// avoid extra space between badges
|
|
83
|
-
& + & {
|
|
84
|
-
margin-left: 5px;
|
|
85
|
-
}
|
|
86
100
|
}
|
|
87
101
|
</style>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
h4,
|
|
8
8
|
h5,
|
|
9
9
|
h6 {
|
|
10
|
-
margin-top: calc(0.5rem - var(--
|
|
10
|
+
margin-top: calc(0.5rem - var(--header-offset));
|
|
11
11
|
margin-bottom: 0;
|
|
12
|
-
padding-top: calc(1rem + var(--
|
|
12
|
+
padding-top: calc(1rem + var(--header-offset));
|
|
13
13
|
|
|
14
14
|
&:first-child {
|
|
15
15
|
margin-bottom: 1rem;
|
|
@@ -1,70 +1,7 @@
|
|
|
1
|
-
html,
|
|
2
1
|
body {
|
|
3
|
-
background-color: var(--vp-c-bg);
|
|
4
|
-
accent-color: var(--vp-c-accent);
|
|
5
|
-
transition: background-color var(--vp-t-color);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
[data-theme='dark'] {
|
|
9
|
-
color-scheme: dark;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
body {
|
|
13
|
-
color: var(--vp-c-text);
|
|
14
|
-
font-size: 1rem;
|
|
15
2
|
font-family: var(--font-family);
|
|
16
3
|
}
|
|
17
4
|
|
|
18
|
-
h2 {
|
|
19
|
-
border-color: var(--vp-c-gutter);
|
|
20
|
-
transition: border-color var(--vp-t-color);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
a {
|
|
24
|
-
color: var(--vp-c-accent);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
5
|
code {
|
|
28
6
|
font-family: var(--code-font-family);
|
|
29
|
-
|
|
30
|
-
:not(pre) > & {
|
|
31
|
-
background-color: var(--vp-c-grey-soft);
|
|
32
|
-
color: var(--vp-c-text-mute);
|
|
33
|
-
transition: background-color var(--vp-t-color);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
p a & {
|
|
37
|
-
color: var(--vp-c-accent);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
kbd {
|
|
42
|
-
border-color: var(--vp-c-border-hard);
|
|
43
|
-
transition: border-color var(--vp-t-color);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
blockquote {
|
|
47
|
-
border-color: var(--vp-c-border-hard);
|
|
48
|
-
color: var(--vp-c-text-mute);
|
|
49
|
-
transition: border-color var(--vp-t-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
hr {
|
|
53
|
-
border-color: var(--vp-c-gutter);
|
|
54
|
-
transition: border-color var(--vp-t-color);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
table {
|
|
58
|
-
transition: border-color var(--vp-t-color);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
tbody tr:nth-child(odd) {
|
|
62
|
-
background-color: var(--vp-c-bg-alt);
|
|
63
|
-
transition: background-color var(--vp-t-color);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
th,
|
|
67
|
-
td {
|
|
68
|
-
border-color: var(--vp-c-border-hard);
|
|
69
|
-
transition: border-color var(--vp-t-color);
|
|
70
7
|
}
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
--vp-c-shadow: rgb(0 0 0 / 15%);
|
|
27
27
|
|
|
28
28
|
// control colors
|
|
29
|
-
--vp-c-control:
|
|
30
|
-
--vp-c-control-hover:
|
|
29
|
+
--vp-c-control: rgb(142 150 170 / 10%);
|
|
30
|
+
--vp-c-control-hover: rgb(142 150 170 / 16%);
|
|
31
31
|
--vp-c-control-disabled: #eaeaea;
|
|
32
32
|
|
|
33
33
|
// layout colors
|
|
@@ -40,12 +40,18 @@
|
|
|
40
40
|
--vp-c-code-tab-active: var(--vp-c-accent);
|
|
41
41
|
|
|
42
42
|
// badge colors
|
|
43
|
-
--c-
|
|
44
|
-
--c-
|
|
45
|
-
--c-
|
|
46
|
-
--c-
|
|
47
|
-
--c-
|
|
48
|
-
--c-
|
|
43
|
+
--badge-c-tip-text: var(--vp-c-green-text);
|
|
44
|
+
--badge-c-tip-bg: var(--vp-c-green-soft);
|
|
45
|
+
--badge-c-warning-text: var(--vp-c-yellow-text);
|
|
46
|
+
--badge-c-warning-bg: var(--vp-c-yellow-soft);
|
|
47
|
+
--badge-c-danger-text: var(--vp-c-red-text);
|
|
48
|
+
--badge-c-danger-bg: var(--vp-c-red-soft);
|
|
49
|
+
--badge-c-important-text: var(--vp-c-purple-text);
|
|
50
|
+
--badge-c-important-bg: var(--vp-c-purple-soft);
|
|
51
|
+
--badge-c-info-text: var(--vp-c-indigo-text);
|
|
52
|
+
--badge-c-info-bg: var(--vp-c-indigo-soft);
|
|
53
|
+
--badge-c-note-text: var(--vp-c-grey-text);
|
|
54
|
+
--badge-c-note-bg: var(--vp-c-grey-soft);
|
|
49
55
|
|
|
50
56
|
// font vars
|
|
51
57
|
--font-family: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', roboto, oxygen,
|
|
@@ -60,6 +66,9 @@
|
|
|
60
66
|
--content-width: 740px;
|
|
61
67
|
--homepage-width: 960px;
|
|
62
68
|
|
|
69
|
+
// header offset
|
|
70
|
+
--header-offset: var(--navbar-height);
|
|
71
|
+
|
|
63
72
|
// transition vars
|
|
64
73
|
--vp-t-color: 0.3s ease;
|
|
65
74
|
--vp-t-transform: 0.3s ease;
|
package/lib/node/defaultTheme.js
CHANGED
|
@@ -47,11 +47,9 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
|
|
|
47
47
|
css: {
|
|
48
48
|
preprocessorOptions: {
|
|
49
49
|
sass: {
|
|
50
|
-
api: 'modern-compiler',
|
|
51
50
|
silenceDeprecations: ['mixed-decls'],
|
|
52
51
|
},
|
|
53
52
|
scss: {
|
|
54
|
-
api: 'modern-compiler',
|
|
55
53
|
silenceDeprecations: ['mixed-decls'],
|
|
56
54
|
},
|
|
57
55
|
},
|
|
@@ -65,7 +63,6 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
|
|
|
65
63
|
...options,
|
|
66
64
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
67
65
|
sassOptions: {
|
|
68
|
-
api: 'modern-compiler',
|
|
69
66
|
silenceDeprecations: ['mixed-decls'],
|
|
70
67
|
...options.sassOptions,
|
|
71
68
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/theme-default",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.45",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -37,27 +37,27 @@
|
|
|
37
37
|
"templates"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@vuepress/helper": "2.0.0-rc.
|
|
41
|
-
"@vuepress/plugin-active-header-links": "2.0.0-rc.
|
|
42
|
-
"@vuepress/plugin-back-to-top": "2.0.0-rc.
|
|
43
|
-
"@vuepress/plugin-copy-code": "2.0.0-rc.
|
|
44
|
-
"@vuepress/plugin-git": "2.0.0-rc.
|
|
45
|
-
"@vuepress/plugin-links-check": "2.0.0-rc.
|
|
40
|
+
"@vuepress/helper": "2.0.0-rc.45",
|
|
41
|
+
"@vuepress/plugin-active-header-links": "2.0.0-rc.44",
|
|
42
|
+
"@vuepress/plugin-back-to-top": "2.0.0-rc.45",
|
|
43
|
+
"@vuepress/plugin-copy-code": "2.0.0-rc.45",
|
|
44
|
+
"@vuepress/plugin-git": "2.0.0-rc.44",
|
|
45
|
+
"@vuepress/plugin-links-check": "2.0.0-rc.45",
|
|
46
46
|
"@vuepress/plugin-markdown-container": "2.0.0-rc.43",
|
|
47
|
-
"@vuepress/plugin-markdown-hint": "2.0.0-rc.
|
|
48
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-rc.
|
|
49
|
-
"@vuepress/plugin-nprogress": "2.0.0-rc.
|
|
50
|
-
"@vuepress/plugin-palette": "2.0.0-rc.
|
|
51
|
-
"@vuepress/plugin-prismjs": "2.0.0-rc.
|
|
52
|
-
"@vuepress/plugin-seo": "2.0.0-rc.
|
|
53
|
-
"@vuepress/plugin-sitemap": "2.0.0-rc.
|
|
54
|
-
"@vuepress/plugin-theme-data": "2.0.0-rc.
|
|
55
|
-
"@vueuse/core": "^11.0
|
|
56
|
-
"vue": "^3.5.
|
|
47
|
+
"@vuepress/plugin-markdown-hint": "2.0.0-rc.45",
|
|
48
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-rc.45",
|
|
49
|
+
"@vuepress/plugin-nprogress": "2.0.0-rc.45",
|
|
50
|
+
"@vuepress/plugin-palette": "2.0.0-rc.45",
|
|
51
|
+
"@vuepress/plugin-prismjs": "2.0.0-rc.45",
|
|
52
|
+
"@vuepress/plugin-seo": "2.0.0-rc.45",
|
|
53
|
+
"@vuepress/plugin-sitemap": "2.0.0-rc.45",
|
|
54
|
+
"@vuepress/plugin-theme-data": "2.0.0-rc.44",
|
|
55
|
+
"@vueuse/core": "^11.1.0",
|
|
56
|
+
"vue": "^3.5.6"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"sass": "^1.
|
|
60
|
-
"sass-embedded": "^1.
|
|
59
|
+
"sass": "^1.79.2",
|
|
60
|
+
"sass-embedded": "^1.79.2",
|
|
61
61
|
"sass-loader": "^16.0.1",
|
|
62
62
|
"vuepress": "2.0.0-rc.15"
|
|
63
63
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "a59c8252483e4549f1d78e12d23e867651303e93"
|
|
79
79
|
}
|