@vuepress/theme-default 2.0.0-rc.37 → 2.0.0-rc.38
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/VPHomeFeatures.vue +1 -1
- package/lib/client/components/VPHomeHero.vue +0 -1
- package/lib/client/components/VPNavbar.vue +0 -2
- package/lib/client/components/VPNavbarDropdown.vue +1 -0
- package/lib/client/components/VPSidebar.vue +1 -1
- package/lib/client/components/VPSidebarItem.vue +0 -2
- package/lib/client/composables/useNavbarSelectLanguage.js +1 -1
- package/lib/client/composables/useRelatedLinks.js +4 -4
- package/lib/client/composables/useSidebarItems.js +1 -1
- package/lib/client/layouts/NotFound.vue +15 -1
- package/lib/client/styles/content/code-notation.scss +4 -0
- package/lib/client/styles/content/code.scss +2 -2
- package/lib/node/defaultTheme.js +14 -1
- package/package.json +15 -15
|
@@ -23,8 +23,8 @@ const features = computed(() => frontmatter.value.features ?? [])
|
|
|
23
23
|
.vp-features {
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-wrap: wrap;
|
|
26
|
-
align-items: flex-start;
|
|
27
26
|
place-content: stretch space-between;
|
|
27
|
+
align-items: flex-start;
|
|
28
28
|
|
|
29
29
|
margin-top: 2.5rem;
|
|
30
30
|
padding: 1.2rem 0;
|
|
@@ -91,7 +91,6 @@ useUpdateDeviceStatus(
|
|
|
91
91
|
z-index: 20;
|
|
92
92
|
|
|
93
93
|
box-sizing: border-box;
|
|
94
|
-
|
|
95
94
|
height: var(--navbar-height);
|
|
96
95
|
padding: var(--navbar-padding-v) var(--navbar-padding-h);
|
|
97
96
|
border-bottom: 1px solid var(--c-border);
|
|
@@ -117,7 +116,6 @@ useUpdateDeviceStatus(
|
|
|
117
116
|
display: flex;
|
|
118
117
|
|
|
119
118
|
box-sizing: border-box;
|
|
120
|
-
|
|
121
119
|
height: var(--navbar-line-height);
|
|
122
120
|
padding-left: var(--navbar-padding-h);
|
|
123
121
|
|
|
@@ -99,7 +99,6 @@ onBeforeUnmount(() => {
|
|
|
99
99
|
|
|
100
100
|
&.vp-sidebar-heading {
|
|
101
101
|
box-sizing: border-box;
|
|
102
|
-
|
|
103
102
|
width: 100%;
|
|
104
103
|
margin: 0;
|
|
105
104
|
padding: 0.35rem 1.5rem 0.35rem 1.25rem;
|
|
@@ -124,7 +123,6 @@ onBeforeUnmount(() => {
|
|
|
124
123
|
display: inline-block;
|
|
125
124
|
|
|
126
125
|
box-sizing: border-box;
|
|
127
|
-
|
|
128
126
|
width: 100%;
|
|
129
127
|
margin: 0;
|
|
130
128
|
padding: 0.35rem 1rem 0.35rem 2rem;
|
|
@@ -49,7 +49,7 @@ export const useNavbarSelectLanguage = () => {
|
|
|
49
49
|
// try to keep current hash and params across languages
|
|
50
50
|
link: routePaths.value.some((item) => item === targetLocalePage)
|
|
51
51
|
? currentFullPath.replace(currentPath, targetLocalePage)
|
|
52
|
-
: targetThemeLocale.home ?? targetLocalePath,
|
|
52
|
+
: (targetThemeLocale.home ?? targetLocalePath),
|
|
53
53
|
};
|
|
54
54
|
}),
|
|
55
55
|
};
|
|
@@ -70,19 +70,19 @@ export const useRelatedLinks = () => {
|
|
|
70
70
|
const prevConfig = resolveFromFrontmatterConfig(frontmatter.value.prev, route.path);
|
|
71
71
|
return prevConfig === false
|
|
72
72
|
? null
|
|
73
|
-
: prevConfig ??
|
|
73
|
+
: (prevConfig ??
|
|
74
74
|
(themeLocale.value.prev === false
|
|
75
75
|
? null
|
|
76
|
-
: resolveFromSidebarItems(sidebarItems.value, route.path, -1));
|
|
76
|
+
: resolveFromSidebarItems(sidebarItems.value, route.path, -1)));
|
|
77
77
|
});
|
|
78
78
|
const nextLink = computed(() => {
|
|
79
79
|
const nextConfig = resolveFromFrontmatterConfig(frontmatter.value.next, route.path);
|
|
80
80
|
return nextConfig === false
|
|
81
81
|
? null
|
|
82
|
-
: nextConfig ??
|
|
82
|
+
: (nextConfig ??
|
|
83
83
|
(themeLocale.value.next === false
|
|
84
84
|
? null
|
|
85
|
-
: resolveFromSidebarItems(sidebarItems.value, route.path, 1));
|
|
85
|
+
: resolveFromSidebarItems(sidebarItems.value, route.path, 1)));
|
|
86
86
|
});
|
|
87
87
|
return {
|
|
88
88
|
prevLink,
|
|
@@ -55,7 +55,7 @@ export const setupSidebarItems = () => {
|
|
|
55
55
|
const headers = useHeaders();
|
|
56
56
|
const sidebarConfig = computed(() => frontmatter.value.home
|
|
57
57
|
? false
|
|
58
|
-
: frontmatter.value.sidebar ?? themeLocale.value.sidebar ?? 'heading');
|
|
58
|
+
: (frontmatter.value.sidebar ?? themeLocale.value.sidebar ?? 'heading'));
|
|
59
59
|
const sidebarItems = computed(() => resolveSidebarItems(sidebarConfig.value, page.value, route.path, routeLocale.value, headers.value));
|
|
60
60
|
provide(sidebarItemsSymbol, sidebarItems);
|
|
61
61
|
};
|
|
@@ -13,7 +13,7 @@ const homeText = themeLocale.value.backToHome ?? 'Back to home'
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
|
-
<div class="theme-container">
|
|
16
|
+
<div class="vp-theme-container">
|
|
17
17
|
<main class="page">
|
|
18
18
|
<div class="theme-default-content">
|
|
19
19
|
<h1>404</h1>
|
|
@@ -25,3 +25,17 @@ const homeText = themeLocale.value.backToHome ?? 'Back to home'
|
|
|
25
25
|
</main>
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
|
+
|
|
29
|
+
<style scoped lang="scss">
|
|
30
|
+
.vp-theme-container {
|
|
31
|
+
max-width: 740px;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
padding: 2rem 2.5rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (max-width: 959px) {
|
|
37
|
+
.vp-theme-container {
|
|
38
|
+
padding: 2rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -112,7 +112,6 @@ pre[class*='language-'] {
|
|
|
112
112
|
display: block;
|
|
113
113
|
|
|
114
114
|
box-sizing: border-box;
|
|
115
|
-
|
|
116
115
|
width: fit-content;
|
|
117
116
|
min-width: 100%;
|
|
118
117
|
padding: 1.3rem 1.5rem;
|
|
@@ -177,6 +176,8 @@ div[class*='language-'] {
|
|
|
177
176
|
}
|
|
178
177
|
|
|
179
178
|
.line-numbers {
|
|
179
|
+
counter-reset: line-number;
|
|
180
|
+
|
|
180
181
|
position: absolute;
|
|
181
182
|
top: 0;
|
|
182
183
|
|
|
@@ -187,7 +188,6 @@ div[class*='language-'] {
|
|
|
187
188
|
|
|
188
189
|
font-size: 0.875em;
|
|
189
190
|
line-height: $line-height;
|
|
190
|
-
counter-reset: line-number;
|
|
191
191
|
text-align: center;
|
|
192
192
|
|
|
193
193
|
.line-number {
|
package/lib/node/defaultTheme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addViteOptimizeDepsExclude } from '@vuepress/helper';
|
|
1
|
+
import { addViteOptimizeDepsExclude, chainWebpack } from '@vuepress/helper';
|
|
2
2
|
import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links';
|
|
3
3
|
import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
|
|
4
4
|
import { copyCodePlugin } from '@vuepress/plugin-copy-code';
|
|
@@ -41,6 +41,19 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
|
|
|
41
41
|
},
|
|
42
42
|
clientConfigFile: path.resolve(__dirname, '../client/config.js'),
|
|
43
43
|
extendsBundlerOptions: (bundlerOptions, app) => {
|
|
44
|
+
chainWebpack(bundlerOptions, app, (config) => {
|
|
45
|
+
config.module
|
|
46
|
+
.rule('scss')
|
|
47
|
+
.use('sass-loader')
|
|
48
|
+
.tap((options) => ({
|
|
49
|
+
api: 'modern-compiler',
|
|
50
|
+
...options,
|
|
51
|
+
sassOptions: {
|
|
52
|
+
silenceDeprecations: ['mixed-decls'],
|
|
53
|
+
...options.sassOptions,
|
|
54
|
+
},
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
44
57
|
addViteOptimizeDepsExclude(bundlerOptions, app, '@theme');
|
|
45
58
|
},
|
|
46
59
|
extendsPage: (page) => {
|
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.38",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -37,23 +37,23 @@
|
|
|
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.38",
|
|
41
|
+
"@vuepress/plugin-active-header-links": "2.0.0-rc.38",
|
|
42
|
+
"@vuepress/plugin-back-to-top": "2.0.0-rc.38",
|
|
43
|
+
"@vuepress/plugin-copy-code": "2.0.0-rc.38",
|
|
44
|
+
"@vuepress/plugin-git": "2.0.0-rc.38",
|
|
45
|
+
"@vuepress/plugin-links-check": "2.0.0-rc.38",
|
|
46
46
|
"@vuepress/plugin-markdown-container": "2.0.0-rc.37",
|
|
47
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-rc.
|
|
48
|
-
"@vuepress/plugin-nprogress": "2.0.0-rc.
|
|
47
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-rc.38",
|
|
48
|
+
"@vuepress/plugin-nprogress": "2.0.0-rc.38",
|
|
49
49
|
"@vuepress/plugin-palette": "2.0.0-rc.37",
|
|
50
50
|
"@vuepress/plugin-prismjs": "2.0.0-rc.37",
|
|
51
|
-
"@vuepress/plugin-seo": "2.0.0-rc.
|
|
52
|
-
"@vuepress/plugin-sitemap": "2.0.0-rc.
|
|
53
|
-
"@vuepress/plugin-theme-data": "2.0.0-rc.
|
|
51
|
+
"@vuepress/plugin-seo": "2.0.0-rc.38",
|
|
52
|
+
"@vuepress/plugin-sitemap": "2.0.0-rc.38",
|
|
53
|
+
"@vuepress/plugin-theme-data": "2.0.0-rc.38",
|
|
54
54
|
"@vueuse/core": "^10.11.0",
|
|
55
|
-
"sass": "^1.77.
|
|
56
|
-
"vue": "^3.4.
|
|
55
|
+
"sass": "^1.77.8",
|
|
56
|
+
"vue": "^3.4.31"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"sass-loader": "^14.0.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "4345344b92c788c8f0c4a78b2cd022bc31ef5108"
|
|
71
71
|
}
|