valaxy-theme-yun 0.13.7 → 0.13.8
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/ValaxyMain.vue +2 -2
- package/components/YunAside.vue +1 -1
- package/components/YunBanner.vue +6 -5
- package/components/YunBg.vue +24 -11
- package/components/YunCloud.vue +1 -1
- package/components/YunFooter.vue +1 -1
- package/layouts/home.vue +0 -1
- package/package.json +2 -2
- package/styles/common/markdown.scss +4 -0
- package/styles/vars.scss +4 -4
@@ -70,7 +70,7 @@ const aside = computed(() => props.frontmatter.aside !== false)
|
|
70
70
|
<style lang="scss">
|
71
71
|
@use 'valaxy/client/styles/mixins' as *;
|
72
72
|
|
73
|
-
@include
|
73
|
+
@include screen('md') {
|
74
74
|
.yun-main {
|
75
75
|
&.has-sidebar {
|
76
76
|
padding-left: var(--va-sidebar-width);
|
@@ -78,7 +78,7 @@ const aside = computed(() => props.frontmatter.aside !== false)
|
|
78
78
|
}
|
79
79
|
}
|
80
80
|
|
81
|
-
@include
|
81
|
+
@include screen('xl') {
|
82
82
|
.content{
|
83
83
|
// 8px scrollbar width
|
84
84
|
max-width: calc(100vw - 2 * var(--va-sidebar-width) - 1rem - 8px);
|
package/components/YunAside.vue
CHANGED
package/components/YunBanner.vue
CHANGED
@@ -22,16 +22,16 @@ 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
|
25
|
+
const lineStyle = computed(() => (
|
26
26
|
{
|
27
|
-
'--banner-line-height': `calc(
|
27
|
+
'--banner-line-height': `calc(var(--app-height, 100vh) / 2 - ${lineH.value}rem)`,
|
28
28
|
} as CSSProperties
|
29
29
|
))
|
30
30
|
</script>
|
31
31
|
|
32
32
|
<template>
|
33
|
-
<div id="banner">
|
34
|
-
<div class="banner-line vertical-line-top" :style="
|
33
|
+
<div id="banner" :style="lineStyle">
|
34
|
+
<div class="banner-line vertical-line-top" :style="lineStyle" />
|
35
35
|
<div class="banner-char-container">
|
36
36
|
<div v-for="c, i in themeConfig.banner.title" :key="i" class="char-box">
|
37
37
|
<span
|
@@ -45,10 +45,11 @@ const lintStyle = computed(() => (
|
|
45
45
|
</span>
|
46
46
|
</div>
|
47
47
|
</div>
|
48
|
-
<div class="banner-line vertical-line-bottom" :style="
|
48
|
+
<div class="banner-line vertical-line-bottom" :style="lineStyle" />
|
49
49
|
</div>
|
50
50
|
|
51
51
|
<YunGoDown />
|
52
|
+
<YunCloud v-if="themeConfig.banner.cloud?.enable" />
|
52
53
|
</template>
|
53
54
|
|
54
55
|
<style lang="scss">
|
package/components/YunBg.vue
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { computed } from 'vue'
|
2
|
+
import { computed, watch } from 'vue'
|
3
3
|
import { useThemeConfig } from 'valaxy-theme-yun/composables'
|
4
4
|
import { useCssVar } from '@vueuse/core'
|
5
5
|
import { isDark } from 'valaxy'
|
@@ -10,37 +10,50 @@ const bgImgOpacity = useCssVar('--va-bg-img-opacity')
|
|
10
10
|
if (themeConfig.value.bg_image.opacity)
|
11
11
|
bgImgOpacity.value = themeConfig.value.bg_image.opacity.toString() || '1'
|
12
12
|
|
13
|
-
const
|
14
|
-
return
|
15
|
-
|
16
|
-
|
17
|
-
: themeConfig.value.bg_image.url
|
18
|
-
}')`,
|
19
|
-
}
|
13
|
+
const bgImgUrl = computed(() => {
|
14
|
+
return isDark.value
|
15
|
+
? themeConfig.value.bg_image.dark
|
16
|
+
: themeConfig.value.bg_image.url
|
20
17
|
})
|
18
|
+
|
19
|
+
const bgImgCssVar = useCssVar('--va-bg-img')
|
20
|
+
|
21
|
+
watch(() => bgImgUrl.value, () => {
|
22
|
+
bgImgCssVar.value = `url('${bgImgUrl.value}')`
|
23
|
+
}, { immediate: true })
|
21
24
|
</script>
|
22
25
|
|
23
26
|
<template>
|
24
|
-
<div class="va-bg"
|
27
|
+
<div class="va-bg" />
|
25
28
|
</template>
|
26
29
|
|
27
30
|
<style lang="scss">
|
31
|
+
@use 'valaxy/client/styles/mixins' as *;
|
32
|
+
|
28
33
|
.va-bg {
|
29
34
|
position: fixed;
|
30
35
|
width: 100%;
|
31
36
|
height: 100%;
|
32
37
|
z-index: -1;
|
33
|
-
|
38
|
+
|
39
|
+
background-image: var(--va-bg-img);
|
34
40
|
background-size: cover;
|
35
41
|
background-position: center;
|
36
42
|
background-repeat: no-repeat;
|
37
|
-
// avoid flicker
|
43
|
+
// avoid scroll flicker but not compatible with ios
|
38
44
|
background-attachment: fixed;
|
39
45
|
animation-name: bgFadeIn;
|
40
46
|
animation-duration: 2s;
|
41
47
|
opacity: var(--va-bg-img-opacity, 1);
|
42
48
|
}
|
43
49
|
|
50
|
+
// for ios
|
51
|
+
@include ios {
|
52
|
+
.va-bg {
|
53
|
+
background-attachment: scroll;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
44
57
|
@keyframes bgFadeIn {
|
45
58
|
from {
|
46
59
|
opacity: 0;
|
package/components/YunCloud.vue
CHANGED
package/components/YunFooter.vue
CHANGED
@@ -47,7 +47,7 @@ const footerIcon = computed(() => themeConfig.value.footer.icon || {
|
|
47
47
|
</div>
|
48
48
|
|
49
49
|
<div v-if="themeConfig.footer.powered" class="powered" m="2">
|
50
|
-
<span v-html="poweredHtml" /> | <span>{{ t('footer.theme') }} - <a :href="themeConfig.pkg.
|
50
|
+
<span v-html="poweredHtml" /> | <span>{{ t('footer.theme') }} - <a :href="themeConfig.pkg.repository.url" :title="themeConfig.pkg.name" target="_blank">{{ capitalize(config.theme) }}</a> v{{ themeConfig.pkg.version }}</span>
|
51
51
|
</div>
|
52
52
|
|
53
53
|
<slot />
|
package/layouts/home.vue
CHANGED
@@ -17,7 +17,6 @@ const themeConfig = useThemeConfig()
|
|
17
17
|
|
18
18
|
<YunBanner />
|
19
19
|
<YunSay v-if="themeConfig.say.enable" w="full" />
|
20
|
-
<YunCloud v-if="themeConfig.banner.cloud?.enable" />
|
21
20
|
<YunNotice
|
22
21
|
v-if="themeConfig.notice.enable"
|
23
22
|
:content="themeConfig.notice.content" mt="4"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.13.
|
3
|
+
"version": "0.13.8",
|
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.8"
|
26
26
|
}
|
27
27
|
}
|
package/styles/vars.scss
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
$light: () !default;
|
5
5
|
$light: map.merge(
|
6
6
|
(
|
7
|
-
"bg-
|
7
|
+
"bg-img":
|
8
8
|
url("https://cdn.yunyoujun.cn/img/bg/stars-timing-0-blur-30px.jpg"),
|
9
9
|
"sidebar-bg-color": var(--va-c-bg-light),
|
10
|
-
"sidebar-bg-
|
10
|
+
"sidebar-bg-img":
|
11
11
|
url("https://cdn.yunyoujun.cn/img/bg/alpha-stars-timing-1.webp"),
|
12
12
|
),
|
13
13
|
$light
|
@@ -16,8 +16,8 @@ $light: map.merge(
|
|
16
16
|
$dark: () !default;
|
17
17
|
$dark: map.merge(
|
18
18
|
(
|
19
|
-
"bg-
|
20
|
-
"sidebar-bg-
|
19
|
+
"bg-img": none,
|
20
|
+
"sidebar-bg-img": none,
|
21
21
|
),
|
22
22
|
$dark
|
23
23
|
);
|