valaxy-theme-yun 0.3.1 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <a class="go-down" aria-label="go-down" href="javascript:window.scrollTo(0, banner.clientHeight);">
2
+ <a class="go-down" aria-label="go-down" href="javascript:window.scrollTo(0, window.banner.clientHeight);">
3
3
  <div i-ri-arrow-down-s-line inline-flex />
4
4
  </a>
5
5
  </template>
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.1",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
3
+ "version": "0.3.4",
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.1"
21
+ "valaxy": "0.3.4"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsup",