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
package/App.vue CHANGED
@@ -1,8 +1,10 @@
1
1
  <script lang="ts" setup>
2
2
  import { useHead } from '@unhead/vue'
3
- import { useAppStore, useSiteConfig } from 'valaxy'
4
- import { onMounted } from 'vue'
3
+ import { useAppStore } from 'valaxy'
4
+ import { onMounted, watch } from 'vue'
5
+ import { useRoute } from 'vue-router'
5
6
  import { useThemeConfig } from './composables'
7
+ import { useYunAppStore } from './stores'
6
8
 
7
9
  const appStore = useAppStore()
8
10
 
@@ -26,23 +28,47 @@ useHead({
26
28
  ],
27
29
  })
28
30
 
29
- const siteConfig = useSiteConfig()
30
31
  const themeConfig = useThemeConfig()
31
32
 
32
33
  const app = useAppStore()
34
+ const yunStore = useYunAppStore()
35
+ const route = useRoute()
36
+
37
+ watch(
38
+ () => route.meta.layout,
39
+ () => {
40
+ if (route.meta.layout === 'home' || app.isMobile)
41
+ yunStore.leftSidebar.isOpen = false
42
+ else
43
+ yunStore.leftSidebar.isOpen = true
44
+ },
45
+ { immediate: true },
46
+ )
47
+
33
48
  onMounted(() => {
49
+ // for mobile vh
50
+ document.documentElement.style.setProperty('--vh', `${window.innerHeight * 0.01}px`)
34
51
  app.showLoading = false
35
52
  })
53
+
54
+ const isDev = import.meta.env.DEV
36
55
  </script>
37
56
 
38
57
  <template>
58
+ <YunDebug v-if="isDev" />
59
+
60
+ <YunPageHeaderGradient />
61
+ <YunNavMenu />
62
+ <YunFullscreenMenu />
39
63
  <YunFireworks v-if="themeConfig.fireworks.enable" />
40
64
  <slot name="bg">
41
65
  <YunBg v-if="themeConfig.bg_image.enable" />
42
66
  </slot>
43
- <YunSearchTrigger v-if="siteConfig.search.enable" />
44
67
  <Transition name="fade">
45
68
  <YunLoading v-if="app.showLoading" />
46
69
  </Transition>
47
70
  <YunBackToTop />
71
+
72
+ <!-- TODO -->
73
+ <!-- <YunDock /> -->
48
74
  </template>
package/bump.config.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'bumpp'
2
+
3
+ export default defineConfig({
4
+ commit: false,
5
+ tag: false,
6
+ push: false,
7
+ })
@@ -0,0 +1,13 @@
1
+ /**
2
+ * custom easing
3
+ */
4
+ export const cubicBezier: Record<string, [number, number, number, number]> = {
5
+ /**
6
+ * 慢速开始,然后加速
7
+ */
8
+ easeIn: [0.18, 0.66, 0.05, 0.96],
9
+ /**
10
+ * 慢速开始和结束
11
+ */
12
+ easeInOut: [0.77, 0, 0.17, 1.02],
13
+ }
@@ -37,14 +37,18 @@ onContentUpdated(() => {
37
37
  </script>
38
38
 
39
39
  <template>
40
- <main class="yun-main md:pl-$va-sidebar-width lt-md:ml-0" flex="~">
41
- <div w="full" flex="~">
42
- <slot name="main">
43
- <div class="content" :class="!aside && 'no-aside'" flex="~ col grow" w="full" p="l-4 lt-md:0">
44
- <YunCard :cover="frontmatter.cover" m="0" class="relative" :style="styles as StyleValue">
40
+ <main class="yun-main lt-md:w-full" flex="~ center">
41
+ <slot name="main">
42
+ <div
43
+ class="content w-full md:w-3xl lg:w-2xl xl:w-2xl 2xl:w-4xl" :class="{
44
+ 'no-aside': !aside,
45
+ }" flex="~ col grow"
46
+ p="lt-md:0"
47
+ >
48
+ <YunCard :cover="frontmatter.cover" m="0" class="relative" :style="styles as StyleValue">
49
+ <div class="mt-8 mb-4">
45
50
  <slot name="main-header">
46
51
  <YunPageHeader
47
- class="mb-2"
48
52
  :title="title"
49
53
  :icon="frontmatter.icon || icon"
50
54
  :color="frontmatter.color || color"
@@ -52,67 +56,52 @@ onContentUpdated(() => {
52
56
  :page-title-class="frontmatter.pageTitleClass"
53
57
  />
54
58
  </slot>
55
- <slot name="main-header-after" />
56
-
57
- <div p="x-4 b-8" class="sm:px-6 lg:px-12 xl:px-16" w="full">
58
- <slot name="main-content">
59
- <!-- <Transition appear> -->
60
- <ValaxyMd :frontmatter="frontmatter">
61
- <YunAiExcerpt v-if="frontmatter.excerpt_type === 'ai' && frontmatter.excerpt" />
62
- <YunMdTimeWarning />
63
-
64
- <slot name="main-content-md" />
65
- <slot />
66
- </ValaxyMd>
67
- <!-- </Transition> -->
68
- </slot>
69
-
70
- <slot name="main-content-after" />
71
- </div>
72
- </YunCard>
73
-
74
- <slot name="main-nav-before" />
75
-
76
- <slot name="main-nav">
77
- <YunPostNav v-if="frontmatter.nav !== false" />
78
- </slot>
79
-
80
- <slot name="main-nav-after" />
81
-
82
- <slot v-if="siteConfig.comment.enable && frontmatter.comment !== false" name="comment">
83
- <YunComment :class="frontmatter.nav === false ? 'mt-4' : 0" />
84
- </slot>
85
-
86
- <slot name="main-footer-before" />
87
- <YunFooter />
88
- <slot name="main-footer-after" />
89
- </div>
90
- </slot>
91
-
92
- <slot name="aside">
93
- <YunAside v-if="aside">
94
- <slot name="aside-custom" />
95
- </YunAside>
96
- </slot>
97
- </div>
59
+ </div>
60
+ <slot name="main-header-after" />
61
+
62
+ <div p="x-4 b-8" class="sm:px-6 lg:px-12 xl:px-16" w="full">
63
+ <slot name="main-content">
64
+ <!-- <Transition appear> -->
65
+ <ValaxyMd :frontmatter="frontmatter">
66
+ <YunAiExcerpt v-if="frontmatter.excerpt_type === 'ai' && frontmatter.excerpt" />
67
+ <YunMdTimeWarning />
68
+
69
+ <slot name="main-content-md" />
70
+ <slot />
71
+ </ValaxyMd>
72
+ <!-- </Transition> -->
73
+ </slot>
74
+
75
+ <slot name="main-content-after" />
76
+ </div>
77
+ </YunCard>
78
+
79
+ <slot name="main-nav-before" />
80
+
81
+ <slot name="main-nav">
82
+ <YunPostNav v-if="frontmatter.nav !== false" />
83
+ </slot>
84
+
85
+ <slot name="main-nav-after" />
86
+
87
+ <slot v-if="siteConfig.comment.enable && frontmatter.comment !== false" name="comment">
88
+ <YunComment :class="frontmatter.nav === false ? 'mt-4' : 0" />
89
+ </slot>
90
+
91
+ <slot name="main-footer-before" />
92
+ <slot name="main-footer-after" />
93
+ </div>
94
+ </slot>
98
95
  </main>
99
96
  </template>
100
97
 
101
98
  <style lang="scss">
102
99
  @use 'valaxy/client/styles/mixins/index.scss' as *;
103
100
 
104
- @include screen('md') {
105
- .yun-main {
106
- &.has-sidebar {
107
- padding-left: var(--va-sidebar-width);
108
- }
109
- }
110
- }
111
-
112
101
  @include screen('xl') {
113
102
  .content{
114
103
  // 8px scrollbar width
115
- max-width: calc(100vw - 2 * var(--va-sidebar-width) - 1rem - 8px);
104
+ // max-width: calc(100vw - 2 * var(--va-sidebar-width) - 1rem - 8px);
116
105
 
117
106
  &.no-aside {
118
107
  max-width: calc(100vw - var(--va-sidebar-width));
@@ -0,0 +1,4 @@
1
+ <template>
2
+ <!-- empty -->
3
+ <div />
4
+ </template>
@@ -9,7 +9,7 @@ defineProps<{
9
9
 
10
10
  <template>
11
11
  <AppLink class="yun-album-list-item" :to="album.url">
12
- <figure :title="album.desc">
12
+ <figure class="m-10" flex="~ col" :title="album.desc">
13
13
  <img
14
14
  loading="lazy"
15
15
  class="yun-album-list-cover"
@@ -17,9 +17,19 @@ defineProps<{
17
17
  :alt="album.caption"
18
18
  :on-error="onImgError"
19
19
  >
20
- <figcaption>
21
- {{ album.caption }}
20
+ <figcaption class="yun-album-caption yun-title-effects text-$va-c-text inline-flex">
21
+ {{ album.caption }}
22
22
  </figcaption>
23
23
  </figure>
24
24
  </AppLink>
25
25
  </template>
26
+
27
+ <style lang="scss">
28
+ .yun-album-caption {
29
+ position: absolute;
30
+ bottom: -3rem;
31
+ display: block;
32
+ text-align: center;
33
+ width: 100%;
34
+ }
35
+ </style>
@@ -7,8 +7,11 @@ defineProps<{
7
7
  </script>
8
8
 
9
9
  <template>
10
- <div class="yun-album-list">
11
- <YunAlbum v-for="album in albums" :key="album.url" :album="album" />
10
+ <div class="yun-album-list mb-4">
11
+ <YunAlbum
12
+ v-for="album in albums" :key="album.url"
13
+ :album="album"
14
+ />
12
15
  </div>
13
16
  </template>
14
17
 
@@ -26,7 +29,6 @@ defineProps<{
26
29
  figure {
27
30
  position: relative;
28
31
  width: 15rem;
29
- margin: 2rem;
30
32
 
31
33
  &::before {
32
34
  content: '';
@@ -53,14 +55,6 @@ defineProps<{
53
55
  object-fit: cover;
54
56
  background-color: #eee;
55
57
  }
56
-
57
- figcaption {
58
- position: absolute;
59
- bottom: -2.5rem;
60
- display: block;
61
- text-align: center;
62
- width: 100%;
63
- }
64
58
  }
65
59
  }
66
60
  }
@@ -1,73 +1,97 @@
1
1
  <script lang="ts" setup>
2
2
  import { useI18n } from 'vue-i18n'
3
- import { useAppStore, useFrontmatter } from 'valaxy'
3
+ import { useFrontmatter } from 'valaxy'
4
+ import { computed, nextTick, ref, watch } from 'vue'
5
+ import { useYunAppStore } from '../stores'
4
6
 
5
- const frontmatter = useFrontmatter()
7
+ const fm = useFrontmatter()
6
8
  const { t } = useI18n()
7
- const app = useAppStore()
8
- </script>
9
+ const yun = useYunAppStore()
9
10
 
10
- <template>
11
- <button
12
- class="xl:hidden toc-btn shadow fixed yun-icon-btn z-350"
13
- opacity="75" right="2" bottom="19"
14
- @click="app.toggleRightSidebar()"
15
- >
16
- <div i-ri-file-list-line />
17
- </button>
11
+ const show = ref(false)
12
+ const showToc = computed(() => {
13
+ return fm.value.toc !== false
14
+ })
18
15
 
19
- <ValaxyOverlay :show="app.isRightSidebarOpen" @click="app.toggleRightSidebar()" />
16
+ // aside float
17
+ const isAsideFloat = ref(false)
18
+
19
+ watch(() => [yun.rightSidebar.isOpen, yun.size.isXl], async () => {
20
+ await nextTick()
21
+ isAsideFloat.value = !yun.size.isXl
22
+ show.value = (yun.rightSidebar.isOpen || !isAsideFloat.value) && fm.value.aside !== false
23
+ }, {
24
+ immediate: true,
25
+ })
26
+ </script>
20
27
 
21
- <!-- -->
28
+ <template>
22
29
  <aside
23
- class="va-card yun-aside"
24
- :class="app.isRightSidebarOpen && 'open'" m="l-4" text="center"
30
+ flex="~ col"
31
+ class="va-card yun-aside sticky top-0 lg:top-68px min-h-sm"
32
+ :class="{
33
+ float: isAsideFloat,
34
+ show,
35
+ open: yun.rightSidebar.isOpen,
36
+ }"
37
+ text="center"
25
38
  overflow="auto"
26
39
  >
27
- <div class="aside-container" flex="~ col">
28
- <h2 v-if="frontmatter.toc !== false" m="t-6 b-2" font="serif black">
29
- {{ t('sidebar.toc') }}
30
- </h2>
31
-
32
- <YunOutline v-if="frontmatter.toc !== false" />
40
+ <Transition name="fade" :delay="100">
41
+ <div v-show="show" class="w-full" flex="~ col">
42
+ <template v-if="showToc">
43
+ <h2
44
+ m="t-6 b-2"
45
+ font="serif black"
46
+ >
47
+ {{ t('sidebar.toc') }}
48
+ </h2>
49
+ <YunOutline />
50
+ </template>
33
51
 
34
- <div class="flex-grow" />
52
+ <div class="flex-grow" />
35
53
 
36
- <div v-if="$slots.default" class="custom-container">
37
- <slot />
54
+ <div v-if="$slots.default" class="custom-container">
55
+ <slot />
56
+ </div>
38
57
  </div>
39
- </div>
58
+ </Transition>
40
59
  </aside>
41
60
  </template>
42
61
 
43
62
  <style lang="scss">
63
+ @use 'sass:map';
44
64
  @use 'valaxy/client/styles/mixins/index.scss' as *;
65
+ @use 'valaxy-theme-yun/styles/vars.scss' as *;
45
66
 
46
67
  .yun-aside {
47
- position: fixed;
48
- right: 0;
49
- top: 0;
50
- bottom: 0;
51
-
52
68
  // need fixed width
53
- width: var(--va-sidebar-width, 300px);
69
+ // width: var(--va-sidebar-width, 300px);
70
+ width: 0;
54
71
  transform: translateX(100%);
55
- transition: box-shadow var(--va-transition-duration),
56
- background-color var(--va-transition-duration), opacity 0.25s,
57
- transform var(--va-transition-duration) cubic-bezier(0.19, 1, 0.22, 1);
72
+ transition: all 0.2s map.get($cubic-bezier, 'ease-in-out');
73
+ max-height: calc(100vh - 68px);
74
+
75
+ // float panel
76
+ &.float {
77
+ position: fixed;
78
+ top: 0;
79
+ right: 0;
80
+ bottom: 0;
81
+ z-index: var(--yun-z-aside);
82
+ max-height: 100vh;
83
+ }
84
+
85
+ &.show {
86
+ width: 320px;
87
+ }
58
88
 
59
89
  &.open {
90
+ width: 320px;
60
91
  right: 0;
61
92
  display: block;
62
- z-index: 10;
63
93
  transform: translateX(0);
64
94
  }
65
-
66
- &-container {
67
- position: sticky;
68
- top: 0;
69
- height: 100vh;
70
- }
71
95
  }
72
96
 
73
97
  @include screen('xl') {
@@ -78,7 +102,6 @@ const app = useAppStore()
78
102
 
79
103
  .toc-btn {
80
104
  color: var(--va-c-primary);
81
- background-color: white;
82
105
  z-index: var(--yun-z-toc-btn);
83
106
  }
84
107
  </style>
@@ -16,12 +16,19 @@ const strokeOffset = computed(() => {
16
16
 
17
17
  <template>
18
18
  <a
19
- href="#" class="back-to-top yun-icon-btn"
20
- :class="show && 'show'" @click="backToTop"
19
+ href="#"
20
+ class="back-to-top yun-icon-btn bg-$va-c-bg-soft shadow-md"
21
+ :class="show && 'show'"
22
+ @click="backToTop"
21
23
  >
22
- <div w="8" h="8" i-ri-arrow-up-s-line />
24
+ <div class="size-8" i-ri-arrow-up-s-line />
23
25
  <svg class="progress-circle-container" viewBox="0 0 100 100">
24
- <circle :stroke-dasharray="`${circumference} ${circumference}`" :stroke-dashoffset="strokeOffset" class="progress-circle" cx="50" cy="50" :r="radius" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
26
+ <circle
27
+ :stroke-dasharray="`${circumference} ${circumference}`"
28
+ :stroke-dashoffset="strokeOffset"
29
+ stroke="currentColor" stroke-width="2" stroke-linecap="round"
30
+ class="progress-circle" cx="50" cy="50" :r="radius" fill="none"
31
+ />
25
32
  </svg>
26
33
  </a>
27
34
  </template>
@@ -6,8 +6,8 @@
6
6
  */
7
7
 
8
8
  import type { CSSProperties } from 'vue'
9
- import { computed, ref } from 'vue'
10
- import { random } from 'valaxy'
9
+ import { computed, onMounted, ref } from 'vue'
10
+ import { random, sleep } from 'valaxy'
11
11
  import { useThemeConfig } from '../composables'
12
12
 
13
13
  const themeConfig = useThemeConfig()
@@ -21,15 +21,33 @@ const chars = computed(() => {
21
21
  return arr
22
22
  })
23
23
  // height of top/bottom line
24
- const lineH = computed(() => chars.value.reduce((a, b) => a + b, 0) / 2)
24
+ const totalCharHeight = computed(() => chars.value.reduce((a, b) => a + b, 0))
25
25
 
26
26
  const bannerStyles = computed<CSSProperties>(() => {
27
27
  return {
28
- '--banner-line-height': `calc(var(--banner-height, 100vh) / 2 - ${lineH.value}rem)`,
28
+ '--total-char-height': `${totalCharHeight.value}rem`,
29
+ '--banner-line-height': `calc(var(--banner-height, 100 * var(--vh)) / 2 - ${totalCharHeight.value / 2}rem)`,
30
+ 'justify-content': 'space-between',
29
31
  }
30
32
  })
31
33
 
32
- const playExtendLine = ref(true)
34
+ const lineStatus = ref<
35
+ 'enter' | 'active' | 'exit' | ''
36
+ >('enter')
37
+ const lineStatusClass = computed(() => {
38
+ return lineStatus.value
39
+ })
40
+
41
+ const animationStatus = ref('banner')
42
+
43
+ onMounted(async () => {
44
+ await sleep(500)
45
+ lineStatus.value = 'active'
46
+ await sleep(500)
47
+ lineStatus.value = 'exit'
48
+
49
+ animationStatus.value = 'prologue'
50
+ })
33
51
  </script>
34
52
 
35
53
  <template>
@@ -37,12 +55,10 @@ const playExtendLine = ref(true)
37
55
  <div class="banner-line-container">
38
56
  <div
39
57
  class="banner-line vertical-line-top"
40
- :class="{
41
- active: playExtendLine,
42
- }"
58
+ :class="lineStatusClass"
43
59
  />
44
60
  </div>
45
- <div class="banner-char-container">
61
+ <div v-if="animationStatus === 'banner'" class="banner-char-container">
46
62
  <div v-for="c, i in themeConfig.banner.title" :key="i" class="char-box">
47
63
  <span
48
64
  :class="[i % 2 !== 0 ? 'char-right' : 'char-left']" :style="{
@@ -55,27 +71,27 @@ const playExtendLine = ref(true)
55
71
  </span>
56
72
  </div>
57
73
  </div>
74
+ <PrologueSquare v-else class="z-1" />
75
+
58
76
  <div class="banner-line-container bottom">
59
77
  <div
60
78
  class="banner-line vertical-line-bottom"
61
- :class="{
62
- active: playExtendLine,
63
- }"
79
+ :class="lineStatusClass"
64
80
  />
65
81
  </div>
66
- <YunCloud v-if="themeConfig.banner.cloud?.enable" />
67
82
  <YunGoDown />
68
83
  </div>
69
84
  </template>
70
85
 
71
86
  <style lang="scss">
72
87
  @use "../styles/widgets/banner.scss" as *;
88
+ @use "../styles/modules/prologue.scss" as *;
73
89
 
74
90
  :root {
75
91
  // banner
76
92
  --banner-line-color: black;
77
93
  --banner-char-color: black;
78
- --banner-char-bg-color: rgba(255, 255, 255, 0.5);
94
+ --banner-char-bg-color: rgb(255 255 255 / 0.5);
79
95
  --banner-char-hover-color: white;
80
96
  }
81
97
 
@@ -83,7 +99,7 @@ const playExtendLine = ref(true)
83
99
  // banner
84
100
  --banner-line-color: white;
85
101
  --banner-char-color: white;
86
- --banner-char-bg-color: rgba(0, 0, 0, 0.5);
102
+ --banner-char-bg-color: rgb(0 0 0 / 0.5);
87
103
  --banner-char-hover-color: black;
88
104
  }
89
105
  </style>
@@ -38,6 +38,8 @@ if (typeof themeConfig.value.bg_image.url !== 'undefined') {
38
38
  width: 100%;
39
39
  height: 100%;
40
40
  z-index: -1;
41
+ top: 0;
42
+ left: 0;
41
43
  background-image: var(--yun-bg-img);
42
44
  background-size: cover;
43
45
  background-position: center;
@@ -3,7 +3,11 @@ defineProps<{ cover?: string }>()
3
3
  </script>
4
4
 
5
5
  <template>
6
- <div class="yun-card flex-center rounded" flex="col" min-h="100px" bg="$va-c-bg-light">
6
+ <div
7
+ class="yun-card flex-center rounded" flex="col"
8
+ min-h="100px"
9
+ bg="$va-c-bg-light"
10
+ >
7
11
  <img
8
12
  v-if="cover"
9
13
  width="640" height="360"
@@ -24,38 +24,19 @@ const categoryList = computed(() => {
24
24
  </script>
25
25
 
26
26
  <template>
27
- <ul v-for="category in categories.values()" :key="category.name" class="category-list" m="l-4">
28
- <YunCategory
29
- :parent-key="category.name"
30
- :category="category"
31
- :level="level + 1"
32
- :collapsable="!categoryList.includes(category.name)"
33
- />
34
- </ul>
27
+ <div flex="~ col">
28
+ <ul
29
+ v-for="(category, i) in categories.values()"
30
+ :key="category.name"
31
+ class="category-list"
32
+ >
33
+ <YunCategory
34
+ :i="i"
35
+ :parent-key="category.name"
36
+ :category="category"
37
+ :level="level + 1"
38
+ :collapsable="!categoryList.includes(category.name)"
39
+ />
40
+ </ul>
41
+ </div>
35
42
  </template>
36
-
37
- <style lang="scss">
38
- .post-list-item {
39
- a {
40
- color: var(--va-c-text-lighter);
41
-
42
- &:hover {
43
- color: var(--va-c-primary);
44
- }
45
- }
46
- }
47
-
48
- .category-list-item {
49
- .folder-action {
50
- &:hover {
51
- color: var(--va-c-primary);
52
- }
53
- }
54
-
55
- .category-name {
56
- &:hover {
57
- color: var(--va-c-primary);
58
- }
59
- }
60
- }
61
- </style>