valaxy-theme-yun 0.3.1 → 0.3.2

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.
Files changed (2) hide show
  1. package/layouts/post.vue +9 -1
  2. package/package.json +3 -3
package/layouts/post.vue CHANGED
@@ -1,9 +1,17 @@
1
1
  <script lang="ts" setup>
2
+ import { computed } from '@vue/reactivity';
2
3
  import { useConfig, useFrontmatter, useFullUrl } from 'valaxy'
3
4
 
4
5
  const config = useConfig()
5
6
  const frontmatter = useFrontmatter()
6
7
  const url = useFullUrl()
8
+
9
+ const showSponsor = computed(() => {
10
+ if (typeof frontmatter.value.sponsor === 'boolean') {
11
+ return frontmatter.value.sponsor
12
+ }
13
+ return config.value.sponsor.enable
14
+ })
7
15
  </script>
8
16
 
9
17
  <template>
@@ -18,7 +26,7 @@ const url = useFullUrl()
18
26
  <component :is="Component" />
19
27
  </Transition>
20
28
  </router-view>
21
- <YunSponsor v-if="frontmatter.sponsor || config.sponsor.enable" />
29
+ <YunSponsor v-if="showSponsor" />
22
30
  <ValaxyCopyright v-if="frontmatter.copyright || config.license.enabled" :url="url" m="y-4" />
23
31
  </main>
24
32
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  "homepage": "https://valaxy.yyj.moe/",
11
11
  "dependencies": {
12
12
  "@iconify-json/ant-design": "^1.1.1",
13
- "@iconify-json/simple-icons": "^1.1.10"
13
+ "@iconify-json/simple-icons": "^1.1.11"
14
14
  },
15
15
  "author": {
16
16
  "email": "me@yunyoujun.cn",
@@ -18,7 +18,7 @@
18
18
  "url": "https://www.yunyoujun.cn"
19
19
  },
20
20
  "devDependencies": {
21
- "valaxy": "0.3.1"
21
+ "valaxy": "0.3.2"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsup",