valaxy-theme-yun 0.12.3 → 0.12.5

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.
@@ -30,7 +30,7 @@ const footerIcon = computed(() => themeConfig.value.footer.icon || {
30
30
  </a>
31
31
  </div>
32
32
 
33
- <div class="copyright flex justify-center items-center" p="1">
33
+ <div class="copyright flex justify-center items-center gap-2" p="1">
34
34
  <span>
35
35
  &copy;
36
36
  <template v-if="!isThisYear">
@@ -39,7 +39,7 @@ const footerIcon = computed(() => themeConfig.value.footer.icon || {
39
39
  {{ year }}
40
40
  </span>
41
41
 
42
- <a v-if="themeConfig.footer.icon" m="x-2" class="inline-flex animate-pulse" :href="footerIcon.url" target="_blank" :title="footerIcon.title">
42
+ <a v-if="themeConfig.footer.icon?.enable" class="inline-flex animate-pulse" :href="footerIcon.url" target="_blank" :title="footerIcon.title">
43
43
  <div :class="footerIcon.name" />
44
44
  </a>
45
45
  <span>{{ config.author.name }}</span>
@@ -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" 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/node/config.ts CHANGED
@@ -34,6 +34,7 @@ export const defaultThemeConfig: ThemeConfig = {
34
34
  footer: {
35
35
  since: 2022,
36
36
  icon: {
37
+ enable: true,
37
38
  name: 'i-ri-cloud-line',
38
39
  animated: true,
39
40
  color: 'var(--va-c-primary)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
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",
21
+ "@iconify-json/simple-icons": "^1.1.40",
22
22
  "valaxy-addon-waline": "0.0.7"
23
23
  },
24
24
  "devDependencies": {
25
- "valaxy": "0.12.3"
25
+ "valaxy": "0.12.5"
26
26
  }
27
27
  }
package/types/index.d.ts CHANGED
@@ -79,6 +79,7 @@ export interface ThemeConfig {
79
79
  /**
80
80
  * icon name, i-xxx
81
81
  */
82
+ enable: boolean
82
83
  name: string
83
84
  animated: boolean
84
85
  color: string