valaxy-theme-yun 0.3.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
package/layouts/post.vue CHANGED
@@ -1,9 +1,17 @@
1
1
  <script lang="ts" setup>
2
+ import { computed } from 'vue'
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,24 +1,24 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.3.0",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
3
+ "version": "0.3.3",
4
+ "author": {
5
+ "email": "me@yunyoujun.cn",
6
+ "name": "YunYouJun",
7
+ "url": "https://www.yunyoujun.cn"
8
+ },
6
9
  "repository": {
7
10
  "type": "git",
8
11
  "url": "https://github.com/YunYouJun/valaxy/tree/main/packages/valaxy-theme-yun"
9
12
  },
13
+ "main": "dist/index.js",
14
+ "types": "dist/index.d.ts",
10
15
  "homepage": "https://valaxy.yyj.moe/",
11
16
  "dependencies": {
12
17
  "@iconify-json/ant-design": "^1.1.1",
13
- "@iconify-json/simple-icons": "^1.1.10"
14
- },
15
- "author": {
16
- "email": "me@yunyoujun.cn",
17
- "name": "YunYouJun",
18
- "url": "https://www.yunyoujun.cn"
18
+ "@iconify-json/simple-icons": "^1.1.11"
19
19
  },
20
20
  "devDependencies": {
21
- "valaxy": "0.3.0"
21
+ "valaxy": "0.3.3"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsup",
@@ -62,7 +62,7 @@
62
62
 
63
63
  .post-link-btn,
64
64
  .markdown-body .post-link-btn {
65
- background-color: var(--card-c-primary);
65
+ background-color: #111;
66
66
  line-height: 1.2;
67
67
  padding: 0.5rem 1rem;
68
68
  color: white;