valaxy-theme-yun 0.13.11 → 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.
- package/components/YunBanner.vue +16 -11
- package/package.json +2 -2
package/components/YunBanner.vue
CHANGED
@@ -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
|
26
|
-
|
27
|
-
|
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="
|
34
|
-
<div class="banner-line
|
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
|
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">
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.13.
|
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.
|
25
|
+
"valaxy": "0.13.12"
|
26
26
|
}
|
27
27
|
}
|