valaxy-theme-yun 0.13.10 → 0.13.12

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.
@@ -5,7 +5,7 @@
5
5
  * @description https://github.com/YunYouJun/hexo-theme-yun
6
6
  */
7
7
 
8
- import { CSSProperties, computed } from 'vue'
8
+ import { CSSProperties, computed, onMounted, ref } from 'vue'
9
9
  import { random } from 'valaxy'
10
10
  import { useThemeConfig } from '../composables'
11
11
 
@@ -22,16 +22,20 @@ const chars = computed(() => {
22
22
  // height of top/bottom line
23
23
  const lineH = computed(() => chars.value.reduce((a, b) => a + b, 0) / 2)
24
24
 
25
- const lineStyle = computed(() => (
26
- {
27
- '--banner-line-height': `calc(var(--app-height, 100vh) / 2 - ${lineH.value}rem)`,
25
+ const bannerStyles = ref()
26
+ onMounted(() => {
27
+ bannerStyles.value = {
28
+ '--banner-height': `${window.innerHeight}px`,
29
+ '--banner-line-height': `calc(var(--banner-height, 100vh) / 2 - ${lineH.value}rem)`,
28
30
  } as CSSProperties
29
- ))
31
+ })
30
32
  </script>
31
33
 
32
34
  <template>
33
- <div id="banner" :style="lineStyle">
34
- <div class="banner-line vertical-line-top" :style="lineStyle" />
35
+ <div id="banner" :style="bannerStyles">
36
+ <div class="banner-line-container">
37
+ <div class="banner-line vertical-line-top" />
38
+ </div>
35
39
  <div class="banner-char-container">
36
40
  <div v-for="c, i in themeConfig.banner.title" :key="i" class="char-box">
37
41
  <span
@@ -45,11 +49,12 @@ const lineStyle = computed(() => (
45
49
  </span>
46
50
  </div>
47
51
  </div>
48
- <div class="banner-line vertical-line-bottom" :style="lineStyle" />
52
+ <div class="banner-line-container bottom">
53
+ <div class="banner-line vertical-line-bottom" />
54
+ </div>
55
+ <YunCloud v-if="themeConfig.banner.cloud?.enable" />
56
+ <YunGoDown />
49
57
  </div>
50
-
51
- <YunGoDown />
52
- <YunCloud v-if="themeConfig.banner.cloud?.enable" />
53
58
  </template>
54
59
 
55
60
  <style lang="scss">
@@ -8,10 +8,8 @@ defineProps<{
8
8
 
9
9
  <template>
10
10
  <div class="inline-flex" text="sm" py="1">
11
- <YunPostCategories :categories="frontmatter.categories" />
11
+ <YunPostCategories v-if="frontmatter.categories" :categories="frontmatter.categories" />
12
12
  <span v-if="frontmatter.categories && frontmatter.tags" mx="2">-</span>
13
- <template v-if="frontmatter.tags">
14
- <YunPostTags :tags="frontmatter.tags" />
15
- </template>
13
+ <YunPostTags v-if="frontmatter.tags" :tags="frontmatter.tags" />
16
14
  </div>
17
15
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.13.10",
3
+ "version": "0.13.12",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -22,6 +22,6 @@
22
22
  "valaxy-addon-waline": "0.0.9"
23
23
  },
24
24
  "devDependencies": {
25
- "valaxy": "0.13.10"
25
+ "valaxy": "0.13.12"
26
26
  }
27
27
  }