valaxy-theme-yun 0.28.4 → 0.28.5
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/YunGirls.vue +9 -2
- package/components/YunLinks.vue +29 -2
- package/components/theme/nimbo/YunNimboNavMenu.vue +7 -13
- package/components/theme/strato/YunStratoNavMenu.vue +16 -0
- package/layouts/home.vue +1 -1
- package/package.json +5 -5
- package/styles/css-vars.scss +3 -0
- package/types/index.d.ts +1 -1
package/components/YunGirls.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { GirlType } from '../types'
|
|
3
|
+
import { computed } from 'vue'
|
|
3
4
|
import { useRandomData } from '../composables'
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -8,12 +9,18 @@ const props = defineProps<{
|
|
|
8
9
|
}>()
|
|
9
10
|
|
|
10
11
|
const { data } = useRandomData(props.girls, props.random)
|
|
12
|
+
const isUrlSource = computed(() => typeof props.girls === 'string')
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
<template>
|
|
14
16
|
<div class="girls">
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
+
<ClientOnly v-if="isUrlSource">
|
|
18
|
+
<ul class="girl-items">
|
|
19
|
+
<YunGirlItem v-for="girl, i in data" :key="girl.url" :i="i" :girl="girl" />
|
|
20
|
+
</ul>
|
|
21
|
+
</ClientOnly>
|
|
22
|
+
<ul v-else class="girl-items">
|
|
23
|
+
<YunGirlItem v-for="girl, i in data" :key="girl.url" :i="i" :girl="girl" />
|
|
17
24
|
</ul>
|
|
18
25
|
</div>
|
|
19
26
|
</template>
|
package/components/YunLinks.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { LinkType } from '../types'
|
|
3
|
+
import { computed } from 'vue'
|
|
3
4
|
import { useRandomData } from '../composables'
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
@@ -12,14 +13,40 @@ const props = defineProps<{
|
|
|
12
13
|
}>()
|
|
13
14
|
|
|
14
15
|
const { data } = useRandomData(props.links, props.random)
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* When links source is a URL (string), data is fetched asynchronously on the
|
|
19
|
+
* client side only. During SSG the list is empty, but after hydration the
|
|
20
|
+
* fetched items are injected into the DOM. Wrapping the list in
|
|
21
|
+
* `<ClientOnly>` avoids a hydration-mismatch between the static (empty) HTML
|
|
22
|
+
* and the client-rendered (populated) list, which could cause `replaceChild`
|
|
23
|
+
* errors or the list not appearing at all.
|
|
24
|
+
*
|
|
25
|
+
* For static array data the mismatch risk is lower (SSR and client render
|
|
26
|
+
* the same initial order), so `<ClientOnly>` is not applied.
|
|
27
|
+
*/
|
|
28
|
+
const isUrlSource = computed(() => typeof props.links === 'string')
|
|
15
29
|
</script>
|
|
16
30
|
|
|
17
31
|
<template>
|
|
18
32
|
<div class="yun-links">
|
|
19
|
-
|
|
33
|
+
<!--
|
|
34
|
+
Use ClientOnly when links are fetched from a URL to prevent
|
|
35
|
+
hydration mismatch (SSG renders empty list, client fills it).
|
|
36
|
+
-->
|
|
37
|
+
<ClientOnly v-if="isUrlSource">
|
|
38
|
+
<ul class="yun-link-items" flex="center wrap">
|
|
39
|
+
<YunLinkItem
|
|
40
|
+
v-for="link, i in data"
|
|
41
|
+
:key="link.url"
|
|
42
|
+
:i="i" :link="link" :error-img="errorImg"
|
|
43
|
+
/>
|
|
44
|
+
</ul>
|
|
45
|
+
</ClientOnly>
|
|
46
|
+
<ul v-else class="yun-link-items" flex="center wrap">
|
|
20
47
|
<YunLinkItem
|
|
21
48
|
v-for="link, i in data"
|
|
22
|
-
:key="
|
|
49
|
+
:key="link.url"
|
|
23
50
|
:i="i" :link="link" :error-img="errorImg"
|
|
24
51
|
/>
|
|
25
52
|
</ul>
|
|
@@ -47,7 +47,7 @@ const app = useAppStore()
|
|
|
47
47
|
v-if="showMenu"
|
|
48
48
|
class="yun-nav-menu z-$yun-z-nav-menu fixed bg-transparent"
|
|
49
49
|
:class="{
|
|
50
|
-
play: playAnimation,
|
|
50
|
+
'shadow play': playAnimation,
|
|
51
51
|
}"
|
|
52
52
|
>
|
|
53
53
|
<!-- -->
|
|
@@ -113,7 +113,6 @@ const app = useAppStore()
|
|
|
113
113
|
// safari not support
|
|
114
114
|
// animation-timeline: scroll();
|
|
115
115
|
// animation-range: 0 calc(30vh), exit;
|
|
116
|
-
box-shadow: none;
|
|
117
116
|
display: flex;
|
|
118
117
|
|
|
119
118
|
// top: var(--rect-margin);
|
|
@@ -126,19 +125,14 @@ const app = useAppStore()
|
|
|
126
125
|
align-items: center;
|
|
127
126
|
justify-content: space-between;
|
|
128
127
|
height: var(--yun-nav-height, 50px);
|
|
129
|
-
transition:
|
|
128
|
+
transition: background-color var(--va-transition-duration-moderate) map.get($cubic-bezier, 'ease-in'),
|
|
129
|
+
backdrop-filter var(--va-transition-duration-moderate) map.get($cubic-bezier, 'ease-in'),
|
|
130
|
+
box-shadow var(--va-transition-duration-moderate) map.get($cubic-bezier, 'ease-in');
|
|
130
131
|
|
|
131
132
|
&.play {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
background-color: var(--va-c-bg);
|
|
136
|
-
border-color: rgb(0 0 0 / 0.1);
|
|
137
|
-
|
|
138
|
-
--un-shadow: var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color, rgb(0 0 0 / 0.1)), var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color, rgb(0 0 0 / 0.1));
|
|
139
|
-
|
|
140
|
-
box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow),
|
|
141
|
-
var(--un-shadow);
|
|
133
|
+
background-color: var(--yun-nav-bg-color);
|
|
134
|
+
backdrop-filter: blur(var(--yun-nav-blur));
|
|
135
|
+
-webkit-backdrop-filter: blur(var(--yun-nav-blur));
|
|
142
136
|
}
|
|
143
137
|
|
|
144
138
|
.vt-hamburger-top, .vt-hamburger-middle, .vt-hamburger-bottom {
|
|
@@ -87,3 +87,19 @@ const isHomePage = computed(() => route.meta.layout === 'home')
|
|
|
87
87
|
</div>
|
|
88
88
|
</Transition>
|
|
89
89
|
</template>
|
|
90
|
+
|
|
91
|
+
<style lang="scss" scoped>
|
|
92
|
+
@use 'sass:map';
|
|
93
|
+
@use 'valaxy-theme-yun/styles/vars.scss' as *;
|
|
94
|
+
|
|
95
|
+
.yun-nav-menu {
|
|
96
|
+
height: var(--yun-nav-height, 50px);
|
|
97
|
+
transition: all var(--va-transition-duration-moderate) map.get($cubic-bezier, 'ease-in');
|
|
98
|
+
|
|
99
|
+
&.play {
|
|
100
|
+
background-color: var(--yun-nav-bg-color);
|
|
101
|
+
backdrop-filter: blur(var(--yun-nav-blur));
|
|
102
|
+
-webkit-backdrop-filter: blur(var(--yun-nav-blur));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
package/layouts/home.vue
CHANGED
|
@@ -19,7 +19,7 @@ const showNotice = computed(() => {
|
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
21
|
<YunLayoutWrapper :no-margin="!isPage">
|
|
22
|
-
<div class="w-full flex flex-col items-center pb-
|
|
22
|
+
<div class="w-full flex flex-col items-center pb-4">
|
|
23
23
|
<template v-if="themeConfig.banner?.enable">
|
|
24
24
|
<template v-if="!isPage">
|
|
25
25
|
<div class="w-full">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy-theme-yun",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.28.
|
|
4
|
+
"version": "0.28.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "me@yunyoujun.cn",
|
|
7
7
|
"name": "YunYouJun",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@ctrl/tinycolor": "^4.2.0",
|
|
26
26
|
"@explosions/fireworks": "^0.2.0",
|
|
27
27
|
"@iconify-json/ant-design": "^1.2.5",
|
|
28
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
28
|
+
"@iconify-json/simple-icons": "^1.2.78",
|
|
29
29
|
"@vueuse/motion": "^3.0.3",
|
|
30
30
|
"animejs": "^4.3.6",
|
|
31
|
-
"gsap": "^3.
|
|
32
|
-
"reka-ui": "^2.9.
|
|
31
|
+
"gsap": "^3.15.0",
|
|
32
|
+
"reka-ui": "^2.9.6"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/animejs": "^3.1.13",
|
|
36
36
|
"valaxy-addon-waline": "0.2.1",
|
|
37
|
-
"valaxy": "0.28.
|
|
37
|
+
"valaxy": "0.28.5"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"release": "bumpp && pnpm publish"
|
package/styles/css-vars.scss
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--yun-home-hero-name-background: linear-gradient(120deg, var(--va-c-text) 30%, black);
|
|
10
10
|
--yun-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
|
|
11
11
|
--yun-nav-height: 50px;
|
|
12
|
+
--yun-nav-bg-color: rgb(255 255 255 / 0.8);
|
|
13
|
+
--yun-nav-blur: 12px;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
:root {
|
|
@@ -31,6 +33,7 @@ html.dark {
|
|
|
31
33
|
--va-c-bg: #1a1a1d;
|
|
32
34
|
--va-c-bg-soft: #121215;
|
|
33
35
|
--yun-home-hero-name-background: linear-gradient(120deg, var(--va-c-primary) 30%, #41d1ff);
|
|
36
|
+
--yun-nav-bg-color: rgb(26 26 29 / 0.8);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
// animation
|