valaxy-theme-yun 0.19.13 → 0.20.0-beta.10
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 +30 -4
- package/bump.config.ts +7 -0
- package/client/constants/index.ts +13 -0
- package/components/ValaxyMain.vue +47 -58
- package/components/YunAdBoard.vue +4 -0
- package/components/YunAlbum.vue +13 -3
- package/components/YunAlbumList.vue +5 -11
- package/components/YunAside.vue +66 -43
- package/components/YunBackToTop.vue +11 -4
- package/components/YunBanner.vue +31 -15
- package/components/YunBg.vue +2 -0
- package/components/YunCard.vue +5 -1
- package/components/YunCategories.vue +15 -34
- package/components/YunCategory.vue +57 -40
- package/components/YunCategoryChildItem.vue +49 -0
- package/components/YunClassifyPopover.vue +59 -0
- package/components/YunCloud.vue +5 -10
- package/components/YunConfig.vue +2 -19
- package/components/YunDebug.vue +47 -0
- package/components/YunDock.vue +223 -0
- package/components/YunFooter.vue +56 -4
- package/components/YunFullscreenMenu.vue +57 -0
- package/components/YunGirlItem.vue +98 -0
- package/components/YunGirls.vue +2 -73
- package/components/YunGoDown.vue +8 -15
- package/components/YunLayoutPostTag.vue +11 -1
- package/components/YunLinkItem.vue +62 -0
- package/components/YunLinks.vue +15 -47
- package/components/YunNavMenu.vue +125 -0
- package/components/YunOutline.vue +1 -2
- package/components/YunOverlay.vue +31 -0
- package/components/YunOverview.vue +2 -79
- package/components/YunPageHeader.vue +1 -1
- package/components/YunPagination.vue +108 -0
- package/components/YunPostCard.vue +32 -3
- package/components/YunPostCategories.vue +3 -3
- package/components/YunPostCollapse.vue +12 -75
- package/components/YunPostCollapseItem.vue +137 -0
- package/components/YunPostDateMeta.vue +30 -0
- package/components/YunPostList.vue +6 -11
- package/components/YunPostMeta.vue +31 -39
- package/components/YunPostTags.vue +2 -2
- package/components/YunPostsInfo.vue +41 -0
- package/components/YunPrologue.vue +24 -0
- package/components/YunSearchBtn.vue +8 -6
- package/components/YunSelect.vue +1 -11
- package/components/YunSidebar.vue +7 -4
- package/components/YunSidebarCard.vue +10 -0
- package/components/YunSidebarNav.vue +0 -1
- package/components/YunSiteInfo.vue +72 -0
- package/components/YunSponsor.vue +21 -6
- package/components/animation/LineBurstEffects.vue +75 -0
- package/components/author/YunAuthorAvatar.vue +12 -0
- package/components/author/YunAuthorIntro.vue +11 -0
- package/components/author/YunAuthorName.vue +14 -0
- package/components/config/YunToggleDark.vue +37 -0
- package/components/layout/YunLayoutLeft.vue +12 -0
- package/components/layout/YunLayoutRight.vue +21 -0
- package/components/layout/YunLayoutWrapper.vue +13 -0
- package/components/menu/YunNavMenuItem.vue +22 -0
- package/components/menu/YunNavMenuTitle.vue +86 -0
- package/components/menu/YunPostClassifyNavItem.vue +30 -0
- package/components/page/YunPageHeaderGradient.vue +38 -0
- package/components/project/YunProjectCard.vue +120 -0
- package/components/project/YunProjectCollection.vue +15 -0
- package/components/project/YunProjectLinkItem.vue +60 -0
- package/components/project/YunProjectToggleButton.vue +17 -0
- package/components/project/YunProjects.vue +48 -0
- package/components/prologue/PrologueSocialIcon.vue +58 -0
- package/components/prologue/PrologueSocialLinks.vue +16 -0
- package/components/prologue/PrologueSquare.vue +145 -0
- package/components/prologue/YunAEFrame.vue +138 -0
- package/components/prologue/YunAERect.vue +127 -0
- package/components/site/YunFullscreenMenuItem.vue +26 -0
- package/components/site/YunFullscreenMenuList.vue +19 -0
- package/components/site/YunSiteDescription.vue +11 -0
- package/components/site/YunSiteLinkItem.vue +26 -0
- package/components/site/YunSiteLinks.vue +19 -0
- package/components/site/YunSiteSubtitle.vue +14 -0
- package/components/site/YunSiteTitle.vue +59 -0
- package/components/third/YunWalineMeta.vue +17 -5
- package/components/ui/YunDivider.vue +3 -0
- package/composables/animation.ts +33 -0
- package/docs/zh-CN/config.md +0 -3
- package/layouts/404.vue +1 -3
- package/layouts/albums.vue +25 -24
- package/layouts/archives.vue +32 -21
- package/layouts/categories.vue +47 -31
- package/layouts/default.vue +10 -5
- package/layouts/empty.vue +3 -0
- package/layouts/gallery.vue +31 -30
- package/layouts/home.vue +13 -12
- package/layouts/post.vue +23 -20
- package/layouts/posts.vue +10 -0
- package/layouts/projects.vue +25 -0
- package/layouts/tags.vue +51 -41
- package/node/config.ts +2 -5
- package/package.json +16 -7
- package/pages/page/[page].vue +3 -6
- package/pages/posts/index.vue +11 -0
- package/setup/main.ts +51 -9
- package/stores/app.ts +25 -3
- package/styles/animations/index.scss +73 -0
- package/styles/common/markdown.scss +4 -0
- package/styles/css-vars.scss +19 -1
- package/styles/global.scss +8 -0
- package/styles/index.scss +1 -0
- package/styles/layout/index.scss +2 -4
- package/styles/modules/prologue.scss +1 -0
- package/styles/primevue/index.ts +7 -0
- package/styles/primevue/tooltip.scss +55 -0
- package/styles/primevue/tooltip.ts +14 -0
- package/styles/vars.scss +23 -2
- package/styles/widgets/banner.scss +26 -6
- package/types/index.d.ts +53 -5
- package/types/projects.ts +48 -0
- package/unocss.config.ts +1 -2
- package/utils/animation.ts +35 -0
- package/utils/index.ts +2 -0
- package/valaxy.config.ts +1 -0
@@ -0,0 +1,138 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { onMounted, ref } from 'vue'
|
3
|
+
|
4
|
+
const playAnim = ref(false)
|
5
|
+
onMounted(() => {
|
6
|
+
playAnim.value = true
|
7
|
+
})
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<template>
|
11
|
+
<div
|
12
|
+
class="yun-ae-frame"
|
13
|
+
:class="{
|
14
|
+
play: playAnim,
|
15
|
+
}"
|
16
|
+
>
|
17
|
+
<div class="tl absolute" />
|
18
|
+
<div class="tr absolute" />
|
19
|
+
<div class="bl absolute" />
|
20
|
+
<div class="br absolute" />
|
21
|
+
</div>
|
22
|
+
</template>
|
23
|
+
|
24
|
+
<style lang="scss">
|
25
|
+
@use 'sass:map';
|
26
|
+
@use 'valaxy/client/styles/mixins/index.scss' as *;
|
27
|
+
@use 'valaxy-theme-yun/styles/vars.scss' as *;
|
28
|
+
|
29
|
+
@include screen('md') {
|
30
|
+
.yun-ae-frame {
|
31
|
+
--corner-size: 50px;
|
32
|
+
--corner-margin: 30px;
|
33
|
+
--corner-border-size: 5px;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.yun-ae-frame {
|
38
|
+
--corner-size: 40px;
|
39
|
+
--corner-margin: 10px;
|
40
|
+
--corner-border-size: 3px;
|
41
|
+
|
42
|
+
div {
|
43
|
+
width: var(--corner-size);
|
44
|
+
height: var(--corner-size);
|
45
|
+
|
46
|
+
&::before, &::after {
|
47
|
+
content: '';
|
48
|
+
display: block;
|
49
|
+
position: absolute;
|
50
|
+
background-color: var(--va-c-text);
|
51
|
+
}
|
52
|
+
|
53
|
+
&::before {
|
54
|
+
width: 100%;
|
55
|
+
height: var(--corner-border-size);
|
56
|
+
}
|
57
|
+
|
58
|
+
&::after {
|
59
|
+
width: var(--corner-border-size);
|
60
|
+
height: 100%;
|
61
|
+
}
|
62
|
+
|
63
|
+
&:nth-child(1) {
|
64
|
+
top: var(--corner-margin);
|
65
|
+
left: var(--corner-margin);
|
66
|
+
}
|
67
|
+
|
68
|
+
&:nth-child(2) {
|
69
|
+
top: var(--corner-margin);
|
70
|
+
right: var(--corner-margin);
|
71
|
+
|
72
|
+
&::after {
|
73
|
+
top: 0;
|
74
|
+
right: 0;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
&:nth-child(3) {
|
79
|
+
bottom: var(--corner-margin);
|
80
|
+
left: var(--corner-margin);
|
81
|
+
|
82
|
+
&::before {
|
83
|
+
bottom: 0;
|
84
|
+
left: 0;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
&:nth-child(4) {
|
89
|
+
bottom: var(--corner-margin);
|
90
|
+
right: var(--corner-margin);
|
91
|
+
|
92
|
+
&::before, &::after {
|
93
|
+
bottom: 0;
|
94
|
+
right: 0;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
.tl, .tr, .bl, .br {
|
100
|
+
position: absolute;
|
101
|
+
transition: transform 0.6s map.get($cubic-bezier, 'ease-in');
|
102
|
+
}
|
103
|
+
|
104
|
+
.tl {
|
105
|
+
transform: translate(calc(var(--corner-margin) * -1), calc(var(--corner-margin) * -1));
|
106
|
+
}
|
107
|
+
|
108
|
+
.tr {
|
109
|
+
transform: translate(calc(var(--corner-margin)), calc(var(--corner-margin) * -1));
|
110
|
+
}
|
111
|
+
|
112
|
+
.bl {
|
113
|
+
transform: translate(calc(var(--corner-margin) * -1), calc(var(--corner-margin)));
|
114
|
+
}
|
115
|
+
|
116
|
+
.br {
|
117
|
+
transform: translate(calc(var(--corner-margin)), calc(var(--corner-margin)));
|
118
|
+
}
|
119
|
+
|
120
|
+
&.play {
|
121
|
+
.tl {
|
122
|
+
transform: translate(0, 0);
|
123
|
+
}
|
124
|
+
|
125
|
+
.tr {
|
126
|
+
transform: translate(0, 0);
|
127
|
+
}
|
128
|
+
|
129
|
+
.bl {
|
130
|
+
transform: translate(0, 0);
|
131
|
+
}
|
132
|
+
|
133
|
+
.br {
|
134
|
+
transform: translate(0, 0);
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
</style>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import type { PopmotionTransitionProps } from '@vueuse/motion'
|
3
|
+
import { useMotion } from '@vueuse/motion'
|
4
|
+
import { ref } from 'vue'
|
5
|
+
import { cubicBezier } from '../../client/constants'
|
6
|
+
|
7
|
+
const rectRef = ref<HTMLElement>()
|
8
|
+
|
9
|
+
const tRef = ref<HTMLElement>()
|
10
|
+
const lRef = ref<HTMLElement>()
|
11
|
+
const bRef = ref<HTMLElement>()
|
12
|
+
const rRef = ref<HTMLElement>()
|
13
|
+
|
14
|
+
const transitionOptions: PopmotionTransitionProps = {
|
15
|
+
type: 'tween',
|
16
|
+
duration: 600,
|
17
|
+
ease: cubicBezier.easeIn,
|
18
|
+
}
|
19
|
+
|
20
|
+
useMotion(rectRef, {
|
21
|
+
initial: {
|
22
|
+
backgroundColor: 'rgba(255, 255, 255, 0)',
|
23
|
+
},
|
24
|
+
enter: {
|
25
|
+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
26
|
+
transition: {
|
27
|
+
type: 'keyframes',
|
28
|
+
duration: 1000,
|
29
|
+
ease: cubicBezier.easeIn,
|
30
|
+
},
|
31
|
+
},
|
32
|
+
})
|
33
|
+
|
34
|
+
useMotion(tRef, {
|
35
|
+
initial: {
|
36
|
+
x: '-100%',
|
37
|
+
},
|
38
|
+
enter: {
|
39
|
+
x: '0%',
|
40
|
+
transition: transitionOptions,
|
41
|
+
},
|
42
|
+
})
|
43
|
+
|
44
|
+
useMotion(lRef, {
|
45
|
+
initial: {
|
46
|
+
y: '-100%',
|
47
|
+
},
|
48
|
+
enter: {
|
49
|
+
y: '0%',
|
50
|
+
transition: transitionOptions,
|
51
|
+
},
|
52
|
+
})
|
53
|
+
|
54
|
+
useMotion(bRef, {
|
55
|
+
initial: {
|
56
|
+
x: '100%',
|
57
|
+
},
|
58
|
+
enter: {
|
59
|
+
x: '0%',
|
60
|
+
transition: transitionOptions,
|
61
|
+
},
|
62
|
+
})
|
63
|
+
|
64
|
+
useMotion(rRef, {
|
65
|
+
initial: {
|
66
|
+
y: '100%',
|
67
|
+
},
|
68
|
+
enter: {
|
69
|
+
y: '0%',
|
70
|
+
transition: transitionOptions,
|
71
|
+
},
|
72
|
+
})
|
73
|
+
</script>
|
74
|
+
|
75
|
+
<template>
|
76
|
+
<div ref="rectRef" class="absolute ae-rect">
|
77
|
+
<div ref="tRef" />
|
78
|
+
<div ref="lRef" />
|
79
|
+
<div ref="bRef" />
|
80
|
+
<div ref="rRef" />
|
81
|
+
</div>
|
82
|
+
</template>
|
83
|
+
|
84
|
+
<style lang="scss">
|
85
|
+
.ae-rect {
|
86
|
+
top: var(--rect-margin);
|
87
|
+
left: var(--rect-margin);
|
88
|
+
width: calc(100% - var(--rect-margin) * 2);
|
89
|
+
height: calc(100% - var(--rect-margin) * 2);
|
90
|
+
overflow: hidden;
|
91
|
+
|
92
|
+
div {
|
93
|
+
position: absolute;
|
94
|
+
overflow: hidden;
|
95
|
+
|
96
|
+
&::after {
|
97
|
+
content: '';
|
98
|
+
position: absolute;
|
99
|
+
width: 100%;
|
100
|
+
height: 100%;
|
101
|
+
background-color: var(--va-c-text);
|
102
|
+
}
|
103
|
+
|
104
|
+
&:nth-child(1),
|
105
|
+
&:nth-child(3) {
|
106
|
+
left: 0;
|
107
|
+
width: 100%;
|
108
|
+
height: 1px;
|
109
|
+
}
|
110
|
+
|
111
|
+
&:nth-child(2),
|
112
|
+
&:nth-child(4) {
|
113
|
+
top: 0;
|
114
|
+
width: 1px;
|
115
|
+
height: 100%;
|
116
|
+
}
|
117
|
+
|
118
|
+
&:nth-child(3) {
|
119
|
+
bottom: 0;
|
120
|
+
}
|
121
|
+
|
122
|
+
&:nth-child(4) {
|
123
|
+
right: 0;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
</style>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useYunAppStore } from '../../stores'
|
3
|
+
import type { PageProps } from '../../types'
|
4
|
+
|
5
|
+
defineProps<{
|
6
|
+
page: PageProps
|
7
|
+
}>()
|
8
|
+
|
9
|
+
const yunApp = useYunAppStore()
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<template>
|
13
|
+
<AppLink
|
14
|
+
class="link-item w-full items-center justify-center md:justify-start gap-2 transition rounded text-2xl p-4 sm:(text-3xl p-6) lg:(text-4xl p-7)"
|
15
|
+
inline-flex
|
16
|
+
:to="page.url" :title="page.name"
|
17
|
+
:style="`color:${page.color}`"
|
18
|
+
hover="bg-gray-100/50 dark:bg-gray-800/50"
|
19
|
+
@click="yunApp.fullscreenMenu.isOpen = false"
|
20
|
+
>
|
21
|
+
<div :class="page.icon" class="icon" />
|
22
|
+
<span>
|
23
|
+
{{ page.name }}
|
24
|
+
</span>
|
25
|
+
</AppLink>
|
26
|
+
</template>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useThemeConfig } from '../../composables'
|
3
|
+
|
4
|
+
const themeConfig = useThemeConfig()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div
|
9
|
+
class="links flex-center"
|
10
|
+
flex="~ col" text="left"
|
11
|
+
p="x-$rect-margin"
|
12
|
+
>
|
13
|
+
<slot />
|
14
|
+
<YunFullscreenMenuItem
|
15
|
+
v-for="item, i in themeConfig.pages"
|
16
|
+
:key="i" :page="item"
|
17
|
+
/>
|
18
|
+
</div>
|
19
|
+
</template>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useSiteConfig } from 'valaxy'
|
3
|
+
|
4
|
+
const siteConfig = useSiteConfig()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div v-if="siteConfig.description" class="site-description text-$va-c-text text-sm">
|
9
|
+
{{ siteConfig.description }}
|
10
|
+
</div>
|
11
|
+
</template>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useYunAppStore } from '../../stores'
|
3
|
+
import type { PageProps } from '../../types'
|
4
|
+
|
5
|
+
defineProps<{
|
6
|
+
page: PageProps
|
7
|
+
}>()
|
8
|
+
|
9
|
+
const yunApp = useYunAppStore()
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<template>
|
13
|
+
<AppLink
|
14
|
+
class="link-item inline-flex-center gap-2 transition rounded text-base p-1 md:(text-xl p-3) text-$va-c-text"
|
15
|
+
inline-flex
|
16
|
+
:to="page.url" :title="page.name"
|
17
|
+
:style="`color:${page.color}`"
|
18
|
+
hover="bg-white/80 dark:bg-black/80"
|
19
|
+
@click="yunApp.fullscreenMenu.isOpen = false"
|
20
|
+
>
|
21
|
+
<div :class="page.icon" class="icon" />
|
22
|
+
<span>
|
23
|
+
{{ page.name }}
|
24
|
+
</span>
|
25
|
+
</AppLink>
|
26
|
+
</template>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useThemeConfig } from '../../composables'
|
3
|
+
|
4
|
+
const themeConfig = useThemeConfig()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div
|
9
|
+
class="links flex-center"
|
10
|
+
flex="~ col" text="left"
|
11
|
+
p="x-$rect-margin"
|
12
|
+
>
|
13
|
+
<slot />
|
14
|
+
<YunSiteLinkItem
|
15
|
+
v-for="item, i in themeConfig.pages"
|
16
|
+
:key="i" :page="item"
|
17
|
+
/>
|
18
|
+
</div>
|
19
|
+
</template>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useSiteConfig } from 'valaxy'
|
3
|
+
|
4
|
+
const siteConfig = useSiteConfig()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<h4
|
9
|
+
v-if="siteConfig.subtitle"
|
10
|
+
class="site-subtitle block text-$va-c-text op-80" text="sm"
|
11
|
+
>
|
12
|
+
{{ siteConfig.subtitle }}
|
13
|
+
</h4>
|
14
|
+
</template>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useSiteConfig } from 'valaxy'
|
3
|
+
import { useRouter } from 'vue-router'
|
4
|
+
|
5
|
+
const router = useRouter()
|
6
|
+
const siteConfig = useSiteConfig()
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<template>
|
10
|
+
<RouterLink
|
11
|
+
v-if="router.hasRoute('/about/site')" to="/about/site"
|
12
|
+
class="site-name"
|
13
|
+
>
|
14
|
+
{{ siteConfig.title }}
|
15
|
+
</RouterLink>
|
16
|
+
<span v-else class="site-name">{{ siteConfig.title }}</span>
|
17
|
+
</template>
|
18
|
+
|
19
|
+
<style lang="scss">
|
20
|
+
.site-name {
|
21
|
+
--title-padding: -15px;
|
22
|
+
|
23
|
+
display: inline-flex;
|
24
|
+
color: var(--va-c-text);
|
25
|
+
position: relative;
|
26
|
+
|
27
|
+
&::before,
|
28
|
+
&::after {
|
29
|
+
content: "";
|
30
|
+
position: absolute;
|
31
|
+
width: 10px;
|
32
|
+
height: 10px;
|
33
|
+
opacity: 0;
|
34
|
+
border: 2px solid;
|
35
|
+
transition: 0.3s;
|
36
|
+
transition-timing-function: cubic-bezier(0.17, 0.67, 0.05, 1.29);
|
37
|
+
}
|
38
|
+
|
39
|
+
&::before {
|
40
|
+
top: 0;
|
41
|
+
left: var(--title-padding);
|
42
|
+
border-width: 2px 0 0 2px;
|
43
|
+
transform: translate3d(10px, 10px, 0);
|
44
|
+
}
|
45
|
+
|
46
|
+
&::after {
|
47
|
+
right: var(--title-padding);
|
48
|
+
bottom: 0;
|
49
|
+
border-width: 0 2px 2px 0;
|
50
|
+
transform: translate3d(-10px, -10px, 0);
|
51
|
+
}
|
52
|
+
|
53
|
+
&:hover::before,
|
54
|
+
&:hover::after {
|
55
|
+
opacity: 1;
|
56
|
+
transform: translate3d(0, 0, 0);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
</style>
|
@@ -14,14 +14,26 @@ const { t } = useI18n()
|
|
14
14
|
</script>
|
15
15
|
|
16
16
|
<template>
|
17
|
-
<div v-if="addonWaline && addonWaline.options"
|
18
|
-
<div
|
17
|
+
<div v-if="addonWaline && addonWaline.options" class="inline-flex gap-4" text="sm" h="5">
|
18
|
+
<div
|
19
|
+
v-if="addonWaline.options.pageview" inline-flex justify="center" items="center"
|
20
|
+
:title="t('post.pageview_count')"
|
21
|
+
>
|
19
22
|
<div inline-flex i-ri-eye-line />
|
20
|
-
<span
|
23
|
+
<span
|
24
|
+
ml-1 inline-flex class="waline-pageview-count op-80"
|
25
|
+
:data-path="route.path"
|
26
|
+
/>
|
21
27
|
</div>
|
22
|
-
<div
|
28
|
+
<div
|
29
|
+
v-if="addonWaline.options.comment" inline-flex justify="center" items="center"
|
30
|
+
:title="t('post.comment_count')"
|
31
|
+
>
|
23
32
|
<div inline-flex i-ri-chat-4-line />
|
24
|
-
<span
|
33
|
+
<span
|
34
|
+
ml-1 inline-flex class="waline-comment-count op-80"
|
35
|
+
:data-path="route.path"
|
36
|
+
/>
|
25
37
|
</div>
|
26
38
|
</div>
|
27
39
|
</template>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { useMotion } from '@vueuse/motion'
|
2
|
+
import type { MaybeRef } from 'vue'
|
3
|
+
import { cubicBezier } from '../client/constants'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 统一的弹跳出现动画
|
7
|
+
*/
|
8
|
+
export function useYunSpringAnimation(target: MaybeRef<HTMLElement | undefined>, options: {
|
9
|
+
/**
|
10
|
+
* index order
|
11
|
+
*/
|
12
|
+
i: number
|
13
|
+
y?: number
|
14
|
+
duration?: number
|
15
|
+
}) {
|
16
|
+
useMotion(target, {
|
17
|
+
initial: {
|
18
|
+
opacity: 0,
|
19
|
+
y: options.y || 40,
|
20
|
+
},
|
21
|
+
enter: {
|
22
|
+
opacity: 1,
|
23
|
+
y: 0,
|
24
|
+
transition: {
|
25
|
+
delay: options.i * 50,
|
26
|
+
type: 'spring',
|
27
|
+
ease: cubicBezier.easeIn,
|
28
|
+
damping: 8,
|
29
|
+
duration: options.duration || 400,
|
30
|
+
},
|
31
|
+
},
|
32
|
+
})
|
33
|
+
}
|
package/docs/zh-CN/config.md
CHANGED
package/layouts/404.vue
CHANGED
@@ -7,8 +7,6 @@ const { back } = useBack()
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<template>
|
10
|
-
<YunSidebar :show-hamburger="true" />
|
11
|
-
|
12
10
|
<main class="va-main w-full h-screen" text="center" flex="~ col" justify="center" items="center">
|
13
11
|
<div class="not-found" title="404" font="mono">
|
14
12
|
404
|
@@ -27,6 +25,6 @@ const { back } = useBack()
|
|
27
25
|
<style lang="scss" scoped>
|
28
26
|
.not-found {
|
29
27
|
font-size: 10rem;
|
30
|
-
text-shadow: 0 5px 10px
|
28
|
+
text-shadow: 0 5px 10px rgb(0 0 0 / .25), 0 20px 20px rgb(0 0 0 / .15);
|
31
29
|
}
|
32
30
|
</style>
|
package/layouts/albums.vue
CHANGED
@@ -20,28 +20,29 @@ const albums = computed(() => frontmatter.value.albums || [])
|
|
20
20
|
</script>
|
21
21
|
|
22
22
|
<template>
|
23
|
-
<
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
23
|
+
<YunLayoutWrapper>
|
24
|
+
<YunLayoutLeft />
|
25
|
+
|
26
|
+
<RouterView v-slot="{ Component }">
|
27
|
+
<component :is="Component">
|
28
|
+
<template #main-header>
|
29
|
+
<YunPageHeader
|
30
|
+
:title="title || t('title.album')"
|
31
|
+
:icon="frontmatter.icon || 'i-ri-gallery-line'"
|
32
|
+
:color="frontmatter.color"
|
33
|
+
:page-title-class="frontmatter.pageTitleClass"
|
34
|
+
/>
|
35
|
+
</template>
|
36
|
+
<template #main-content>
|
37
|
+
<div text="center" class="yun-text-light" p="2">
|
38
|
+
{{ t('counter.albums', albums.length) }}
|
39
|
+
</div>
|
40
|
+
<YunAlbumList :albums="albums" />
|
41
|
+
<RouterView />
|
42
|
+
</template>
|
43
|
+
</component>
|
44
|
+
</RouterView>
|
45
|
+
</YunLayoutWrapper>
|
46
|
+
|
47
|
+
<YunFooter />
|
47
48
|
</template>
|
package/layouts/archives.vue
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { defineWebPage, useSchemaOrg } from '@unhead/schema-org'
|
3
3
|
import { useFrontmatter, usePostTitle, useSiteStore } from 'valaxy'
|
4
|
+
import { computed } from 'vue'
|
4
5
|
import { useI18n } from 'vue-i18n'
|
5
6
|
|
6
7
|
const { t } = useI18n()
|
@@ -15,28 +16,38 @@ useSchemaOrg([
|
|
15
16
|
'@type': 'CollectionPage',
|
16
17
|
}),
|
17
18
|
])
|
19
|
+
|
20
|
+
const pageIcon = computed(() => {
|
21
|
+
if (!frontmatter.value.icon)
|
22
|
+
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
23
|
+
frontmatter.value.icon = 'i-ri-archive-line'
|
24
|
+
return frontmatter.value.icon
|
25
|
+
})
|
18
26
|
</script>
|
19
27
|
|
20
28
|
<template>
|
21
|
-
<
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
29
|
+
<YunLayoutWrapper>
|
30
|
+
<YunLayoutLeft />
|
31
|
+
|
32
|
+
<RouterView v-slot="{ Component }">
|
33
|
+
<component :is="Component">
|
34
|
+
<template #main-header>
|
35
|
+
<YunPageHeader
|
36
|
+
:title="title || t('menu.archives')"
|
37
|
+
:icon="pageIcon"
|
38
|
+
:color="frontmatter.color"
|
39
|
+
:page-title-class="frontmatter.pageTitleClass"
|
40
|
+
/>
|
41
|
+
</template>
|
42
|
+
<template #main-content>
|
43
|
+
<RouterView />
|
44
|
+
<YunPostCollapse :posts="site.postList" />
|
45
|
+
</template>
|
46
|
+
</component>
|
47
|
+
</RouterView>
|
48
|
+
|
49
|
+
<YunLayoutRight />
|
50
|
+
</YunLayoutWrapper>
|
51
|
+
|
52
|
+
<YunFooter />
|
42
53
|
</template>
|