valaxy-theme-yun 1.2.2 → 1.3.0
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/App.vue +21 -9
- package/client/components/YunArtalk.vue +12 -0
- package/client/components/YunFireworks.vue +29 -0
- package/client/components/YunFuseSearch.vue +418 -0
- package/client/components/YunTwikoo.vue +14 -0
- package/client/components/YunWaline.vue +17 -0
- package/components/YunBanner.vue +12 -3
- package/components/YunCloud.vue +14 -1
- package/components/YunFireworks.vue +4 -27
- package/components/YunFuseSearch.vue +4 -476
- package/components/YunPostCategories.vue +6 -3
- package/components/YunPostDateMeta.vue +26 -9
- package/components/YunSearchTrigger.vue +8 -2
- package/components/author/YunAuthorAvatar.vue +2 -0
- package/components/collection/YunCollectionCard.vue +6 -18
- package/components/menu/YunNavMenuItem.vue +4 -1
- package/components/prologue/YunPrologueSquare.vue +41 -88
- package/components/theme/nimbo/YunNimboNavMenu.vue +56 -79
- package/components/theme/strato/YunStratoNavMenu.vue +25 -46
- package/components/third/YunArtalk.vue +4 -10
- package/components/third/YunTwikoo.vue +4 -12
- package/components/third/YunWaline.vue +4 -15
- package/layouts/home.vue +45 -23
- package/layouts/post.vue +14 -5
- package/package.json +2 -2
- package/stores/app.ts +3 -3
- package/styles/common/nav.scss +3 -3
- package/styles/index.ts +1 -0
- package/styles/widgets/search.scss +57 -0
- package/utils/animation.ts +4 -8
- package/utils/scroll.ts +7 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
defineProps<{
|
|
3
3
|
icon: string
|
|
4
|
+
label?: string
|
|
4
5
|
to?: string
|
|
5
6
|
}>()
|
|
6
7
|
</script>
|
|
@@ -11,7 +12,9 @@ defineProps<{
|
|
|
11
12
|
hover="bg-white/80 dark:bg-black/80 op-100"
|
|
12
13
|
op-80
|
|
13
14
|
:to="to"
|
|
15
|
+
:aria-label="label"
|
|
16
|
+
:title="label"
|
|
14
17
|
>
|
|
15
|
-
<div class="size-6" :class="icon" />
|
|
18
|
+
<div class="size-6" :class="icon" aria-hidden="true" />
|
|
16
19
|
</AppLink>
|
|
17
20
|
</template>
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed
|
|
2
|
+
import { computed } from 'vue'
|
|
3
3
|
|
|
4
4
|
import { useThemeConfig } from '../../composables'
|
|
5
5
|
|
|
6
|
+
const props = withDefaults(defineProps<{
|
|
7
|
+
introComplete?: boolean
|
|
8
|
+
}>(), {
|
|
9
|
+
introComplete: true,
|
|
10
|
+
})
|
|
11
|
+
|
|
6
12
|
const themeConfig = useThemeConfig()
|
|
7
13
|
|
|
8
|
-
const showContent = ref(false)
|
|
9
14
|
const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
10
15
|
</script>
|
|
11
16
|
|
|
@@ -13,54 +18,33 @@ const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
|
13
18
|
<div
|
|
14
19
|
flex="~ col"
|
|
15
20
|
class="yun-square-container items-center justify-center text-center max-w-2xl"
|
|
16
|
-
:class="{ 'is-grouped': grouped }"
|
|
21
|
+
:class="{ 'is-grouped': grouped, 'is-intro-complete': props.introComplete }"
|
|
17
22
|
>
|
|
18
23
|
<slot />
|
|
19
24
|
|
|
20
25
|
<div
|
|
21
26
|
flex="~ col center"
|
|
22
|
-
class="info-with-avatar relative
|
|
23
|
-
:class="{
|
|
24
|
-
show: showContent,
|
|
25
|
-
}"
|
|
27
|
+
class="info-with-avatar relative"
|
|
26
28
|
>
|
|
27
|
-
<Transition
|
|
28
|
-
enter-from-class="enter-from"
|
|
29
|
-
enter-to-class="enter-to"
|
|
30
|
-
appear
|
|
31
|
-
@after-appear="showContent = true"
|
|
32
|
-
>
|
|
33
|
-
<div
|
|
34
|
-
flex="~ col"
|
|
35
|
-
class="yun-square square-rotate z-1"
|
|
36
|
-
>
|
|
37
|
-
<LineBurstEffects
|
|
38
|
-
class="size-full"
|
|
39
|
-
:delay="200"
|
|
40
|
-
:duration="500"
|
|
41
|
-
/>
|
|
42
|
-
<Transition
|
|
43
|
-
enter-from-class="op-0"
|
|
44
|
-
enter-to-class="op-100"
|
|
45
|
-
enter-active-class="transition-400 delay-200"
|
|
46
|
-
appear
|
|
47
|
-
>
|
|
48
|
-
<YunAuthorAvatar />
|
|
49
|
-
</Transition>
|
|
50
|
-
</div>
|
|
51
|
-
</Transition>
|
|
52
|
-
|
|
53
29
|
<div
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
show: showContent,
|
|
57
|
-
}"
|
|
30
|
+
flex="~ col"
|
|
31
|
+
class="yun-square square-rotate z-1"
|
|
58
32
|
>
|
|
33
|
+
<LineBurstEffects
|
|
34
|
+
v-if="props.introComplete"
|
|
35
|
+
class="size-full"
|
|
36
|
+
:delay="200"
|
|
37
|
+
:duration="500"
|
|
38
|
+
/>
|
|
39
|
+
<YunAuthorAvatar />
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="info">
|
|
59
43
|
<YunAuthorName class="mt-3" />
|
|
60
44
|
<YunAuthorIntro />
|
|
61
45
|
|
|
62
46
|
<div :class="grouped ? 'prologue-divider' : 'py-4 md:py-5 lg:pt-6'">
|
|
63
|
-
<YunAnimLineDraw :active="
|
|
47
|
+
<YunAnimLineDraw :active="props.introComplete" />
|
|
64
48
|
</div>
|
|
65
49
|
<div
|
|
66
50
|
flex="~ col"
|
|
@@ -71,7 +55,7 @@ const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
|
71
55
|
<YunSiteDescription />
|
|
72
56
|
</div>
|
|
73
57
|
<div class="scale-x--100" :class="grouped ? 'prologue-divider' : 'py-4 md:py-5 lg:pb-6'">
|
|
74
|
-
<YunAnimLineDraw :active="
|
|
58
|
+
<YunAnimLineDraw :active="props.introComplete" />
|
|
75
59
|
</div>
|
|
76
60
|
|
|
77
61
|
<YunSocialLinks class="prologue-social" />
|
|
@@ -90,61 +74,50 @@ const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
|
90
74
|
.yun-square {
|
|
91
75
|
--yun-avatar-burst-color: color-mix(in srgb, var(--va-c-primary) 65%, var(--va-c-text));
|
|
92
76
|
|
|
77
|
+
position: relative;
|
|
93
78
|
background: var(--va-c-bg-soft);
|
|
94
|
-
transition: opacity 640ms var(--yun-reveal-ease), transform 640ms var(--yun-reveal-ease);
|
|
95
79
|
border-radius: 50%;
|
|
96
|
-
transform: rotate(0deg) translateY(0%);
|
|
97
80
|
width: var(--avatar-size);
|
|
98
81
|
height: var(--avatar-size);
|
|
99
82
|
box-shadow: 0 5px 100px rgb(0 0 0 / 0.15);
|
|
100
|
-
|
|
101
|
-
&.enter-from {
|
|
102
|
-
opacity: 0;
|
|
103
|
-
|
|
104
|
-
// width: var(--total-char-height);
|
|
105
|
-
// height: var(--total-char-height);
|
|
106
|
-
transform: translateY(20px) rotate(-6deg);
|
|
107
|
-
box-shadow: none;
|
|
108
|
-
}
|
|
109
83
|
}
|
|
110
84
|
|
|
111
85
|
.yun-square-container {
|
|
112
86
|
--avatar-size: 100px;
|
|
113
87
|
--yun-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
114
88
|
|
|
115
|
-
.info
|
|
89
|
+
.info {
|
|
116
90
|
position: relative;
|
|
117
|
-
|
|
118
|
-
&.show {
|
|
119
|
-
// transform: translateY(-50%);
|
|
120
|
-
}
|
|
121
91
|
}
|
|
92
|
+
}
|
|
122
93
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
94
|
+
@media (width > 768px) {
|
|
95
|
+
.yun-square-container {
|
|
96
|
+
.yun-square {
|
|
97
|
+
transition: opacity 640ms var(--yun-reveal-ease), transform 640ms var(--yun-reveal-ease);
|
|
98
|
+
}
|
|
126
99
|
|
|
127
|
-
> * {
|
|
128
|
-
opacity: 0;
|
|
129
|
-
transform: translateY(18px);
|
|
100
|
+
.info > * {
|
|
130
101
|
transition: opacity 640ms var(--yun-reveal-ease), transform 720ms var(--yun-reveal-ease);
|
|
131
|
-
transition-delay: var(--yun-reveal-delay, 0ms);
|
|
102
|
+
transition-delay: calc(300ms + var(--yun-reveal-delay, 0ms));
|
|
132
103
|
}
|
|
133
104
|
|
|
134
105
|
.prologue-introduction { --yun-reveal-delay: 70ms; }
|
|
135
106
|
.prologue-social { --yun-reveal-delay: 140ms; }
|
|
136
107
|
.prologue-navigation { --yun-reveal-delay: 210ms; }
|
|
137
108
|
|
|
138
|
-
|
|
139
|
-
|
|
109
|
+
&:not(.is-intro-complete) {
|
|
110
|
+
.yun-square {
|
|
111
|
+
opacity: 0;
|
|
112
|
+
transform: translateY(20px) rotate(-6deg);
|
|
113
|
+
}
|
|
140
114
|
|
|
141
|
-
> * {
|
|
142
|
-
opacity:
|
|
143
|
-
transform:
|
|
115
|
+
.info > * {
|
|
116
|
+
opacity: 0;
|
|
117
|
+
transform: translateY(18px);
|
|
144
118
|
}
|
|
145
119
|
}
|
|
146
120
|
}
|
|
147
|
-
|
|
148
121
|
}
|
|
149
122
|
|
|
150
123
|
.yun-square-container.is-grouped {
|
|
@@ -160,24 +133,4 @@ const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
|
160
133
|
margin-top: 32px;
|
|
161
134
|
}
|
|
162
135
|
}
|
|
163
|
-
|
|
164
|
-
@media (prefers-reduced-motion: reduce) {
|
|
165
|
-
.yun-square,
|
|
166
|
-
.yun-square.enter-from {
|
|
167
|
-
transform: none;
|
|
168
|
-
border-radius: 50%;
|
|
169
|
-
transition: opacity 150ms ease;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.yun-square :deep(.yun-author-avatar) {
|
|
173
|
-
transition-delay: 0ms;
|
|
174
|
-
transition-duration: 150ms;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.info-with-avatar,
|
|
178
|
-
.yun-square-container .info > * {
|
|
179
|
-
transform: none;
|
|
180
|
-
transition: opacity 150ms ease;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
136
|
</style>
|
|
@@ -1,108 +1,85 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useAppStore, useSiteConfig, useValaxyI18n } from 'valaxy'
|
|
3
|
-
import {
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { useI18n } from 'vue-i18n'
|
|
4
5
|
import { useRoute } from 'vue-router'
|
|
5
6
|
import { useThemeConfig } from '../../../composables'
|
|
6
7
|
import { useYunAppStore } from '../../../stores'
|
|
7
8
|
|
|
8
9
|
const { $t } = useValaxyI18n()
|
|
10
|
+
const { t } = useI18n()
|
|
9
11
|
|
|
10
12
|
// const app = useAppStore()
|
|
11
13
|
const yunApp = useYunAppStore()
|
|
12
14
|
const siteConfig = useSiteConfig()
|
|
13
15
|
const themeConfig = useThemeConfig()
|
|
14
16
|
|
|
15
|
-
// Always render the menu to avoid SSG hydration mismatch.
|
|
16
|
-
// On home page, the fade-in animation is applied after mount.
|
|
17
|
-
const showMenu = ref(true)
|
|
18
17
|
const route = useRoute()
|
|
19
|
-
|
|
20
|
-
// During client-side navigation to home, re-trigger the fade-in
|
|
21
|
-
onMounted(() => {
|
|
22
|
-
if (route.meta.layout === 'home') {
|
|
23
|
-
showMenu.value = false
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
showMenu.value = true
|
|
26
|
-
}, 600)
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const playAnimation = ref(false)
|
|
32
|
-
watch(() => yunApp.scrollY, () => {
|
|
33
|
-
if (yunApp.scrollY > 10)
|
|
34
|
-
playAnimation.value = true
|
|
35
|
-
else
|
|
36
|
-
playAnimation.value = false
|
|
37
|
-
})
|
|
18
|
+
const playAnimation = computed(() => yunApp.scrollY > 10)
|
|
38
19
|
|
|
39
20
|
const app = useAppStore()
|
|
40
21
|
</script>
|
|
41
22
|
|
|
42
23
|
<template>
|
|
43
|
-
<
|
|
44
|
-
|
|
24
|
+
<div
|
|
25
|
+
class="yun-nav-menu z-$yun-z-nav-menu fixed bg-transparent"
|
|
26
|
+
:class="{
|
|
27
|
+
'is-home-nav': route.meta.layout === 'home',
|
|
28
|
+
'shadow play': playAnimation,
|
|
29
|
+
'is-glass': themeConfig.navbar?.glass === 'always',
|
|
30
|
+
}"
|
|
45
31
|
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
32
|
+
<!-- -->
|
|
33
|
+
<div class="inline-flex justify-start items-center flex-1">
|
|
34
|
+
<ValaxyHamburger
|
|
35
|
+
:active="yunApp.fullscreenMenu.isOpen"
|
|
36
|
+
class="menu-btn sidebar-toggle leading-4 size-12 lg:hidden!"
|
|
37
|
+
inline-flex cursor="pointer"
|
|
38
|
+
hover="bg-white/80 dark:bg-black/80"
|
|
39
|
+
z="$yun-z-menu-btn"
|
|
40
|
+
@click="yunApp.fullscreenMenu.toggle()"
|
|
41
|
+
/>
|
|
42
|
+
<YunNavMenuItem icon="i-ri-home-4-line" to="/" :label="t('menu.home')" />
|
|
43
|
+
<div class="hidden lg:contents">
|
|
44
|
+
<YunNavMenuItem
|
|
45
|
+
v-for="item, i in themeConfig.nav"
|
|
46
|
+
:key="i"
|
|
47
|
+
:icon="item.icon"
|
|
48
|
+
:to="item.link"
|
|
49
|
+
:label="$t(item.text)"
|
|
63
50
|
/>
|
|
64
|
-
<YunNavMenuItem icon="i-ri-home-4-line" to="/" />
|
|
65
|
-
<div class="hidden lg:contents">
|
|
66
|
-
<YunNavMenuItem
|
|
67
|
-
v-for="item, i in themeConfig.nav"
|
|
68
|
-
:key="i"
|
|
69
|
-
:icon="item.icon"
|
|
70
|
-
:to="item.link"
|
|
71
|
-
:title="$t(item.text)"
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
51
|
</div>
|
|
52
|
+
</div>
|
|
75
53
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
<div class="flex flex-1 flex-center">
|
|
55
|
+
<YunNavMenuTitle />
|
|
56
|
+
</div>
|
|
79
57
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
58
|
+
<div class="inline-flex-center justify-end items-center flex-1">
|
|
59
|
+
<!-- <template v-if="!app.isMobile && themeConfig.nav">
|
|
60
|
+
<template v-for="item in themeConfig.nav" :key="item.text">
|
|
61
|
+
<AppLink
|
|
62
|
+
v-if="'link' in item"
|
|
63
|
+
:to="item.link"
|
|
64
|
+
class="menu-btn inline-flex-center p-2 transition text-$va-c-text"
|
|
65
|
+
inline-flex cursor="pointer"
|
|
66
|
+
hover="bg-white/80 dark:bg-black/80"
|
|
67
|
+
z="$yun-z-menu-btn"
|
|
68
|
+
>
|
|
69
|
+
{{ item.text }}
|
|
70
|
+
</AppLink>
|
|
71
|
+
<template v-else-if="'items' in item" />
|
|
72
|
+
</template>
|
|
73
|
+
</template> -->
|
|
96
74
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</div>
|
|
75
|
+
<YunToggleLocale
|
|
76
|
+
v-if="app.showToggleLocale"
|
|
77
|
+
class="rounded-none! hidden sm:inline-flex"
|
|
78
|
+
/>
|
|
79
|
+
<YunToggleDark class="rounded-none!" transition />
|
|
80
|
+
<YunSearchTrigger v-if="siteConfig.search.enable" />
|
|
104
81
|
</div>
|
|
105
|
-
</
|
|
82
|
+
</div>
|
|
106
83
|
</template>
|
|
107
84
|
|
|
108
85
|
<style lang="scss" scoped>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useAppStore, useSiteConfig } from 'valaxy'
|
|
3
|
-
import { computed
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { useI18n } from 'vue-i18n'
|
|
4
5
|
import { useRoute } from 'vue-router'
|
|
5
6
|
import { useThemeConfig } from '../../../composables'
|
|
6
7
|
import { useYunAppStore } from '../../../stores'
|
|
@@ -9,28 +10,10 @@ import { useYunAppStore } from '../../../stores'
|
|
|
9
10
|
const yunApp = useYunAppStore()
|
|
10
11
|
const siteConfig = useSiteConfig()
|
|
11
12
|
const themeConfig = useThemeConfig()
|
|
13
|
+
const { t } = useI18n()
|
|
12
14
|
|
|
13
|
-
// Always render the menu to avoid SSG hydration mismatch.
|
|
14
|
-
const showMenu = ref(true)
|
|
15
15
|
const route = useRoute()
|
|
16
|
-
|
|
17
|
-
onMounted(() => {
|
|
18
|
-
if (route.meta.layout === 'home') {
|
|
19
|
-
showMenu.value = false
|
|
20
|
-
setTimeout(() => {
|
|
21
|
-
showMenu.value = true
|
|
22
|
-
}, 600)
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const playAnimation = ref(false)
|
|
28
|
-
watch(() => yunApp.scrollY, () => {
|
|
29
|
-
if (yunApp.scrollY > 10)
|
|
30
|
-
playAnimation.value = true
|
|
31
|
-
else
|
|
32
|
-
playAnimation.value = false
|
|
33
|
-
})
|
|
16
|
+
const playAnimation = computed(() => yunApp.scrollY > 10)
|
|
34
17
|
|
|
35
18
|
const app = useAppStore()
|
|
36
19
|
|
|
@@ -55,38 +38,34 @@ const isHomePage = computed(() => route.meta.layout === 'home')
|
|
|
55
38
|
hover="bg-white/80 dark:bg-black/80"
|
|
56
39
|
@click="yunApp.leftSidebar.toggle()"
|
|
57
40
|
/>
|
|
58
|
-
<YunNavMenuItem class="hidden md:inline-flex" icon="i-ri-home-4-line" to="/" />
|
|
41
|
+
<YunNavMenuItem class="hidden md:inline-flex" icon="i-ri-home-4-line" to="/" :label="t('menu.home')" />
|
|
59
42
|
</template>
|
|
60
43
|
</div>
|
|
61
44
|
|
|
62
|
-
<
|
|
63
|
-
|
|
45
|
+
<div
|
|
46
|
+
class="yun-nav-menu z-$yun-z-nav-menu fixed w-full flex justify-between items-center top-0"
|
|
47
|
+
:class="{
|
|
48
|
+
'is-home-nav': isHomePage,
|
|
49
|
+
'play': playAnimation,
|
|
50
|
+
'is-glass': themeConfig.navbar?.glass === 'always',
|
|
51
|
+
}"
|
|
64
52
|
>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class="yun-nav-menu z-$yun-z-nav-menu fixed w-full flex justify-between items-center top-0"
|
|
68
|
-
:class="{
|
|
69
|
-
'play': playAnimation,
|
|
70
|
-
'is-glass': themeConfig.navbar?.glass === 'always',
|
|
71
|
-
}"
|
|
72
|
-
>
|
|
73
|
-
<!-- -->
|
|
74
|
-
<div class="inline-flex justify-start items-center flex-1" />
|
|
53
|
+
<!-- -->
|
|
54
|
+
<div class="inline-flex justify-start items-center flex-1" />
|
|
75
55
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
56
|
+
<div class="flex flex-1 flex-center">
|
|
57
|
+
<YunNavMenuTitle />
|
|
58
|
+
</div>
|
|
79
59
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</div>
|
|
60
|
+
<div class="inline-flex flex-1 justify-end items-center">
|
|
61
|
+
<YunToggleLocale
|
|
62
|
+
v-if="app.showToggleLocale"
|
|
63
|
+
class="rounded-none! hidden sm:inline-flex"
|
|
64
|
+
/>
|
|
65
|
+
<YunToggleDark class="rounded-none!" transition />
|
|
66
|
+
<YunSearchTrigger v-if="siteConfig.search.enable" />
|
|
88
67
|
</div>
|
|
89
|
-
</
|
|
68
|
+
</div>
|
|
90
69
|
</template>
|
|
91
70
|
|
|
92
71
|
<style lang="scss" scoped>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<script lang="ts"
|
|
2
|
-
import {
|
|
3
|
-
import * as addonArtalk from 'valaxy-addon-artalk'
|
|
4
|
-
import 'valaxy-addon-artalk/client/styles/index.scss'
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { defineAsyncComponent } from 'vue'
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
// Keep the public component auto-imported so site/addon overrides still win.
|
|
5
|
+
export default defineAsyncComponent(() => import('../../client/components/YunArtalk.vue'))
|
|
8
6
|
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<ArtalkClient />
|
|
12
|
-
</template>
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
<script lang="ts"
|
|
2
|
-
import {
|
|
3
|
-
import * as addonTwikoo from 'valaxy-addon-twikoo'
|
|
4
|
-
import 'valaxy-addon-twikoo/client/styles/index.scss'
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { defineAsyncComponent } from 'vue'
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
// Keep the public component auto-imported so site/addon overrides still win.
|
|
5
|
+
export default defineAsyncComponent(() => import('../../client/components/YunTwikoo.vue'))
|
|
8
6
|
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<div>
|
|
12
|
-
<div id="tcomment" w="full" />
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
<script lang="ts"
|
|
2
|
-
import {
|
|
3
|
-
import * as addonWaline from 'valaxy-addon-waline'
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { defineAsyncComponent } from 'vue'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const addon = addonWaline.useAddonWaline()
|
|
4
|
+
// Keep the public component auto-imported so site/addon overrides still win.
|
|
5
|
+
export default defineAsyncComponent(() => import('../../client/components/YunWaline.vue'))
|
|
9
6
|
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<WalineClient
|
|
13
|
-
w="full" :options="addon?.options || {
|
|
14
|
-
serverURL: '',
|
|
15
|
-
}"
|
|
16
|
-
/>
|
|
17
|
-
</template>
|
package/layouts/home.vue
CHANGED
|
@@ -30,24 +30,13 @@ const showNotice = computed(() => {
|
|
|
30
30
|
<div id="yun-banner-placeholder" class="w-full h-[var(--banner-container-height,100vh)]" />
|
|
31
31
|
</template>
|
|
32
32
|
</ClientOnly>
|
|
33
|
-
<
|
|
34
|
-
v-if="yun.isNimbo
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
enter-active-class="transition-300 transition-cubic-bezier-ease-in-out"
|
|
38
|
-
appear
|
|
33
|
+
<div
|
|
34
|
+
v-if="yun.isNimbo"
|
|
35
|
+
class="yun-home-prologue-content absolute top-0 left-5 right-5 bottom-0 flex-center"
|
|
36
|
+
:class="{ 'is-intro-complete': yun.bannerAnimationDone }"
|
|
39
37
|
>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
enter-from-class="op-0"
|
|
43
|
-
enter-to-class="op-100"
|
|
44
|
-
enter-active-class="transition-800"
|
|
45
|
-
appear
|
|
46
|
-
>
|
|
47
|
-
<YunPrologueSquare class="z-1" />
|
|
48
|
-
</Transition>
|
|
49
|
-
</div>
|
|
50
|
-
</Transition>
|
|
38
|
+
<YunPrologueSquare class="z-1" :intro-complete="yun.bannerAnimationDone" />
|
|
39
|
+
</div>
|
|
51
40
|
</YunPrologue>
|
|
52
41
|
<YunSay v-if="themeConfig.say?.enable" w="full" />
|
|
53
42
|
</div>
|
|
@@ -75,23 +64,56 @@ const showNotice = computed(() => {
|
|
|
75
64
|
</template>
|
|
76
65
|
|
|
77
66
|
<style scoped>
|
|
78
|
-
@media (width
|
|
79
|
-
.yun-home-prologue {
|
|
80
|
-
|
|
67
|
+
@media (width > 768px) {
|
|
68
|
+
.yun-home-prologue-content {
|
|
69
|
+
visibility: hidden;
|
|
70
|
+
opacity: 0;
|
|
71
|
+
scale: 0.6;
|
|
72
|
+
transition: opacity 800ms var(--yun-ease-in-out), scale 300ms var(--yun-ease-in-out);
|
|
81
73
|
}
|
|
82
74
|
|
|
75
|
+
.yun-home-prologue-content.is-intro-complete {
|
|
76
|
+
visibility: visible;
|
|
77
|
+
opacity: 1;
|
|
78
|
+
scale: 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (width <= 768px) {
|
|
83
83
|
.yun-home-prologue :deep(#yun-banner),
|
|
84
84
|
.yun-home-prologue :deep(#yun-banner-placeholder) {
|
|
85
|
-
|
|
85
|
+
position: absolute;
|
|
86
|
+
inset: 0;
|
|
86
87
|
height: 100%;
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.yun-home-prologue :deep(#yun-banner .go-down) {
|
|
92
|
+
pointer-events: auto;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Keep the original animation in the gutter outside the content padding. */
|
|
96
|
+
.yun-home-prologue :deep(#yun-banner .banner-line-container),
|
|
97
|
+
.yun-home-prologue :deep(#yun-banner .banner-char-container) {
|
|
98
|
+
align-self: flex-start;
|
|
99
|
+
width: 20px;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
opacity: 0.55;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.yun-home-prologue :deep(#yun-banner .banner-char-container) {
|
|
105
|
+
--banner-empty-border-size: 0px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.yun-home-prologue :deep(#yun-banner .char) {
|
|
109
|
+
font-size: 0.75rem;
|
|
87
110
|
}
|
|
88
111
|
|
|
89
112
|
.yun-home-prologue-content {
|
|
90
|
-
grid-area: 1 / 1;
|
|
91
113
|
position: relative;
|
|
92
114
|
inset: auto;
|
|
93
115
|
box-sizing: border-box;
|
|
94
|
-
min-height: var(--banner-container-height, calc(100 * var(--vh)));
|
|
116
|
+
min-height: var(--banner-container-height, calc(100 * var(--vh, 1dvh)));
|
|
95
117
|
padding: calc(var(--yun-nav-height) + 20px) 20px 36px;
|
|
96
118
|
}
|
|
97
119
|
}
|