valaxy-theme-yun 0.13.0 → 0.13.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/components/ValaxyMain.vue +3 -17
- package/components/YunComment.vue +25 -0
- package/package.json +2 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import type { PageData, Post } from 'valaxy'
|
3
|
-
import { usePostTitle,
|
4
|
-
import { StyleValue, computed
|
3
|
+
import { usePostTitle, useSiteConfig } from 'valaxy'
|
4
|
+
import { StyleValue, computed } from 'vue'
|
5
5
|
import { usePostProperty } from '../composables'
|
6
6
|
|
7
7
|
const props = defineProps<{
|
@@ -9,23 +9,12 @@ const props = defineProps<{
|
|
9
9
|
data?: PageData
|
10
10
|
}>()
|
11
11
|
|
12
|
-
const runtimeConfig = useRuntimeConfig()
|
13
12
|
const siteConfig = useSiteConfig()
|
14
13
|
|
15
14
|
const { styles, icon, color } = usePostProperty(props.frontmatter.type)
|
16
15
|
const title = usePostTitle(computed(() => props.frontmatter))
|
17
16
|
|
18
17
|
const aside = computed(() => props.frontmatter.aside !== false)
|
19
|
-
|
20
|
-
// not import from 'valaxy-addon-waline' to judge
|
21
|
-
const YunWaline = runtimeConfig.value.addons['valaxy-addon-waline']
|
22
|
-
? defineAsyncComponent(() => import('./YunWaline.vue'))
|
23
|
-
: () => null
|
24
|
-
|
25
|
-
// todo: refactor
|
26
|
-
const YunTwikoo = runtimeConfig.value.addons['valaxy-addon-twikoo']
|
27
|
-
? defineAsyncComponent(() => import('./YunTwikoo.vue'))
|
28
|
-
: () => null
|
29
18
|
</script>
|
30
19
|
|
31
20
|
<template>
|
@@ -60,10 +49,7 @@ const YunTwikoo = runtimeConfig.value.addons['valaxy-addon-twikoo']
|
|
60
49
|
<slot name="main-nav-after" />
|
61
50
|
|
62
51
|
<slot v-if="siteConfig.comment.enable && frontmatter.comment !== false" name="comment">
|
63
|
-
<
|
64
|
-
<YunWaline />
|
65
|
-
<YunTwikoo />
|
66
|
-
</YunCard>
|
52
|
+
<YunComment :class="frontmatter.nav === false ? 'mt-4' : 0" />
|
67
53
|
</slot>
|
68
54
|
|
69
55
|
<slot name="main-footer-before" />
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useRuntimeConfig } from 'valaxy'
|
3
|
+
import { defineAsyncComponent } from 'vue'
|
4
|
+
|
5
|
+
const runtimeConfig = useRuntimeConfig()
|
6
|
+
|
7
|
+
// not import from 'valaxy-addon-waline' to judge
|
8
|
+
const YunWaline = runtimeConfig.value.addons['valaxy-addon-waline']
|
9
|
+
? defineAsyncComponent(() => import('./YunWaline.vue'))
|
10
|
+
: () => null
|
11
|
+
|
12
|
+
// todo: refactor
|
13
|
+
const YunTwikoo = runtimeConfig.value.addons['valaxy-addon-twikoo']
|
14
|
+
? defineAsyncComponent(() => import('./YunTwikoo.vue'))
|
15
|
+
: () => null
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<template>
|
19
|
+
<YunCard w="full" p="4" class="comment sm:p-6 lg:px-12 xl:px-16">
|
20
|
+
<ClientOnly>
|
21
|
+
<YunWaline />
|
22
|
+
<YunTwikoo />
|
23
|
+
</ClientOnly>
|
24
|
+
</YunCard>
|
25
|
+
</template>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.13.
|
3
|
+
"version": "0.13.1",
|
4
4
|
"author": {
|
5
5
|
"email": "me@yunyoujun.cn",
|
6
6
|
"name": "YunYouJun",
|
@@ -22,6 +22,6 @@
|
|
22
22
|
"valaxy-addon-waline": "0.0.9"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
|
-
"valaxy": "0.13.
|
25
|
+
"valaxy": "0.13.1"
|
26
26
|
}
|
27
27
|
}
|