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,86 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useFrontmatter, useSiteConfig } from 'valaxy'
|
3
|
+
import { ref, watch } from 'vue'
|
4
|
+
import { useRouter } from 'vue-router'
|
5
|
+
import { useYunAppStore } from '../../stores'
|
6
|
+
|
7
|
+
const yunApp = useYunAppStore()
|
8
|
+
const fm = useFrontmatter()
|
9
|
+
const siteConfig = useSiteConfig()
|
10
|
+
|
11
|
+
const showPostTitle = ref(false)
|
12
|
+
watch(() => yunApp.scrollY, () => {
|
13
|
+
showPostTitle.value = yunApp.scrollY > 200
|
14
|
+
})
|
15
|
+
|
16
|
+
const router = useRouter()
|
17
|
+
function goToLink() {
|
18
|
+
if (!showPostTitle.value)
|
19
|
+
router.push('/')
|
20
|
+
}
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<template>
|
24
|
+
<div
|
25
|
+
v-motion
|
26
|
+
flex="~ center col h-full"
|
27
|
+
:class="{
|
28
|
+
'cursor-pointer': !showPostTitle,
|
29
|
+
}"
|
30
|
+
:initial="{
|
31
|
+
opacity: 0,
|
32
|
+
y: 10,
|
33
|
+
}"
|
34
|
+
:enter="{
|
35
|
+
opacity: 1,
|
36
|
+
y: 0,
|
37
|
+
transition: {
|
38
|
+
duration: 400,
|
39
|
+
delay: 1200,
|
40
|
+
},
|
41
|
+
}"
|
42
|
+
@click="goToLink"
|
43
|
+
>
|
44
|
+
<div
|
45
|
+
v-if="fm.title && showPostTitle"
|
46
|
+
flex="~ col"
|
47
|
+
class="nav-menu-post-title text-xs font-bold flex items-center gap-1 lt-sm:max-w-40"
|
48
|
+
>
|
49
|
+
<div class="gap-1" flex="~">
|
50
|
+
<div
|
51
|
+
class="size-4"
|
52
|
+
:class="fm.icon || 'i-ri-article-line'"
|
53
|
+
/>
|
54
|
+
<span class="truncate"> {{ fm.title }}</span>
|
55
|
+
</div>
|
56
|
+
<span v-if="fm.subtitle" class="font-light op-80">
|
57
|
+
{{ fm.subtitle }}
|
58
|
+
</span>
|
59
|
+
</div>
|
60
|
+
<span v-else class="font-light truncate">
|
61
|
+
{{ siteConfig.title }}
|
62
|
+
</span>
|
63
|
+
</div>
|
64
|
+
</template>
|
65
|
+
|
66
|
+
<style lang="scss">
|
67
|
+
.nav-menu-post-title {
|
68
|
+
// safari not support
|
69
|
+
animation: nav-menu-title-appear 0.3s linear forwards;
|
70
|
+
|
71
|
+
// animation-timeline: scroll();
|
72
|
+
// animation-range: 0 calc(30vh);
|
73
|
+
}
|
74
|
+
|
75
|
+
@keyframes nav-menu-title-appear {
|
76
|
+
from {
|
77
|
+
opacity: 0;
|
78
|
+
transform: translateY(10px);
|
79
|
+
}
|
80
|
+
|
81
|
+
to {
|
82
|
+
opacity: 1;
|
83
|
+
transform: translateY(0);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
</style>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
defineProps<{
|
3
|
+
icon: string
|
4
|
+
title: string
|
5
|
+
/**
|
6
|
+
* Total number
|
7
|
+
*/
|
8
|
+
total: number
|
9
|
+
to: string
|
10
|
+
}>()
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<template>
|
14
|
+
<RouterLink
|
15
|
+
flex="~ col center"
|
16
|
+
class="gap-1 w-20 p-2 rounded transition op-80"
|
17
|
+
:to="to" :title="title"
|
18
|
+
hover="bg-$va-c-bg-soft op-100"
|
19
|
+
>
|
20
|
+
<div flex="~ col" class="text-$va-c-text inline-flex-center gap-1">
|
21
|
+
<div class="text-2xl" :class="icon" />
|
22
|
+
<span class="text-xs">
|
23
|
+
{{ title }}
|
24
|
+
</span>
|
25
|
+
</div>
|
26
|
+
<span
|
27
|
+
class="count text-base dark:text-white/80"
|
28
|
+
>{{ total }}</span>
|
29
|
+
</RouterLink>
|
30
|
+
</template>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useValaxyDark } from 'valaxy'
|
3
|
+
import { computed } from 'vue'
|
4
|
+
// background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
|
5
|
+
const { isDark } = useValaxyDark()
|
6
|
+
const gradientStyles = computed(() => {
|
7
|
+
if (isDark.value) {
|
8
|
+
return {
|
9
|
+
'--gradient-from': '0 0 0',
|
10
|
+
'--gradient-to': '0 0 0',
|
11
|
+
}
|
12
|
+
}
|
13
|
+
return {
|
14
|
+
'--gradient-from': '161 196 253',
|
15
|
+
'--gradient-to': '194 233 251',
|
16
|
+
}
|
17
|
+
})
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<template>
|
21
|
+
<div class="yun-page-header-gradient" :style="gradientStyles" />
|
22
|
+
</template>
|
23
|
+
|
24
|
+
<style lang="scss">
|
25
|
+
.yun-page-header-gradient {
|
26
|
+
position: absolute;
|
27
|
+
top: 0;
|
28
|
+
left: 0;
|
29
|
+
right: 0;
|
30
|
+
width: 100%;
|
31
|
+
height: 500px;
|
32
|
+
z-index: var(--yun-z-page-gradient);
|
33
|
+
pointer-events: none;
|
34
|
+
background: linear-gradient(to right,rgb(var(--gradient-from) / 0.2) 0,rgb(var(--gradient-to) / .2) 100%);
|
35
|
+
mask-image: linear-gradient(#000,#fff0 70%);
|
36
|
+
animation: fade-in 2s;
|
37
|
+
}
|
38
|
+
</style>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { type CSSProperties, computed, ref } from 'vue'
|
3
|
+
import { TinyColor } from '@ctrl/tinycolor'
|
4
|
+
import { useMotion } from '@vueuse/motion'
|
5
|
+
import type { ProjectItem } from '../../types'
|
6
|
+
import { cubicBezier } from '../../client/constants'
|
7
|
+
|
8
|
+
const props = defineProps<{
|
9
|
+
i: number
|
10
|
+
project: ProjectItem
|
11
|
+
}>()
|
12
|
+
|
13
|
+
const cardRef = ref<HTMLElement>()
|
14
|
+
useMotion(cardRef, {
|
15
|
+
initial: {
|
16
|
+
opacity: 0,
|
17
|
+
y: 50,
|
18
|
+
},
|
19
|
+
enter: {
|
20
|
+
opacity: 1,
|
21
|
+
y: 0,
|
22
|
+
transition: {
|
23
|
+
delay: props.i * 50,
|
24
|
+
type: 'spring',
|
25
|
+
ease: cubicBezier.easeIn,
|
26
|
+
damping: 8,
|
27
|
+
duration: 400,
|
28
|
+
},
|
29
|
+
},
|
30
|
+
})
|
31
|
+
|
32
|
+
const cardStyle = computed(() => {
|
33
|
+
const styles: CSSProperties = {
|
34
|
+
color: props.project.textColor,
|
35
|
+
}
|
36
|
+
if (props.project.color && (typeof props.project.gradient === 'undefined' || props.project.gradient)) {
|
37
|
+
const color = new TinyColor(props.project.color)
|
38
|
+
styles['--un-gradient-stops'] = `${color.spin(55).toHexString()}, ${props.project.color}`
|
39
|
+
if (!styles.color)
|
40
|
+
styles.color = color.isDark() ? 'white' : 'black'
|
41
|
+
}
|
42
|
+
else {
|
43
|
+
styles.backgroundColor = props.project.color || 'rgba(255,255,255,0.9)'
|
44
|
+
if (!styles.color)
|
45
|
+
styles.color = 'black'
|
46
|
+
}
|
47
|
+
return styles
|
48
|
+
})
|
49
|
+
|
50
|
+
const githubUrl = computed(() => {
|
51
|
+
if (props.project.github)
|
52
|
+
return `https://github.com/${props.project.github}`
|
53
|
+
else
|
54
|
+
return `https://github.com/YunYouJun/${props.project.name}`
|
55
|
+
})
|
56
|
+
|
57
|
+
const npmLink = computed(() => {
|
58
|
+
return props.project.npm ? `https://www.npmjs.com/package/${props.project.npm}` : ''
|
59
|
+
})
|
60
|
+
|
61
|
+
const projectUrl = computed(() => {
|
62
|
+
return props.project.url || githubUrl.value
|
63
|
+
})
|
64
|
+
|
65
|
+
const links = computed(() => [
|
66
|
+
{
|
67
|
+
url: projectUrl.value,
|
68
|
+
icon: 'i-ri-global-line',
|
69
|
+
color: '#6eb7f9',
|
70
|
+
},
|
71
|
+
{
|
72
|
+
url: props.project.docs,
|
73
|
+
icon: 'i-ri-book-line',
|
74
|
+
color: '#443ed1',
|
75
|
+
},
|
76
|
+
{
|
77
|
+
url: githubUrl.value,
|
78
|
+
icon: 'i-ri-github-line',
|
79
|
+
color: 'black',
|
80
|
+
},
|
81
|
+
{
|
82
|
+
url: npmLink.value,
|
83
|
+
icon: 'i-ri-npmjs-line',
|
84
|
+
color: 'red',
|
85
|
+
},
|
86
|
+
])
|
87
|
+
</script>
|
88
|
+
|
89
|
+
<template>
|
90
|
+
<div
|
91
|
+
ref="cardRef"
|
92
|
+
flex="~ col center"
|
93
|
+
class="m-2 w-90 transform rounded shadow-md grayscale-30"
|
94
|
+
bg="opacity-80 gradient-to-br"
|
95
|
+
p="x-2 b-12"
|
96
|
+
hover="shadow-lg grayscale-0"
|
97
|
+
:style="cardStyle"
|
98
|
+
>
|
99
|
+
<div v-if="project.emoji" class="mt-4">
|
100
|
+
{{ project.emoji }}
|
101
|
+
</div>
|
102
|
+
<a :href="projectUrl" target="_blank" class="text-unset">
|
103
|
+
<h2 text="lg" font="bold" m="2">
|
104
|
+
{{ project.name || '忘记叫啥了' }}
|
105
|
+
</h2>
|
106
|
+
</a>
|
107
|
+
<small
|
108
|
+
class="block" p="2" text="center"
|
109
|
+
v-html="project.desc || '说点什么好呢'"
|
110
|
+
/>
|
111
|
+
<div flex="~ center" class="absolute left-0 right-0 bottom-0 h-10">
|
112
|
+
<template v-for="item in links" :key="item.icon">
|
113
|
+
<YunProjectLinkItem
|
114
|
+
v-if="item.url"
|
115
|
+
:item="item"
|
116
|
+
/>
|
117
|
+
</template>
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
</template>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import type { ProjectItem } from '../../types'
|
3
|
+
|
4
|
+
defineProps<{
|
5
|
+
title: string
|
6
|
+
projects: ProjectItem[]
|
7
|
+
}>()
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<template>
|
11
|
+
<div class="w-full flex justify-center" text="xl" font="black" m="b-2 t-4">
|
12
|
+
{{ title }}
|
13
|
+
</div>
|
14
|
+
<YunProjectCard v-for="project, i in projects" :key="i" :project="project" :i="i" />
|
15
|
+
</template>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
defineProps<{
|
3
|
+
item: {
|
4
|
+
url: string
|
5
|
+
icon: string
|
6
|
+
color: string
|
7
|
+
}
|
8
|
+
}>()
|
9
|
+
</script>
|
10
|
+
|
11
|
+
<template>
|
12
|
+
<a
|
13
|
+
class="yun-project-link-item inline-flex items-center justify-center flex-1 p-2 h-full text-white"
|
14
|
+
:href="item.url" target="_blank"
|
15
|
+
:style="{
|
16
|
+
'--c-brand': item.color,
|
17
|
+
}"
|
18
|
+
>
|
19
|
+
<div :class="item.icon" />
|
20
|
+
</a>
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<style lang="scss">
|
24
|
+
@use 'sass:map';
|
25
|
+
@use 'valaxy-theme-yun/styles/vars.scss' as *;
|
26
|
+
|
27
|
+
.yun-project-link-item {
|
28
|
+
position: relative;
|
29
|
+
background-color: rgb(0 0 0 / 0.05);
|
30
|
+
transition: background-color 0.3s;
|
31
|
+
|
32
|
+
&::before {
|
33
|
+
content: '';
|
34
|
+
position: absolute;
|
35
|
+
background-color: var(--c-brand);
|
36
|
+
transition: all 0.3s map.get($cubic-bezier, 'ease-in');
|
37
|
+
bottom: 0;
|
38
|
+
left: 0;
|
39
|
+
right: 0;
|
40
|
+
height: 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
&::after {
|
44
|
+
content: '';
|
45
|
+
position: absolute;
|
46
|
+
background-color: var(--c-brand);
|
47
|
+
transition: all 0.3s map.get($cubic-bezier, 'ease-in');
|
48
|
+
inset: 0;
|
49
|
+
opacity: 0.1;
|
50
|
+
z-index: -1;
|
51
|
+
}
|
52
|
+
|
53
|
+
&:hover {
|
54
|
+
&::before {
|
55
|
+
height: 40px;
|
56
|
+
opacity: 0.8;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
</style>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
defineProps<{
|
3
|
+
active?: boolean
|
4
|
+
}>()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<button
|
9
|
+
class="bg-white-90 m-2 inline-flex items-center justify-center rounded px-2 gap-2 h-8"
|
10
|
+
:class="{
|
11
|
+
'bg-blue-500 text-white': active,
|
12
|
+
'hover:bg-$va-c-bg-soft': !active,
|
13
|
+
}"
|
14
|
+
>
|
15
|
+
<slot />
|
16
|
+
</button>
|
17
|
+
</template>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useFrontmatter } from 'valaxy'
|
3
|
+
import { reactive, ref } from 'vue'
|
4
|
+
import { useI18n } from 'vue-i18n'
|
5
|
+
import type { ProjectDataType } from '../../types'
|
6
|
+
|
7
|
+
const fm = useFrontmatter()
|
8
|
+
const { t } = useI18n()
|
9
|
+
const projects = reactive(fm.value.projects as ProjectDataType)
|
10
|
+
|
11
|
+
const curCategory = ref('all')
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<template>
|
15
|
+
<div flex="~ col center">
|
16
|
+
<h2 class="mb-3 text-2xl">
|
17
|
+
{{ fm.title || t('title.projects') }}
|
18
|
+
</h2>
|
19
|
+
|
20
|
+
<div flex="~ wrap" justify="center">
|
21
|
+
<YunProjectToggleButton
|
22
|
+
:active="curCategory === 'all'"
|
23
|
+
@click="curCategory = 'all'"
|
24
|
+
>
|
25
|
+
全部
|
26
|
+
</YunProjectToggleButton>
|
27
|
+
<YunProjectToggleButton
|
28
|
+
v-for="(category, key) in projects"
|
29
|
+
:key="key"
|
30
|
+
:active="key === curCategory"
|
31
|
+
@click="curCategory = key as string"
|
32
|
+
>
|
33
|
+
<span class="inline-flex">{{ category.emoji }}</span>
|
34
|
+
<span class="inline-flex">{{ category.title }}</span>
|
35
|
+
</YunProjectToggleButton>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div flex="~ wrap" justify="center">
|
39
|
+
<template v-for="(category, key) in projects" :key="key">
|
40
|
+
<YunProjectCollection
|
41
|
+
v-if="curCategory === 'all' || curCategory === key"
|
42
|
+
:title="category.title"
|
43
|
+
:projects="projects[key].collection"
|
44
|
+
/>
|
45
|
+
</template>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</template>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useMotion } from '@vueuse/motion'
|
3
|
+
import { ref } from 'vue'
|
4
|
+
|
5
|
+
const props = defineProps<{
|
6
|
+
social: {
|
7
|
+
name: string
|
8
|
+
link: string
|
9
|
+
icon: string
|
10
|
+
color: string
|
11
|
+
}
|
12
|
+
// animation
|
13
|
+
delay: number
|
14
|
+
}>()
|
15
|
+
|
16
|
+
const iconRef = ref<HTMLElement>()
|
17
|
+
useMotion(iconRef, {
|
18
|
+
initial: {
|
19
|
+
scale: 0.8,
|
20
|
+
x: 0,
|
21
|
+
y: 20,
|
22
|
+
opacity: 0,
|
23
|
+
},
|
24
|
+
enter: {
|
25
|
+
scale: 1,
|
26
|
+
x: 0,
|
27
|
+
y: 0,
|
28
|
+
opacity: 1,
|
29
|
+
transition: {
|
30
|
+
type: 'spring',
|
31
|
+
duration: 20000,
|
32
|
+
damping: 8,
|
33
|
+
delay: props.delay,
|
34
|
+
},
|
35
|
+
},
|
36
|
+
})
|
37
|
+
</script>
|
38
|
+
|
39
|
+
<template>
|
40
|
+
<div
|
41
|
+
v-tooltip="social.name"
|
42
|
+
class="size-10 inline-flex-center"
|
43
|
+
>
|
44
|
+
<a
|
45
|
+
ref="iconRef"
|
46
|
+
class="prologue-social-icon inline-flex-center w-full h-full text-white bg-$c-brand hover:bg-white hover:text-$c-brand"
|
47
|
+
rel="noopener"
|
48
|
+
:href="social.link" :title="social.name"
|
49
|
+
target="_blank"
|
50
|
+
:style="`--c-brand:${social.color}`"
|
51
|
+
>
|
52
|
+
<div
|
53
|
+
class="size-6"
|
54
|
+
:class="social.icon"
|
55
|
+
/>
|
56
|
+
</a>
|
57
|
+
</div>
|
58
|
+
</template>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useSiteConfig } from 'valaxy'
|
3
|
+
|
4
|
+
const siteConfig = useSiteConfig()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div flex="~ wrap" class="justify-center items-center mx-5">
|
9
|
+
<PrologueSocialIcon
|
10
|
+
v-for="item, i in siteConfig.social"
|
11
|
+
:key="i"
|
12
|
+
:social="item"
|
13
|
+
:delay="i * 50 + 1000"
|
14
|
+
/>
|
15
|
+
</div>
|
16
|
+
</template>
|
@@ -0,0 +1,145 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useMotion } from '@vueuse/motion'
|
3
|
+
import { ref } from 'vue'
|
4
|
+
import { cubicBezier } from '../../client/constants'
|
5
|
+
import { useThemeConfig } from '../../composables'
|
6
|
+
|
7
|
+
const themeConfig = useThemeConfig()
|
8
|
+
|
9
|
+
const showContent = ref(false)
|
10
|
+
const avatarRef = ref<HTMLElement>()
|
11
|
+
const motionInstance = useMotion(avatarRef, {
|
12
|
+
initial: {
|
13
|
+
borderRadius: '0%',
|
14
|
+
width: 'var(--total-char-height)',
|
15
|
+
height: 'var(--total-char-height)',
|
16
|
+
rotate: 135,
|
17
|
+
y: '0%',
|
18
|
+
},
|
19
|
+
enter: {
|
20
|
+
borderRadius: '50%',
|
21
|
+
rotate: 0,
|
22
|
+
y: '0%',
|
23
|
+
width: '120px',
|
24
|
+
height: '120px',
|
25
|
+
boxShadow: 'none',
|
26
|
+
transition: {
|
27
|
+
type: 'keyframes',
|
28
|
+
ease: cubicBezier.easeIn,
|
29
|
+
duration: 800,
|
30
|
+
onComplete: () => {
|
31
|
+
motionInstance.variant.value = 'leave'
|
32
|
+
showContent.value = true
|
33
|
+
},
|
34
|
+
},
|
35
|
+
},
|
36
|
+
leave: {
|
37
|
+
// y: '-50%',
|
38
|
+
boxShadow: '0 5px 100px rgba(0, 0, 0, 0.15)',
|
39
|
+
transition: {
|
40
|
+
type: 'keyframes',
|
41
|
+
ease: cubicBezier.easeInOut,
|
42
|
+
duration: 500,
|
43
|
+
},
|
44
|
+
},
|
45
|
+
})
|
46
|
+
|
47
|
+
const introRef = ref<HTMLElement>()
|
48
|
+
useMotion(introRef, {
|
49
|
+
initial: {
|
50
|
+
y: '0%',
|
51
|
+
},
|
52
|
+
enter: {
|
53
|
+
y: 'calc(-50%)',
|
54
|
+
transition: {
|
55
|
+
delay: 800,
|
56
|
+
type: 'keyframes',
|
57
|
+
ease: cubicBezier.easeInOut,
|
58
|
+
duration: 400,
|
59
|
+
},
|
60
|
+
},
|
61
|
+
})
|
62
|
+
</script>
|
63
|
+
|
64
|
+
<template>
|
65
|
+
<div
|
66
|
+
flex="~ col"
|
67
|
+
class="yun-square-container items-center justify-center text-center"
|
68
|
+
:class="{
|
69
|
+
'size-$total-char-height': !showContent,
|
70
|
+
}"
|
71
|
+
>
|
72
|
+
<slot />
|
73
|
+
|
74
|
+
<div
|
75
|
+
ref="introRef"
|
76
|
+
flex="~ col center"
|
77
|
+
class="info relative"
|
78
|
+
>
|
79
|
+
<div
|
80
|
+
ref="avatarRef" flex="~ col" class="absolute yun-square bg-$va-c-text square-rotate w-full"
|
81
|
+
>
|
82
|
+
<LineBurstEffects
|
83
|
+
class="absolute top-0 left-0 right-0 bottom-0 size-full scale-200"
|
84
|
+
:duration="800"
|
85
|
+
/>
|
86
|
+
<YunAuthorAvatar />
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div
|
90
|
+
v-if="showContent"
|
91
|
+
v-motion
|
92
|
+
:initial="{
|
93
|
+
opacity: 0,
|
94
|
+
y: '0',
|
95
|
+
}"
|
96
|
+
:enter="{
|
97
|
+
opacity: 1,
|
98
|
+
y: 'calc(50% + 60px)',
|
99
|
+
transition: {
|
100
|
+
type: 'keyframes',
|
101
|
+
ease: cubicBezier.easeInOut,
|
102
|
+
duration: 400,
|
103
|
+
},
|
104
|
+
}"
|
105
|
+
>
|
106
|
+
<YunAuthorName class="mt-3" />
|
107
|
+
<YunAuthorIntro />
|
108
|
+
|
109
|
+
<YunDivider />
|
110
|
+
|
111
|
+
<div flex="~ col" class="gap-2 items-center justify-center">
|
112
|
+
<YunSiteTitle />
|
113
|
+
<YunSiteSubtitle />
|
114
|
+
<YunSiteDescription />
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<YunDivider />
|
118
|
+
|
119
|
+
<div
|
120
|
+
class="mt-4 flex-center w-50 md:w-100 m-auto gap-2"
|
121
|
+
flex="~ wrap"
|
122
|
+
p="x-$rect-margin"
|
123
|
+
>
|
124
|
+
<YunSiteLinkItem
|
125
|
+
:page="{
|
126
|
+
name: '博客文章',
|
127
|
+
icon: 'i-ri-article-line',
|
128
|
+
url: '/posts/',
|
129
|
+
}"
|
130
|
+
/>
|
131
|
+
<slot />
|
132
|
+
<YunSiteLinkItem
|
133
|
+
v-for="item, i in themeConfig.pages"
|
134
|
+
:key="i" :page="item"
|
135
|
+
/>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
</template>
|
141
|
+
|
142
|
+
<style lang="scss">
|
143
|
+
@use 'sass:map';
|
144
|
+
@use 'valaxy-theme-yun/styles/vars.scss' as *;
|
145
|
+
</style>
|