valaxy-theme-yun 0.13.9 → 0.13.10

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.
@@ -57,24 +57,12 @@ const { icon, styles } = usePostProperty(props.post.type)
57
57
  <!-- always show -->
58
58
  <div w="full" class="yun-card-actions flex justify-between" border="t" text="sm">
59
59
  <div class="inline-flex">
60
- <router-link
61
- :to="{
62
- path: '/categories/',
63
- query: { category: Array.isArray(post.categories) ? post.categories[post.categories.length - 1] : post.categories },
64
- }"
65
- class="post-categories inline-flex justify-center items-center" m="l-2"
66
- >
67
- <div m="x-1" i-ri-folder-2-line />
68
- {{ Array.isArray(post.categories) ? post.categories.join(' > ') : post.categories }}
69
- </router-link>
60
+ <YunPostCategories :categories="post.categories" />
70
61
  </div>
71
62
 
72
63
  <div class="post-tags inline-flex" m="r-2">
73
64
  <template v-if="post.tags">
74
- <router-link v-for="tag, i in post.tags" :key="i" :to="{ path: '/tags/', query: { tag } }" m="x-1" class="post-tag inline-flex justify-center items-center">
75
- <div m="r-1" i-ri-price-tag-3-line />
76
- {{ tag }}
77
- </router-link>
65
+ <YunPostTags :tags="post.tags" />
78
66
  </template>
79
67
  </div>
80
68
  </div>
@@ -0,0 +1,20 @@
1
+ <script lang="ts" setup>
2
+ import type { Post } from 'valaxy'
3
+
4
+ defineProps<{
5
+ categories: Post['categories']
6
+ }>()
7
+ </script>
8
+
9
+ <template>
10
+ <router-link
11
+ :to="{
12
+ path: '/categories/',
13
+ query: { category: Array.isArray(categories) ? categories[categories.length - 1] : categories },
14
+ }"
15
+ class="post-categories inline-flex justify-center items-center" m="l-2"
16
+ >
17
+ <div m="x-1" i-ri-folder-2-line />
18
+ {{ Array.isArray(categories) ? categories.join(' > ') : categories }}
19
+ </router-link>
20
+ </template>
@@ -0,0 +1,17 @@
1
+ <script lang="ts" setup>
2
+ import type { Post } from 'valaxy'
3
+
4
+ defineProps<{
5
+ frontmatter: Post
6
+ }>()
7
+ </script>
8
+
9
+ <template>
10
+ <div class="inline-flex" text="sm" py="1">
11
+ <YunPostCategories :categories="frontmatter.categories" />
12
+ <span v-if="frontmatter.categories && frontmatter.tags" mx="2">-</span>
13
+ <template v-if="frontmatter.tags">
14
+ <YunPostTags :tags="frontmatter.tags" />
15
+ </template>
16
+ </div>
17
+ </template>
@@ -0,0 +1,14 @@
1
+ <script lang="ts" setup>
2
+ import type { Post } from 'valaxy'
3
+
4
+ defineProps<{
5
+ tags: Post['tags']
6
+ }>()
7
+ </script>
8
+
9
+ <template>
10
+ <router-link v-for="tag, i in tags" :key="i" :to="{ path: '/tags/', query: { tag } }" m="x-1" class="post-tag inline-flex justify-center items-center">
11
+ <div m="r-1" i-ri-price-tag-3-line />
12
+ {{ tag }}
13
+ </router-link>
14
+ </template>
package/layouts/post.vue CHANGED
@@ -18,8 +18,8 @@ const showSponsor = computed(() => {
18
18
  <Layout>
19
19
  <template #main-header-after>
20
20
  <YunPostMeta :frontmatter="frontmatter" />
21
-
22
21
  <YunWalineMeta />
22
+ <YunPostCategoriesAndTags :frontmatter="frontmatter" />
23
23
  </template>
24
24
 
25
25
  <template #main-content-after>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.13.9",
3
+ "version": "0.13.10",
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.9"
25
+ "valaxy": "0.13.10"
26
26
  }
27
27
  }