@vuepress/theme-default 2.0.0-rc.85 → 2.0.0-rc.87
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/VPPageMeta.vue +19 -13
- package/lib/client/composables/index.d.ts +0 -2
- package/lib/client/composables/index.js +0 -2
- package/lib/node/utils/assignDefaultLocaleOptions.js +0 -1
- package/package.json +19 -19
- package/lib/client/composables/useContributors.d.ts +0 -3
- package/lib/client/composables/useContributors.js +0 -11
- package/lib/client/composables/useLastUpdated.d.ts +0 -2
- package/lib/client/composables/useLastUpdated.js +0 -14
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import VPAutoLink from '@theme/VPAutoLink.vue'
|
|
3
3
|
import VPEditIcon from '@theme/VPEditIcon.vue'
|
|
4
|
-
import { useContributors } from '@theme/useContributors'
|
|
5
4
|
import { useData } from '@theme/useData'
|
|
6
5
|
import { useEditLink } from '@theme/useEditLink'
|
|
7
|
-
import { useLastUpdated } from '@
|
|
6
|
+
import { useContributors, useLastUpdated } from '@vuepress/plugin-git/client'
|
|
8
7
|
|
|
9
|
-
const { themeLocale } = useData()
|
|
8
|
+
const { frontmatter, themeLocale } = useData()
|
|
9
|
+
const contributors = useContributors(
|
|
10
|
+
() =>
|
|
11
|
+
frontmatter.value.contributors ?? themeLocale.value.contributors ?? true,
|
|
12
|
+
)
|
|
10
13
|
const editLink = useEditLink()
|
|
11
|
-
const lastUpdated = useLastUpdated(
|
|
12
|
-
|
|
14
|
+
const lastUpdated = useLastUpdated(
|
|
15
|
+
() => frontmatter.value.lastUpdated ?? themeLocale.value.lastUpdated ?? true,
|
|
16
|
+
)
|
|
13
17
|
</script>
|
|
14
18
|
|
|
15
19
|
<template>
|
|
@@ -24,16 +28,18 @@ const contributors = useContributors()
|
|
|
24
28
|
|
|
25
29
|
<div class="vp-meta-item git-info">
|
|
26
30
|
<div v-if="lastUpdated" class="vp-meta-item last-updated">
|
|
27
|
-
<span class="meta-item-label"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
<span class="meta-item-label"
|
|
32
|
+
>{{ themeLocale.lastUpdatedText ?? lastUpdated.locale }}:
|
|
33
|
+
</span>
|
|
34
|
+
<time
|
|
35
|
+
class="meta-item-info"
|
|
36
|
+
:datetime="lastUpdated.iso"
|
|
37
|
+
data-allow-mismatch
|
|
38
|
+
>{{ lastUpdated.text }}</time
|
|
39
|
+
>
|
|
31
40
|
</div>
|
|
32
41
|
|
|
33
|
-
<div
|
|
34
|
-
v-if="contributors && contributors.length"
|
|
35
|
-
class="vp-meta-item contributors"
|
|
36
|
-
>
|
|
42
|
+
<div v-if="contributors.length" class="vp-meta-item contributors">
|
|
37
43
|
<span class="meta-item-label"
|
|
38
44
|
>{{ themeLocale.contributorsText }}:
|
|
39
45
|
</span>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export * from './useContributors.js';
|
|
2
1
|
export * from './useDarkMode.js';
|
|
3
2
|
export * from './useData.js';
|
|
4
3
|
export * from './useEditLink.js';
|
|
5
|
-
export * from './useLastUpdated.js';
|
|
6
4
|
export * from './useNavigate.js';
|
|
7
5
|
export * from './useNavbarConfig.js';
|
|
8
6
|
export * from './useNavbarRepo.js';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export * from './useContributors.js';
|
|
2
1
|
export * from './useDarkMode.js';
|
|
3
2
|
export * from './useData.js';
|
|
4
3
|
export * from './useEditLink.js';
|
|
5
|
-
export * from './useLastUpdated.js';
|
|
6
4
|
export * from './useNavigate.js';
|
|
7
5
|
export * from './useNavbarConfig.js';
|
|
8
6
|
export * from './useNavbarRepo.js';
|
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.87",
|
|
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.
|
|
46
|
-
"@vuepress/plugin-markdown-hint": "2.0.0-rc.
|
|
47
|
-
"@vuepress/plugin-markdown-tab": "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.
|
|
40
|
+
"@vuepress/helper": "2.0.0-rc.86",
|
|
41
|
+
"@vuepress/plugin-active-header-links": "2.0.0-rc.86",
|
|
42
|
+
"@vuepress/plugin-back-to-top": "2.0.0-rc.86",
|
|
43
|
+
"@vuepress/plugin-copy-code": "2.0.0-rc.86",
|
|
44
|
+
"@vuepress/plugin-git": "2.0.0-rc.87",
|
|
45
|
+
"@vuepress/plugin-links-check": "2.0.0-rc.86",
|
|
46
|
+
"@vuepress/plugin-markdown-hint": "2.0.0-rc.86",
|
|
47
|
+
"@vuepress/plugin-markdown-tab": "2.0.0-rc.86",
|
|
48
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-rc.86",
|
|
49
|
+
"@vuepress/plugin-nprogress": "2.0.0-rc.86",
|
|
50
|
+
"@vuepress/plugin-palette": "2.0.0-rc.86",
|
|
51
|
+
"@vuepress/plugin-prismjs": "2.0.0-rc.86",
|
|
52
|
+
"@vuepress/plugin-seo": "2.0.0-rc.87",
|
|
53
|
+
"@vuepress/plugin-sitemap": "2.0.0-rc.87",
|
|
54
|
+
"@vuepress/plugin-theme-data": "2.0.0-rc.86",
|
|
55
55
|
"@vueuse/core": "^13.0.0",
|
|
56
56
|
"vue": "^3.5.13"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"sass": "^1.
|
|
60
|
-
"sass-embedded": "^1.
|
|
59
|
+
"sass": "^1.86.0",
|
|
60
|
+
"sass-embedded": "^1.86.0",
|
|
61
61
|
"sass-loader": "^16.0.5",
|
|
62
62
|
"vuepress": "2.0.0-rc.20"
|
|
63
63
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "385bacf797c476232d32284e1940285b62a0e255"
|
|
79
79
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useData } from '@theme/useData';
|
|
2
|
-
import { computed } from 'vue';
|
|
3
|
-
export const useContributors = () => {
|
|
4
|
-
const { themeLocale, page, frontmatter } = useData();
|
|
5
|
-
return computed(() => {
|
|
6
|
-
const showContributors = frontmatter.value.contributors ?? themeLocale.value.contributors ?? true;
|
|
7
|
-
if (!showContributors)
|
|
8
|
-
return null;
|
|
9
|
-
return page.value.git?.contributors ?? null;
|
|
10
|
-
});
|
|
11
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useData } from '@theme/useData';
|
|
2
|
-
import { computed } from 'vue';
|
|
3
|
-
export const useLastUpdated = () => {
|
|
4
|
-
const { frontmatter, page, themeLocale } = useData();
|
|
5
|
-
return computed(() => {
|
|
6
|
-
const showLastUpdated = frontmatter.value.lastUpdated ?? themeLocale.value.lastUpdated ?? true;
|
|
7
|
-
if (!showLastUpdated)
|
|
8
|
-
return null;
|
|
9
|
-
if (!page.value.git?.updatedTime)
|
|
10
|
-
return null;
|
|
11
|
-
const updatedDate = new Date(page.value.git.updatedTime);
|
|
12
|
-
return updatedDate.toLocaleString();
|
|
13
|
-
});
|
|
14
|
-
};
|