valaxy-theme-yun 1.2.2 → 1.3.1
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 +27 -12
- 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 +23 -100
- 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 +31 -25
- 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/types/index.d.ts +3 -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
|
|
|
@@ -19,48 +24,27 @@ const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
|
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,20 @@ 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
|
-
--yun-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
114
|
-
|
|
115
|
-
.info-with-avatar {
|
|
116
|
-
position: relative;
|
|
117
|
-
|
|
118
|
-
&.show {
|
|
119
|
-
// transform: translateY(-50%);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
87
|
|
|
123
88
|
.info {
|
|
124
89
|
position: relative;
|
|
125
|
-
visibility: hidden;
|
|
126
|
-
|
|
127
|
-
> * {
|
|
128
|
-
opacity: 0;
|
|
129
|
-
transform: translateY(18px);
|
|
130
|
-
transition: opacity 640ms var(--yun-reveal-ease), transform 720ms var(--yun-reveal-ease);
|
|
131
|
-
transition-delay: var(--yun-reveal-delay, 0ms);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.prologue-introduction { --yun-reveal-delay: 70ms; }
|
|
135
|
-
.prologue-social { --yun-reveal-delay: 140ms; }
|
|
136
|
-
.prologue-navigation { --yun-reveal-delay: 210ms; }
|
|
137
|
-
|
|
138
|
-
&.show {
|
|
139
|
-
visibility: visible;
|
|
140
|
-
|
|
141
|
-
> * {
|
|
142
|
-
opacity: 1;
|
|
143
|
-
transform: none;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
90
|
}
|
|
147
|
-
|
|
148
91
|
}
|
|
149
92
|
|
|
150
93
|
.yun-square-container.is-grouped {
|
|
@@ -160,24 +103,4 @@ const grouped = computed(() => themeConfig.value.banner?.prologue === 'grouped')
|
|
|
160
103
|
margin-top: 32px;
|
|
161
104
|
}
|
|
162
105
|
}
|
|
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
106
|
</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
|
@@ -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-4">
|
|
22
|
+
<div class="yun-home-layout 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">
|
|
@@ -30,24 +30,12 @@ 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
|
-
enter-to-class="scale-100"
|
|
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"
|
|
39
36
|
>
|
|
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>
|
|
37
|
+
<YunPrologueSquare class="z-1" :intro-complete="yun.bannerAnimationDone" />
|
|
38
|
+
</div>
|
|
51
39
|
</YunPrologue>
|
|
52
40
|
<YunSay v-if="themeConfig.say?.enable" w="full" />
|
|
53
41
|
</div>
|
|
@@ -76,22 +64,40 @@ const showNotice = computed(() => {
|
|
|
76
64
|
|
|
77
65
|
<style scoped>
|
|
78
66
|
@media (width <= 768px) {
|
|
79
|
-
.yun-home-prologue {
|
|
80
|
-
display: grid;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
67
|
.yun-home-prologue :deep(#yun-banner),
|
|
84
68
|
.yun-home-prologue :deep(#yun-banner-placeholder) {
|
|
85
|
-
|
|
69
|
+
position: absolute;
|
|
70
|
+
inset: 0;
|
|
86
71
|
height: 100%;
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.yun-home-prologue :deep(#yun-banner .go-down) {
|
|
76
|
+
pointer-events: auto;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Keep the original animation in the gutter outside the content padding. */
|
|
80
|
+
.yun-home-prologue :deep(#yun-banner .banner-line-container),
|
|
81
|
+
.yun-home-prologue :deep(#yun-banner .banner-char-container) {
|
|
82
|
+
align-self: flex-start;
|
|
83
|
+
width: 20px;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
opacity: 0.55;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.yun-home-prologue :deep(#yun-banner .banner-char-container) {
|
|
89
|
+
--banner-empty-border-size: 0px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.yun-home-prologue :deep(#yun-banner .char) {
|
|
93
|
+
font-size: 0.75rem;
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
.yun-home-prologue-content {
|
|
90
|
-
grid-area: 1 / 1;
|
|
91
97
|
position: relative;
|
|
92
98
|
inset: auto;
|
|
93
99
|
box-sizing: border-box;
|
|
94
|
-
min-height: var(--banner-container-height, calc(100 * var(--vh)));
|
|
100
|
+
min-height: var(--banner-container-height, calc(100 * var(--vh, 1dvh)));
|
|
95
101
|
padding: calc(var(--yun-nav-height) + 20px) 20px 36px;
|
|
96
102
|
}
|
|
97
103
|
}
|
package/layouts/post.vue
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { defineArticle, useSchemaOrg } from '@unhead/schema-org/vue'
|
|
3
3
|
|
|
4
4
|
import dayjs from 'dayjs'
|
|
5
|
-
import { useFrontmatter, useSiteConfig, useValaxyI18n } from 'valaxy'
|
|
5
|
+
import { resolveCanonicalPath, resolveSiteUrl, useFrontmatter, usePageSeo, useSiteConfig, useValaxyI18n } from 'valaxy'
|
|
6
6
|
import { useI18n } from 'vue-i18n'
|
|
7
|
+
import { useRoute } from 'vue-router'
|
|
7
8
|
import { useYunCollection } from '../composables/collection'
|
|
8
9
|
import { useYunLocalMenu } from '../composables/localMenu'
|
|
9
10
|
|
|
@@ -12,22 +13,30 @@ const { menuOpen, toggleMenu } = useYunLocalMenu()
|
|
|
12
13
|
const { t } = useI18n()
|
|
13
14
|
const siteConfig = useSiteConfig()
|
|
14
15
|
const frontmatter = useFrontmatter()
|
|
16
|
+
const route = useRoute()
|
|
15
17
|
|
|
16
18
|
const { $t, $tO } = useValaxyI18n()
|
|
17
|
-
const
|
|
19
|
+
const authorLink = siteConfig.value.author.link?.trim()
|
|
20
|
+
const description = $tO(frontmatter.value.description) || route.meta.seoDescription || ''
|
|
21
|
+
const { image } = usePageSeo()
|
|
22
|
+
const pagePath = resolveCanonicalPath(route)
|
|
23
|
+
const pageUrl = /^https?:\/\//.test(siteConfig.value.url)
|
|
24
|
+
? resolveSiteUrl(siteConfig.value.url, frontmatter.value.canonical || pagePath)
|
|
25
|
+
: ''
|
|
18
26
|
const article: Parameters<typeof defineArticle>[0] = {
|
|
19
27
|
'@type': 'BlogPosting',
|
|
20
28
|
'headline': $tO(frontmatter.value.title),
|
|
21
|
-
|
|
29
|
+
...(description ? { description } : {}),
|
|
22
30
|
'author': [
|
|
23
31
|
{
|
|
24
32
|
name: $t(siteConfig.value.author.name),
|
|
25
|
-
url:
|
|
33
|
+
...(authorLink ? { url: authorLink } : {}),
|
|
26
34
|
},
|
|
27
35
|
],
|
|
28
36
|
'datePublished': dayjs(frontmatter.value.date || '').toDate(),
|
|
29
37
|
'dateModified': dayjs(frontmatter.value.updated || '').toDate(),
|
|
30
|
-
...(
|
|
38
|
+
...(pageUrl ? { url: pageUrl } : {}),
|
|
39
|
+
image,
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
useSchemaOrg(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy-theme-yun",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"description": "Default theme (Yun) for Valaxy — a Vite & Vue powered static blog generator",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"valaxy-addon-girls": "0.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"valaxy": "1.
|
|
44
|
+
"valaxy": "1.3.1",
|
|
45
45
|
"valaxy-addon-waline": "0.2.1"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|