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
package/layouts/categories.vue
CHANGED
@@ -14,6 +14,13 @@ const route = useRoute()
|
|
14
14
|
const curCategory = computed(() => (route.query.category as string || ''))
|
15
15
|
const categories = useCategories()
|
16
16
|
|
17
|
+
const pageIcon = computed(() => {
|
18
|
+
if (!frontmatter.value.icon)
|
19
|
+
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
20
|
+
frontmatter.value.icon = 'i-ri-folder-2-line'
|
21
|
+
return frontmatter.value.icon
|
22
|
+
})
|
23
|
+
|
17
24
|
const posts = computed(() => {
|
18
25
|
const list = site.postList.filter((post) => {
|
19
26
|
if (post.categories && curCategory.value !== 'Uncategorized') {
|
@@ -39,38 +46,47 @@ useSchemaOrg([
|
|
39
46
|
</script>
|
40
47
|
|
41
48
|
<template>
|
42
|
-
<
|
43
|
-
<
|
44
|
-
</YunSidebar>
|
45
|
-
<YunSidebar v-else />
|
46
|
-
|
47
|
-
<RouterView v-slot="{ Component }">
|
48
|
-
<component :is="Component">
|
49
|
-
<template #main-header>
|
50
|
-
<YunPageHeader
|
51
|
-
:title="title || t('menu.categories')"
|
52
|
-
:icon="frontmatter.icon || 'i-ri-folder-2-line'"
|
53
|
-
:color="frontmatter.color"
|
54
|
-
:page-title-class="frontmatter.pageTitleClass"
|
55
|
-
/>
|
56
|
-
</template>
|
57
|
-
<template #main-content>
|
58
|
-
<div text="center" class="yun-text-light" p="2">
|
59
|
-
{{ t('counter.categories', Array.from(categories.children).length) }}
|
60
|
-
</div>
|
61
|
-
<YunCategories :categories="categories.children" />
|
62
|
-
<RouterView />
|
63
|
-
</template>
|
49
|
+
<YunLayoutWrapper>
|
50
|
+
<YunLayoutLeft />
|
64
51
|
|
65
|
-
|
66
|
-
|
52
|
+
<RouterView v-slot="{ Component }">
|
53
|
+
<component :is="Component">
|
54
|
+
<template #main-header>
|
67
55
|
<YunPageHeader
|
68
|
-
:title="
|
69
|
-
icon="
|
56
|
+
:title="title || t('menu.categories')"
|
57
|
+
:icon="pageIcon"
|
58
|
+
:color="frontmatter.color"
|
59
|
+
:page-title-class="frontmatter.pageTitleClass"
|
70
60
|
/>
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
61
|
+
</template>
|
62
|
+
<template #main-content>
|
63
|
+
<Transition
|
64
|
+
enter-active-class="animate-fade-in animate-duration-400"
|
65
|
+
appear
|
66
|
+
>
|
67
|
+
<div text="center" class="yun-text-light" p="2">
|
68
|
+
{{ t('counter.categories', Array.from(categories.children).length) }}
|
69
|
+
</div>
|
70
|
+
</Transition>
|
71
|
+
<YunCategories :categories="categories.children" />
|
72
|
+
<RouterView />
|
73
|
+
</template>
|
74
|
+
|
75
|
+
<template #main-nav-before>
|
76
|
+
<YunCard v-if="curCategory" class="post-collapse-container" m="t-4" w="full">
|
77
|
+
<YunPageHeader
|
78
|
+
m="t-10"
|
79
|
+
:title="curCategory === 'Uncategorized' ? t('category.uncategorized') : curCategory.split('/').join(' / ')"
|
80
|
+
icon="i-ri-folder-open-line"
|
81
|
+
/>
|
82
|
+
<YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
|
83
|
+
</YunCard>
|
84
|
+
</template>
|
85
|
+
</component>
|
86
|
+
</RouterView>
|
87
|
+
|
88
|
+
<YunLayoutRight />
|
89
|
+
</YunLayoutWrapper>
|
90
|
+
|
91
|
+
<YunFooter />
|
76
92
|
</template>
|
package/layouts/default.vue
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
// layout
|
3
|
+
</script>
|
4
|
+
|
1
5
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
+
<YunLayoutWrapper>
|
7
|
+
<YunLayoutLeft />
|
8
|
+
<RouterView />
|
9
|
+
<YunLayoutRight />
|
10
|
+
</YunLayoutWrapper>
|
6
11
|
|
7
|
-
<
|
12
|
+
<YunFooter />
|
8
13
|
</template>
|
package/layouts/gallery.vue
CHANGED
@@ -29,34 +29,35 @@ const YunGallery = runtimeConfig.value.addons['valaxy-addon-lightgallery']
|
|
29
29
|
</script>
|
30
30
|
|
31
31
|
<template>
|
32
|
-
<
|
33
|
-
<
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
32
|
+
<YunLayoutWrapper>
|
33
|
+
<YunLayoutLeft />
|
34
|
+
|
35
|
+
<RouterView v-slot="{ Component }">
|
36
|
+
<component :is="Component">
|
37
|
+
<template #main-header>
|
38
|
+
<YunPageHeader
|
39
|
+
:title="title || t('title.gallery')"
|
40
|
+
:icon="frontmatter.icon || 'i-ri-gallery-line'"
|
41
|
+
:color="frontmatter.color"
|
42
|
+
:page-title-class="frontmatter.pageTitleClass"
|
43
|
+
/>
|
44
|
+
</template>
|
45
|
+
<template #main-content>
|
46
|
+
<div text="center" class="yun-text-light" p="2">
|
47
|
+
{{ t('counter.photos', photos.length) }}
|
48
|
+
</div>
|
49
|
+
<div class="page-action" text="center">
|
50
|
+
<a class="yun-icon-btn" :title="t('accessibility.back')" @click="() => router.back()">
|
51
|
+
<div i-ri-arrow-go-back-line />
|
52
|
+
</a>
|
53
|
+
</div>
|
54
|
+
<ValaxyGalleryDecrypt v-if="frontmatter.encryptedPhotos" :encrypted-photos="frontmatter.encryptedPhotos" />
|
55
|
+
<YunGallery v-else :photos="photos" />
|
56
|
+
<RouterView />
|
57
|
+
</template>
|
58
|
+
</component>
|
59
|
+
</RouterView>
|
60
|
+
</YunLayoutWrapper>
|
61
|
+
|
62
|
+
<YunFooter />
|
62
63
|
</template>
|
package/layouts/home.vue
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { useLayout } from 'valaxy'
|
3
2
|
import { computed } from 'vue'
|
4
3
|
import { useRoute } from 'vue-router'
|
5
|
-
import { useYunAppStore } from '../stores'
|
6
4
|
import { useThemeConfig } from '../composables'
|
7
5
|
|
8
|
-
const yunStore = useYunAppStore()
|
9
6
|
const route = useRoute()
|
10
|
-
const isHome = useLayout('home')
|
11
7
|
const themeConfig = useThemeConfig()
|
12
8
|
|
13
9
|
const isPage = computed(() => route.path.startsWith('/page'))
|
@@ -19,20 +15,25 @@ const showNotice = computed(() => {
|
|
19
15
|
</script>
|
20
16
|
|
21
17
|
<template>
|
22
|
-
<
|
23
|
-
class="
|
24
|
-
:class="
|
18
|
+
<YunLayoutWrapper
|
19
|
+
class="items-center flex-col"
|
20
|
+
:class="{
|
21
|
+
'mt-0!': !isPage,
|
22
|
+
}"
|
25
23
|
>
|
26
|
-
<YunSidebar :show-hamburger="true" />
|
27
|
-
|
28
24
|
<template v-if="!isPage">
|
29
|
-
<YunBanner
|
25
|
+
<YunBanner />
|
30
26
|
<YunSay v-if="themeConfig.say.enable" w="full" />
|
27
|
+
<YunPrologue class="absolute left-0 top-0 right-0 bottom-0" />
|
31
28
|
</template>
|
32
29
|
|
33
30
|
<YunNotice
|
34
31
|
v-if="showNotice"
|
35
|
-
|
32
|
+
class="mb-10"
|
33
|
+
:class="{
|
34
|
+
'mt-4': !isPage,
|
35
|
+
}"
|
36
|
+
:content="themeConfig.notice.content"
|
36
37
|
/>
|
37
38
|
|
38
39
|
<slot name="board" />
|
@@ -42,5 +43,5 @@ const showNotice = computed(() => {
|
|
42
43
|
</slot>
|
43
44
|
|
44
45
|
<YunFooter />
|
45
|
-
</
|
46
|
+
</YunLayoutWrapper>
|
46
47
|
</template>
|
package/layouts/post.vue
CHANGED
@@ -41,27 +41,30 @@ useSchemaOrg(
|
|
41
41
|
</script>
|
42
42
|
|
43
43
|
<template>
|
44
|
-
<
|
45
|
-
<
|
46
|
-
</YunSidebar>
|
47
|
-
<YunSidebar v-else />
|
44
|
+
<YunLayoutWrapper>
|
45
|
+
<YunLayoutLeft />
|
48
46
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<YunWalineMeta />
|
54
|
-
<YunPostCategoriesAndTags :frontmatter="frontmatter" />
|
55
|
-
</template>
|
47
|
+
<RouterView v-slot="{ Component }">
|
48
|
+
<component :is="Component">
|
49
|
+
<template #main-header-after>
|
50
|
+
<YunPostMeta :frontmatter="frontmatter" />
|
56
51
|
|
57
|
-
|
58
|
-
|
59
|
-
<ValaxyCopyright v-if="frontmatter.copyright || (frontmatter.copyright !== false && siteConfig.license.enabled)" :url="url" m="y-4" />
|
60
|
-
</template>
|
52
|
+
<YunPostCategoriesAndTags class="mt-2" :frontmatter="frontmatter" />
|
53
|
+
</template>
|
61
54
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
55
|
+
<template #main-content-after>
|
56
|
+
<YunSponsor v-if="showSponsor" m="t-6" />
|
57
|
+
<ValaxyCopyright v-if="frontmatter.copyright || (frontmatter.copyright !== false && siteConfig.license.enabled)" :url="url" m="y-4" />
|
58
|
+
</template>
|
59
|
+
|
60
|
+
<template #aside-custom>
|
61
|
+
<slot name="aside-custom" />
|
62
|
+
</template>
|
63
|
+
</component>
|
64
|
+
</RouterView>
|
65
|
+
|
66
|
+
<YunLayoutRight />
|
67
|
+
</YunLayoutWrapper>
|
68
|
+
|
69
|
+
<YunFooter />
|
67
70
|
</template>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useFrontmatter, useSiteConfig } from 'valaxy'
|
3
|
+
|
4
|
+
// layout
|
5
|
+
const siteConfig = useSiteConfig()
|
6
|
+
const fm = useFrontmatter()
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<template>
|
10
|
+
<YunLayoutWrapper>
|
11
|
+
<div flex="~ col">
|
12
|
+
<YunProjects />
|
13
|
+
<!-- <YunLayoutLeft /> -->
|
14
|
+
<!-- <RouterView /> -->
|
15
|
+
<!-- <YunLayoutRight /> -->
|
16
|
+
<YunSponsor class="mt-4" />
|
17
|
+
<YunComment
|
18
|
+
v-if="siteConfig.comment.enable && fm.comment !== false"
|
19
|
+
class="max-w-4xl m-auto"
|
20
|
+
/>
|
21
|
+
</div>
|
22
|
+
</YunLayoutWrapper>
|
23
|
+
|
24
|
+
<YunFooter />
|
25
|
+
</template>
|
package/layouts/tags.vue
CHANGED
@@ -53,51 +53,61 @@ function displayTag(tag: string) {
|
|
53
53
|
}
|
54
54
|
|
55
55
|
const title = usePostTitle(frontmatter)
|
56
|
+
const tagArr = computed(() => Array.from(tags.value).sort())
|
56
57
|
|
57
58
|
// use flex to fix `overflow-wrap: break-words;` not working in Safari
|
58
59
|
</script>
|
59
60
|
|
60
61
|
<template>
|
61
|
-
<
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
:color="frontmatter.color"
|
73
|
-
:page-title-class="frontmatter.pageTitleClass"
|
74
|
-
/>
|
75
|
-
</template>
|
76
|
-
<template #main-content>
|
77
|
-
<div class="yun-text-light" text="center" p="2">
|
78
|
-
{{ t('counter.tags', Array.from(tags).length) }}
|
79
|
-
</div>
|
80
|
-
|
81
|
-
<div class="justify-center items-end" flex="~ wrap" gap="1">
|
82
|
-
<YunLayoutPostTag
|
83
|
-
v-for="[key, tag] in Array.from(tags).sort()"
|
84
|
-
:key="key"
|
85
|
-
:title="key"
|
86
|
-
:count="tag.count"
|
87
|
-
:style="getTagStyle(tag.count)"
|
88
|
-
@click="displayTag(key.toString())"
|
62
|
+
<YunLayoutWrapper>
|
63
|
+
<YunLayoutLeft />
|
64
|
+
|
65
|
+
<RouterView v-slot="{ Component }">
|
66
|
+
<component :is="Component">
|
67
|
+
<template #main-header>
|
68
|
+
<YunPageHeader
|
69
|
+
:title="title || t('menu.tags')"
|
70
|
+
:icon="frontmatter.icon || 'i-ri-tag-line'"
|
71
|
+
:color="frontmatter.color"
|
72
|
+
:page-title-class="frontmatter.pageTitleClass"
|
89
73
|
/>
|
90
|
-
</
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
74
|
+
</template>
|
75
|
+
<template #main-content>
|
76
|
+
<Transition
|
77
|
+
enter-active-class="animate-fade-in animate-duration-400"
|
78
|
+
appear
|
79
|
+
>
|
80
|
+
<div class="yun-text-light" text="center" p="2">
|
81
|
+
{{ t('counter.tags', tagArr.length) }}
|
82
|
+
</div>
|
83
|
+
</Transition>
|
84
|
+
|
85
|
+
<div class="justify-center items-end" flex="~ wrap" gap="1">
|
86
|
+
<YunLayoutPostTag
|
87
|
+
v-for="([key, tag], i) in tagArr"
|
88
|
+
:key="key"
|
89
|
+
:i="i"
|
90
|
+
:title="key"
|
91
|
+
:count="tag.count"
|
92
|
+
:style="getTagStyle(tag.count)"
|
93
|
+
@click="displayTag(key.toString())"
|
94
|
+
/>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<RouterView />
|
98
|
+
</template>
|
99
|
+
|
100
|
+
<template #main-nav-before>
|
101
|
+
<YunCard v-if="curTag" ref="collapse" m="t-4" w="full">
|
102
|
+
<YunPageHeader :title="curTag" icon="i-ri-hashtag" />
|
103
|
+
<YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
|
104
|
+
</YunCard>
|
105
|
+
</template>
|
106
|
+
</component>
|
107
|
+
</RouterView>
|
108
|
+
|
109
|
+
<YunLayoutRight />
|
110
|
+
</YunLayoutWrapper>
|
111
|
+
|
112
|
+
<YunFooter />
|
103
113
|
</template>
|
package/node/config.ts
CHANGED
@@ -15,9 +15,6 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
15
15
|
banner: {
|
16
16
|
enable: true,
|
17
17
|
title: '云游君的小站',
|
18
|
-
cloud: {
|
19
|
-
enable: true,
|
20
|
-
},
|
21
18
|
},
|
22
19
|
|
23
20
|
bg_image: {
|
@@ -27,7 +24,7 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
27
24
|
},
|
28
25
|
|
29
26
|
say: {
|
30
|
-
enable:
|
27
|
+
enable: false,
|
31
28
|
api: '',
|
32
29
|
// api: 'https://el-bot-api.elpsy.cn/api/words/young',
|
33
30
|
hitokoto: {
|
@@ -96,7 +93,7 @@ export const defaultThemeConfig: ThemeConfig = {
|
|
96
93
|
},
|
97
94
|
'twitter': {
|
98
95
|
color: '#1da1f2',
|
99
|
-
icon: 'i-ri-twitter-
|
96
|
+
icon: 'i-ri-twitter-x-fill',
|
100
97
|
},
|
101
98
|
'wechat': {
|
102
99
|
color: '#1AAD19',
|
package/package.json
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"
|
3
|
+
"type": "module",
|
4
|
+
"version": "0.20.0-beta.10",
|
4
5
|
"author": {
|
5
6
|
"email": "me@yunyoujun.cn",
|
6
7
|
"name": "YunYouJun",
|
@@ -19,15 +20,23 @@
|
|
19
20
|
},
|
20
21
|
"main": "index.ts",
|
21
22
|
"module": "index.ts",
|
23
|
+
"scripts": {
|
24
|
+
"release": "bumpp && npm publish"
|
25
|
+
},
|
22
26
|
"dependencies": {
|
23
|
-
"@
|
27
|
+
"@ctrl/tinycolor": "^4.1.0",
|
28
|
+
"@explosions/fireworks": "^0.1.0",
|
24
29
|
"@iconify-json/ant-design": "^1.2.1",
|
25
|
-
"@iconify-json/simple-icons": "^1.2.
|
26
|
-
"
|
30
|
+
"@iconify-json/simple-icons": "^1.2.5",
|
31
|
+
"@vueuse/motion": "^2.2.5",
|
32
|
+
"animejs": "^3.2.2",
|
33
|
+
"gsap": "^3.12.5",
|
34
|
+
"primevue": "^4.0.7",
|
35
|
+
"radix-vue": "^1.9.6"
|
27
36
|
},
|
28
37
|
"devDependencies": {
|
29
38
|
"@types/animejs": "^3.1.12",
|
30
|
-
"valaxy": "
|
31
|
-
"valaxy-addon-waline": "
|
39
|
+
"valaxy": "workspace:*",
|
40
|
+
"valaxy-addon-waline": "workspace:*"
|
32
41
|
}
|
33
|
-
}
|
42
|
+
}
|
package/pages/page/[page].vue
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const route = useRoute()
|
6
|
-
const pageIndex = computed(() => Number.parseInt((route.params as { page: string }).page))
|
2
|
+
// dynamic page
|
3
|
+
// layout is home
|
7
4
|
</script>
|
8
5
|
|
9
6
|
<template>
|
10
|
-
<YunPostList
|
7
|
+
<YunPostList />
|
11
8
|
</template>
|
package/setup/main.ts
CHANGED
@@ -1,21 +1,63 @@
|
|
1
|
-
import { defineAppSetup
|
2
|
-
import
|
1
|
+
import { defineAppSetup } from 'valaxy'
|
2
|
+
import '../styles/global.scss'
|
3
|
+
import { MotionPlugin } from '@vueuse/motion'
|
4
|
+
|
5
|
+
import PrimeVue from 'primevue/config'
|
6
|
+
import AnimateOnScroll from 'primevue/animateonscroll'
|
7
|
+
import StyleClass from 'primevue/styleclass'
|
8
|
+
import ToastService from 'primevue/toastservice'
|
9
|
+
|
10
|
+
import primeStyles from '../styles/primevue'
|
11
|
+
import '../styles/primevue/tooltip.scss'
|
3
12
|
import { useYunAppStore } from '../stores'
|
4
13
|
|
5
14
|
export default defineAppSetup((ctx) => {
|
6
15
|
// can do for setup
|
7
16
|
|
8
|
-
const { router } = ctx
|
17
|
+
const { router, app } = ctx
|
18
|
+
// https://motion.vueuse.org/
|
19
|
+
app.use(MotionPlugin)
|
20
|
+
// primevue
|
21
|
+
app.use(PrimeVue, {
|
22
|
+
unstyled: true,
|
23
|
+
// ripple: true,
|
24
|
+
|
25
|
+
pt: {
|
26
|
+
// tooltip: {
|
27
|
+
// arrow: {
|
28
|
+
// style: {
|
29
|
+
// borderBottomColor: 'var(--p-primary-color)',
|
30
|
+
// },
|
31
|
+
// },
|
32
|
+
// text: '!bg-primary !text-primary-contrast !font-medium',
|
33
|
+
// },
|
34
|
+
...primeStyles,
|
35
|
+
|
36
|
+
dock: {
|
37
|
+
root: 'yun-dock',
|
38
|
+
list: 'yun-dock-list',
|
39
|
+
listContainer: 'yun-dock-list-container',
|
40
|
+
item: 'yun-dock-item',
|
41
|
+
itemLink: 'yun-dock-item-link',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
})
|
45
|
+
app.directive('animateonscroll', AnimateOnScroll)
|
46
|
+
app.directive('styleclass', StyleClass)
|
47
|
+
|
48
|
+
// use floating-vue
|
49
|
+
// app.directive('tooltip', Tooltip)
|
50
|
+
app.use(ToastService)
|
51
|
+
|
52
|
+
// app.$primevue.config.ripple = true
|
53
|
+
|
9
54
|
router.afterEach(() => {
|
10
55
|
/**
|
11
56
|
* router import order
|
12
57
|
* @see https://pinia.vuejs.org/zh/core-concepts/outside-component-usage.html#single-page-applications
|
13
58
|
*/
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
if (appStore.isMobile)
|
18
|
-
yunAppStore.leftSidebar.close()
|
19
|
-
})
|
59
|
+
const app = useYunAppStore()
|
60
|
+
if (app.fullscreenMenu.isOpen)
|
61
|
+
app.fullscreenMenu.toggle()
|
20
62
|
})
|
21
63
|
})
|
package/stores/app.ts
CHANGED
@@ -1,11 +1,33 @@
|
|
1
1
|
import { acceptHMRUpdate, defineStore } from 'pinia'
|
2
|
-
import {
|
2
|
+
import { isClient, useScroll, useToggle } from '@vueuse/core'
|
3
|
+
import { useScreenSize } from 'valaxy'
|
3
4
|
|
4
5
|
export const useYunAppStore = defineStore('yun-app', () => {
|
5
|
-
|
6
|
+
// 左侧边栏
|
7
|
+
const [isLeftSidebarOpen, toggleLeftSidebar] = useToggle()
|
8
|
+
// 右侧边栏
|
9
|
+
const [isRightSidebarOpen, toggleRightSidebar] = useToggle()
|
10
|
+
// 全屏菜单
|
11
|
+
const [isFullscreenMenuOpen, toggleFullscreenMenu] = useToggle()
|
12
|
+
|
13
|
+
// init once
|
14
|
+
const size = useScreenSize()
|
6
15
|
|
7
16
|
return {
|
8
|
-
|
17
|
+
size,
|
18
|
+
leftSidebar: {
|
19
|
+
isOpen: isLeftSidebarOpen,
|
20
|
+
toggle: toggleLeftSidebar,
|
21
|
+
},
|
22
|
+
rightSidebar: {
|
23
|
+
isOpen: isRightSidebarOpen,
|
24
|
+
toggle: toggleRightSidebar,
|
25
|
+
},
|
26
|
+
fullscreenMenu: {
|
27
|
+
isOpen: isFullscreenMenuOpen,
|
28
|
+
toggle: toggleFullscreenMenu,
|
29
|
+
},
|
30
|
+
scrollY: isClient ? useScroll(window).y : 0,
|
9
31
|
}
|
10
32
|
})
|
11
33
|
|