valaxy-theme-yun 0.12.4 → 0.12.6

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.
@@ -27,11 +27,11 @@ const { icon, styles } = usePostProperty(props.post.type)
27
27
 
28
28
  <div class="flex flex-col flex-1 items-center" :class="post.cover && 'max-h-54'" w="full">
29
29
  <AppLink
30
- class="post-title-link"
30
+ class="post-title-link cursor-pointer"
31
31
  :to="post.path || ''"
32
32
  m="t-3"
33
33
  >
34
- <div class="flex justify-center items-center title text-2xl" text="center" font="serif black">
34
+ <div class="flex-center title text-2xl" text="center" font="serif black">
35
35
  <div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />{{ post.title }}
36
36
  </div>
37
37
  </AppLink>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { Post } from 'valaxy'
3
- import { useI18n } from 'vue-i18n'
4
3
  import { formatDate } from 'valaxy'
4
+ import { useI18n } from 'vue-i18n'
5
5
 
6
6
  defineProps<{
7
7
  frontmatter: Post
@@ -18,16 +18,21 @@ const { t } = useI18n()
18
18
  <div i-ri-pushpin-line />
19
19
  </div>
20
20
 
21
- <div v-if="frontmatter" class="post-meta justify-center" flex="~" text="sm">
21
+ <div v-if="frontmatter" class="post-meta justify-center" flex="~" text="sm" py="1">
22
22
  <div v-if="frontmatter.date" class="post-time flex items-center">
23
- <div class="inline-block" i-ri-calendar-line />
24
- <time m="l-1" :title="t('post.posted')">{{ formatDate(frontmatter.date) }}</time>
25
-
26
- <template v-if="frontmatter.updated && frontmatter.updated !== frontmatter.date">
23
+ <span class="inline-flex-center" :title="t('post.posted')">
24
+ <div class="inline-block" i-ri-calendar-line />
25
+ <time m="l-1">{{ formatDate(frontmatter.date) }}</time>
26
+ </span>
27
+
28
+ <span
29
+ v-if="frontmatter.updated && frontmatter.updated !== frontmatter.date"
30
+ class="inline-flex-center" :title="t('post.edited')"
31
+ >
27
32
  <span m="x-2">-</span>
28
33
  <div i-ri-calendar-2-line />
29
- <time m="l-1" :title="t('post.edited')">{{ formatDate(frontmatter.updated) }}</time>
30
- </template>
34
+ <time m="l-1">{{ formatDate(frontmatter.updated) }}</time>
35
+ </span>
31
36
  </div>
32
37
  </div>
33
38
 
@@ -0,0 +1,27 @@
1
+ <script lang="ts" setup>
2
+ import { useConfig } from 'valaxy'
3
+ import { computed } from 'vue'
4
+ import { useRoute } from 'vue-router'
5
+
6
+ import { useI18n } from 'vue-i18n'
7
+
8
+ const route = useRoute()
9
+ const config = useConfig()
10
+
11
+ const addonWaline = computed(() => config.value.runtime.addons['valaxy-addon-waline'])
12
+
13
+ const { t } = useI18n()
14
+ </script>
15
+
16
+ <template>
17
+ <div v-if="addonWaline && addonWaline.options" flex="~" text="sm" py="1">
18
+ <div v-if="addonWaline.options.pageview" inline-flex justify="center" items="center" mx="2" :title="t('post.pageview_count')">
19
+ <div inline-flex i-ri-eye-line />
20
+ <span ml-1 inline-flex class="waline-pageview-count" :data-path="route.path" />
21
+ </div>
22
+ <div v-if="addonWaline.options.comment" inline-flex justify="center" items="center" mx="2" :title="t('post.comment_count')">
23
+ <div inline-flex i-ri-chat-4-line />
24
+ <span ml-1 inline-flex class="waline-comment-count" :data-path="route.path" />
25
+ </div>
26
+ </div>
27
+ </template>
package/layouts/post.vue CHANGED
@@ -18,6 +18,8 @@ const showSponsor = computed(() => {
18
18
  <Layout>
19
19
  <template #main-header-after>
20
20
  <YunPostMeta :frontmatter="frontmatter" />
21
+
22
+ <YunWalineMeta />
21
23
  </template>
22
24
 
23
25
  <template #main-content-after>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -18,10 +18,10 @@
18
18
  "types": "types/index.d.ts",
19
19
  "dependencies": {
20
20
  "@iconify-json/ant-design": "^1.1.4",
21
- "@iconify-json/simple-icons": "^1.1.37",
22
- "valaxy-addon-waline": "0.0.7"
21
+ "@iconify-json/simple-icons": "^1.1.40",
22
+ "valaxy-addon-waline": "0.0.8"
23
23
  },
24
24
  "devDependencies": {
25
- "valaxy": "0.12.4"
25
+ "valaxy": "0.12.6"
26
26
  }
27
27
  }