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.
Files changed (120) hide show
  1. package/App.vue +30 -4
  2. package/bump.config.ts +7 -0
  3. package/client/constants/index.ts +13 -0
  4. package/components/ValaxyMain.vue +47 -58
  5. package/components/YunAdBoard.vue +4 -0
  6. package/components/YunAlbum.vue +13 -3
  7. package/components/YunAlbumList.vue +5 -11
  8. package/components/YunAside.vue +66 -43
  9. package/components/YunBackToTop.vue +11 -4
  10. package/components/YunBanner.vue +31 -15
  11. package/components/YunBg.vue +2 -0
  12. package/components/YunCard.vue +5 -1
  13. package/components/YunCategories.vue +15 -34
  14. package/components/YunCategory.vue +57 -40
  15. package/components/YunCategoryChildItem.vue +49 -0
  16. package/components/YunClassifyPopover.vue +59 -0
  17. package/components/YunCloud.vue +5 -10
  18. package/components/YunConfig.vue +2 -19
  19. package/components/YunDebug.vue +47 -0
  20. package/components/YunDock.vue +223 -0
  21. package/components/YunFooter.vue +56 -4
  22. package/components/YunFullscreenMenu.vue +57 -0
  23. package/components/YunGirlItem.vue +98 -0
  24. package/components/YunGirls.vue +2 -73
  25. package/components/YunGoDown.vue +8 -15
  26. package/components/YunLayoutPostTag.vue +11 -1
  27. package/components/YunLinkItem.vue +62 -0
  28. package/components/YunLinks.vue +15 -47
  29. package/components/YunNavMenu.vue +125 -0
  30. package/components/YunOutline.vue +1 -2
  31. package/components/YunOverlay.vue +31 -0
  32. package/components/YunOverview.vue +2 -79
  33. package/components/YunPageHeader.vue +1 -1
  34. package/components/YunPagination.vue +108 -0
  35. package/components/YunPostCard.vue +32 -3
  36. package/components/YunPostCategories.vue +3 -3
  37. package/components/YunPostCollapse.vue +12 -75
  38. package/components/YunPostCollapseItem.vue +137 -0
  39. package/components/YunPostDateMeta.vue +30 -0
  40. package/components/YunPostList.vue +6 -11
  41. package/components/YunPostMeta.vue +31 -39
  42. package/components/YunPostTags.vue +2 -2
  43. package/components/YunPostsInfo.vue +41 -0
  44. package/components/YunPrologue.vue +24 -0
  45. package/components/YunSearchBtn.vue +8 -6
  46. package/components/YunSelect.vue +1 -11
  47. package/components/YunSidebar.vue +7 -4
  48. package/components/YunSidebarCard.vue +10 -0
  49. package/components/YunSidebarNav.vue +0 -1
  50. package/components/YunSiteInfo.vue +72 -0
  51. package/components/YunSponsor.vue +21 -6
  52. package/components/animation/LineBurstEffects.vue +75 -0
  53. package/components/author/YunAuthorAvatar.vue +12 -0
  54. package/components/author/YunAuthorIntro.vue +11 -0
  55. package/components/author/YunAuthorName.vue +14 -0
  56. package/components/config/YunToggleDark.vue +37 -0
  57. package/components/layout/YunLayoutLeft.vue +12 -0
  58. package/components/layout/YunLayoutRight.vue +21 -0
  59. package/components/layout/YunLayoutWrapper.vue +13 -0
  60. package/components/menu/YunNavMenuItem.vue +22 -0
  61. package/components/menu/YunNavMenuTitle.vue +86 -0
  62. package/components/menu/YunPostClassifyNavItem.vue +30 -0
  63. package/components/page/YunPageHeaderGradient.vue +38 -0
  64. package/components/project/YunProjectCard.vue +120 -0
  65. package/components/project/YunProjectCollection.vue +15 -0
  66. package/components/project/YunProjectLinkItem.vue +60 -0
  67. package/components/project/YunProjectToggleButton.vue +17 -0
  68. package/components/project/YunProjects.vue +48 -0
  69. package/components/prologue/PrologueSocialIcon.vue +58 -0
  70. package/components/prologue/PrologueSocialLinks.vue +16 -0
  71. package/components/prologue/PrologueSquare.vue +145 -0
  72. package/components/prologue/YunAEFrame.vue +138 -0
  73. package/components/prologue/YunAERect.vue +127 -0
  74. package/components/site/YunFullscreenMenuItem.vue +26 -0
  75. package/components/site/YunFullscreenMenuList.vue +19 -0
  76. package/components/site/YunSiteDescription.vue +11 -0
  77. package/components/site/YunSiteLinkItem.vue +26 -0
  78. package/components/site/YunSiteLinks.vue +19 -0
  79. package/components/site/YunSiteSubtitle.vue +14 -0
  80. package/components/site/YunSiteTitle.vue +59 -0
  81. package/components/third/YunWalineMeta.vue +17 -5
  82. package/components/ui/YunDivider.vue +3 -0
  83. package/composables/animation.ts +33 -0
  84. package/docs/zh-CN/config.md +0 -3
  85. package/layouts/404.vue +1 -3
  86. package/layouts/albums.vue +25 -24
  87. package/layouts/archives.vue +32 -21
  88. package/layouts/categories.vue +47 -31
  89. package/layouts/default.vue +10 -5
  90. package/layouts/empty.vue +3 -0
  91. package/layouts/gallery.vue +31 -30
  92. package/layouts/home.vue +13 -12
  93. package/layouts/post.vue +23 -20
  94. package/layouts/posts.vue +10 -0
  95. package/layouts/projects.vue +25 -0
  96. package/layouts/tags.vue +51 -41
  97. package/node/config.ts +2 -5
  98. package/package.json +16 -7
  99. package/pages/page/[page].vue +3 -6
  100. package/pages/posts/index.vue +11 -0
  101. package/setup/main.ts +51 -9
  102. package/stores/app.ts +25 -3
  103. package/styles/animations/index.scss +73 -0
  104. package/styles/common/markdown.scss +4 -0
  105. package/styles/css-vars.scss +19 -1
  106. package/styles/global.scss +8 -0
  107. package/styles/index.scss +1 -0
  108. package/styles/layout/index.scss +2 -4
  109. package/styles/modules/prologue.scss +1 -0
  110. package/styles/primevue/index.ts +7 -0
  111. package/styles/primevue/tooltip.scss +55 -0
  112. package/styles/primevue/tooltip.ts +14 -0
  113. package/styles/vars.scss +23 -2
  114. package/styles/widgets/banner.scss +26 -6
  115. package/types/index.d.ts +53 -5
  116. package/types/projects.ts +48 -0
  117. package/unocss.config.ts +1 -2
  118. package/utils/animation.ts +35 -0
  119. package/utils/index.ts +2 -0
  120. package/valaxy.config.ts +1 -0
@@ -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
- <YunSidebar v-if="$slots['sidebar-child']">
43
- <slot name="sidebar-child" />
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
- <template #main-nav-before>
66
- <YunCard v-if="curCategory" class="post-collapse-container" m="t-4" w="full">
52
+ <RouterView v-slot="{ Component }">
53
+ <component :is="Component">
54
+ <template #main-header>
67
55
  <YunPageHeader
68
- :title="curCategory === 'Uncategorized' ? t('category.uncategorized') : curCategory.split('/').join(' / ')"
69
- icon="i-ri-folder-open-line"
56
+ :title="title || t('menu.categories')"
57
+ :icon="pageIcon"
58
+ :color="frontmatter.color"
59
+ :page-title-class="frontmatter.pageTitleClass"
70
60
  />
71
- <YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
72
- </YunCard>
73
- </template>
74
- </component>
75
- </RouterView>
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>
@@ -1,8 +1,13 @@
1
+ <script setup lang="ts">
2
+ // layout
3
+ </script>
4
+
1
5
  <template>
2
- <YunSidebar v-if="$slots['sidebar-child']">
3
- <slot name="sidebar-child" />
4
- </YunSidebar>
5
- <YunSidebar v-else />
6
+ <YunLayoutWrapper>
7
+ <YunLayoutLeft />
8
+ <RouterView />
9
+ <YunLayoutRight />
10
+ </YunLayoutWrapper>
6
11
 
7
- <RouterView />
12
+ <YunFooter />
8
13
  </template>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <RouterView />
3
+ </template>
@@ -29,34 +29,35 @@ const YunGallery = runtimeConfig.value.addons['valaxy-addon-lightgallery']
29
29
  </script>
30
30
 
31
31
  <template>
32
- <YunSidebar v-if="$slots['sidebar-child']">
33
- <slot name="sidebar-child" />
34
- </YunSidebar>
35
- <YunSidebar v-else />
36
-
37
- <RouterView v-slot="{ Component }">
38
- <component :is="Component">
39
- <template #main-header>
40
- <YunPageHeader
41
- :title="title || t('title.gallery')"
42
- :icon="frontmatter.icon || 'i-ri-gallery-line'"
43
- :color="frontmatter.color"
44
- :page-title-class="frontmatter.pageTitleClass"
45
- />
46
- </template>
47
- <template #main-content>
48
- <div text="center" class="yun-text-light" p="2">
49
- {{ t('counter.photos', photos.length) }}
50
- </div>
51
- <div class="page-action" text="center">
52
- <a class="yun-icon-btn" :title="t('accessibility.back')" @click="() => router.back()">
53
- <div i-ri-arrow-go-back-line />
54
- </a>
55
- </div>
56
- <ValaxyGalleryDecrypt v-if="frontmatter.encryptedPhotos" :encrypted-photos="frontmatter.encryptedPhotos" />
57
- <YunGallery v-else :photos="photos" />
58
- <RouterView />
59
- </template>
60
- </component>
61
- </RouterView>
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
- <main
23
- class="yun-main flex-center"
24
- :class="(isHome && !yunStore.leftSidebar.isOpen) ? 'pl-0' : 'md:pl-$va-sidebar-width'" flex="~ col" w="full"
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 v-if="themeConfig.banner.enable" />
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
- :content="themeConfig.notice.content" mt="4"
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
- </main>
46
+ </YunLayoutWrapper>
46
47
  </template>
package/layouts/post.vue CHANGED
@@ -41,27 +41,30 @@ useSchemaOrg(
41
41
  </script>
42
42
 
43
43
  <template>
44
- <YunSidebar v-if="$slots['sidebar-child']">
45
- <slot name="sidebar-child" />
46
- </YunSidebar>
47
- <YunSidebar v-else />
44
+ <YunLayoutWrapper>
45
+ <YunLayoutLeft />
48
46
 
49
- <RouterView v-slot="{ Component }">
50
- <component :is="Component">
51
- <template #main-header-after>
52
- <YunPostMeta :frontmatter="frontmatter" />
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
- <template #main-content-after>
58
- <YunSponsor v-if="showSponsor" m="t-6" />
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
- <template #aside-custom>
63
- <slot name="aside-custom" />
64
- </template>
65
- </component>
66
- </RouterView>
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,10 @@
1
+ <script setup lang="ts">
2
+ // not use
3
+ </script>
4
+
5
+ <template>
6
+ <div class="pt-36">
7
+ <YunPostList />
8
+ </div>
9
+ <YunFooter />
10
+ </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
- <YunSidebar v-if="$slots['sidebar-child']">
62
- <slot name="sidebar-child" />
63
- </YunSidebar>
64
- <YunSidebar v-else />
65
-
66
- <RouterView v-slot="{ Component }">
67
- <component :is="Component">
68
- <template #main-header>
69
- <YunPageHeader
70
- :title="title || t('menu.tags')"
71
- :icon="frontmatter.icon || 'i-ri-tag-line'"
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
- </div>
91
-
92
- <RouterView />
93
- </template>
94
-
95
- <template #main-nav-before>
96
- <YunCard v-if="curTag" ref="collapse" m="t-4" w="full">
97
- <YunPageHeader :title="curTag" icon="i-ri-hashtag" />
98
- <YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
99
- </YunCard>
100
- </template>
101
- </component>
102
- </RouterView>
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: true,
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-line',
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
- "version": "0.19.13",
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
- "@explosions/fireworks": "^0.0.2",
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.4",
26
- "animejs": "^3.2.2"
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": "0.19.13",
31
- "valaxy-addon-waline": "0.2.0"
39
+ "valaxy": "workspace:*",
40
+ "valaxy-addon-waline": "workspace:*"
32
41
  }
33
- }
42
+ }
@@ -1,11 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { useRoute } from 'vue-router'
3
- import { computed } from 'vue'
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 :cur-page="pageIndex" />
7
+ <YunPostList />
11
8
  </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ // TODO
3
+ </script>
4
+
5
+ <template>
6
+ <div class="mt-37 mb-4">
7
+ <YunPostList />
8
+ </div>
9
+
10
+ <YunFooter />
11
+ </template>
package/setup/main.ts CHANGED
@@ -1,21 +1,63 @@
1
- import { defineAppSetup, useAppStore } from 'valaxy'
2
- import { nextTick } from 'vue'
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 appStore = useAppStore()
15
- const yunAppStore = useYunAppStore()
16
- nextTick(() => {
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 { useDynamicLeftSidebar } from 'valaxy'
2
+ import { isClient, useScroll, useToggle } from '@vueuse/core'
3
+ import { useScreenSize } from 'valaxy'
3
4
 
4
5
  export const useYunAppStore = defineStore('yun-app', () => {
5
- const leftSidebar = useDynamicLeftSidebar()
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
- leftSidebar,
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