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
@@ -0,0 +1,57 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { useYunAppStore } from '../stores'
4
+
5
+ const yunApp = useYunAppStore()
6
+ const fullscreenMenuRef = ref<HTMLElement>()
7
+ </script>
8
+
9
+ <template>
10
+ <Transition name="slide-down">
11
+ <div
12
+ v-if="yunApp.fullscreenMenu.isOpen"
13
+ ref="fullscreenMenuRef"
14
+ p="t-20 md:t-26"
15
+ class="yun-fullscreen-menu fixed left-0 right-0 bottom-0 top-0 bg-$va-c-bg-soft z-$yun-z-fullscreen-menu overflow-auto"
16
+ >
17
+ <div class="flex-center gap-2">
18
+ <YunToggleDark transition />
19
+ <YunToggleLocale />
20
+ </div>
21
+
22
+ <YunFullscreenMenuList>
23
+ <YunFullscreenMenuItem
24
+ :page="{
25
+ name: '站点主页',
26
+ icon: 'i-ri-home-2-line',
27
+ url: '/',
28
+ }"
29
+ />
30
+ </YunFullscreenMenuList>
31
+
32
+ <div v-if="!yunApp.size.isLg" class="mt-4">
33
+ <YunSiteInfo class="text-center" />
34
+ <YunPostsInfo />
35
+ </div>
36
+ </div>
37
+ </Transition>
38
+ </template>
39
+
40
+ <style lang="scss">
41
+ @use 'sass:map';
42
+ @use 'valaxy-theme-yun/styles/vars.scss' as *;
43
+
44
+ .slide-down-enter-active,
45
+ .slide-down-leave-active {
46
+ opacity: 1;
47
+ transition: transform 0.4s map.get($cubic-bezier, 'ease-in-out'),
48
+ opacity 0.2s map.get($cubic-bezier, 'ease-in-out');
49
+ transform: translateY(0);
50
+ }
51
+
52
+ .slide-down-enter-from,
53
+ .slide-down-leave-to {
54
+ opacity: 0;
55
+ transform: translateY(-100%);
56
+ }
57
+ </style>
@@ -0,0 +1,98 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { useMotion } from '@vueuse/motion'
4
+ import { onImgError } from '../utils'
5
+ import type { GirlType } from '../types'
6
+
7
+ const props = defineProps<{
8
+ i: number
9
+ girl: GirlType
10
+ }>()
11
+
12
+ const itemRef = ref()
13
+ useMotion(itemRef, {
14
+ initial: {
15
+ opacity: 0,
16
+ translateY: 40,
17
+ },
18
+ enter: {
19
+ opacity: 1,
20
+ translateY: 0,
21
+ transition: {
22
+ type: 'spring',
23
+ duration: 400,
24
+ damping: 8,
25
+ delay: props.i * 50,
26
+ },
27
+ },
28
+ })
29
+ </script>
30
+
31
+ <template>
32
+ <li ref="itemRef" class="girl-item">
33
+ <a
34
+ class="girl-item-link"
35
+ :href="girl.url || `https://zh.moegirl.org/${girl.name}`"
36
+ :title="girl.reason" alt="portrait" target="_blank" rel="noopener"
37
+ >
38
+ <figure class="girl-info">
39
+ <img class="girl-avatar" loading="lazy" :src="girl.avatar" :alt="girl.name" :onError="onImgError">
40
+ <figcaption class="girl-name" :title="(i + 1).toString()">{{ girl.name }}</figcaption>
41
+ <figcaption class="girl-from">{{ girl.from }}</figcaption>
42
+ </figure>
43
+ </a>
44
+ </li>
45
+ </template>
46
+
47
+ <style lang="scss">
48
+ .girl-item {
49
+ display: inline-flex;
50
+ text-align: center;
51
+ justify-content: center;
52
+ width: 8rem;
53
+ margin: 1rem;
54
+
55
+ .girl {
56
+ &-info {
57
+ width: 100%;
58
+ padding: 0;
59
+ margin: 0;
60
+ }
61
+
62
+ &-avatar {
63
+ object-fit: cover;
64
+ object-position: center top;
65
+ width: 4rem;
66
+ height: 4rem;
67
+ border-radius: 50%;
68
+ padding: 0.2rem;
69
+ background-color: #fff;
70
+ box-shadow: 0 0 1rem rgb(0 0 0 / 0.12);
71
+ transition: 0.5s;
72
+
73
+ &:hover {
74
+ box-shadow: 0 0 2rem rgb(0 0 0 / 0.12);
75
+ }
76
+ }
77
+
78
+ &-name {
79
+ font-size: 0.9rem;
80
+ }
81
+
82
+ &-from {
83
+ font-size: 12px;
84
+ font-family: var(--va-font-serif);
85
+ font-weight: bold;
86
+ color: var(--va-c-text-light);
87
+
88
+ &::before {
89
+ content: '「';
90
+ }
91
+
92
+ &::after {
93
+ content: '」';
94
+ }
95
+ }
96
+ }
97
+ }
98
+ </style>
@@ -1,14 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import { onImgError } from '../utils'
3
2
  import { useRandomData } from '../composables'
4
-
5
- interface GirlType {
6
- name: string
7
- url: string
8
- avatar: string
9
- from?: string
10
- reason?: string
11
- }
3
+ import type { GirlType } from '../types'
12
4
 
13
5
  const props = defineProps<{
14
6
  girls: GirlType[] | string
@@ -21,19 +13,7 @@ const { data } = useRandomData(props.girls, props.random)
21
13
  <template>
22
14
  <div class="girls">
23
15
  <ul class="girl-items">
24
- <li v-for="girl, i in data" :key="girl.name" class="girl-item">
25
- <a
26
- class="girl-item-link"
27
- :href="girl.url || `https://zh.moegirl.org/${girl.name}`"
28
- :title="girl.reason" alt="portrait" target="_blank" rel="noopener"
29
- >
30
- <figure class="girl-info">
31
- <img class="girl-avatar" loading="lazy" :src="girl.avatar" :alt="girl.name" :onError="onImgError">
32
- <figcaption class="girl-name" :title="(i + 1).toString()">{{ girl.name }}</figcaption>
33
- <figcaption class="girl-from">{{ girl.from }}</figcaption>
34
- </figure>
35
- </a>
36
- </li>
16
+ <YunGirlItem v-for="girl, i in data" :key="i" :i="i" :girl="girl" />
37
17
  </ul>
38
18
  </div>
39
19
  </template>
@@ -53,55 +33,4 @@ const { data } = useRandomData(props.girls, props.random)
53
33
  .girls-number {
54
34
  color: white;
55
35
  }
56
-
57
- .girl-item {
58
- display: inline-flex;
59
- text-align: center;
60
- justify-content: center;
61
- width: 8rem;
62
- margin: 1rem;
63
-
64
- .girl {
65
- &-info {
66
- width: 100%;
67
- padding: 0;
68
- margin: 0;
69
- }
70
-
71
- &-avatar {
72
- object-fit: cover;
73
- object-position: center top;
74
- width: 4rem;
75
- height: 4rem;
76
- border-radius: 50%;
77
- padding: 0.2rem;
78
- background-color: #fff;
79
- box-shadow: 0 0 1rem rgba(0, 0, 0, 0.12);
80
- transition: 0.5s;
81
-
82
- &:hover {
83
- box-shadow: 0 0 2rem rgba(0, 0, 0, 0.12);
84
- }
85
- }
86
-
87
- &-name {
88
- font-size: 0.9rem;
89
- }
90
-
91
- &-from {
92
- font-size: 12px;
93
- font-family: var(--va-font-serif);
94
- font-weight: bold;
95
- color: var(--va-c-text-light);
96
-
97
- &::before {
98
- content: '「';
99
- }
100
-
101
- &::after {
102
- content: '」';
103
- }
104
- }
105
- }
106
- }
107
36
  </style>
@@ -1,18 +1,13 @@
1
1
  <script lang="ts" setup>
2
- function goDown() {
3
- const banner = document.getElementById('yun-banner')
4
- if (banner) {
5
- window.scrollTo({
6
- top: banner.clientHeight,
7
- behavior: 'smooth',
8
- })
9
- }
10
- }
2
+ import { goDown } from '../utils'
11
3
  </script>
12
4
 
13
5
  <template>
14
- <button class="go-down" aria-label="go-down" @click="goDown">
15
- <div i-ri-arrow-down-s-line inline-flex />
6
+ <button
7
+ class="go-down w-20 bottom-0 text-sm md:(bottom-2 text-40px)" aria-label="go-down"
8
+ @click="goDown"
9
+ >
10
+ <div i-ri-arrow-down-s-fill inline-flex />
16
11
  </button>
17
12
  </template>
18
13
 
@@ -23,11 +18,9 @@ function goDown() {
23
18
  justify-content: center;
24
19
  align-items: center;
25
20
  position: absolute;
26
- bottom: 1rem;
27
21
  z-index: var(--yun-z-go-down);
28
22
  animation: float 2s ease-in-out infinite;
29
- font-size: 2.5rem;
30
- color: var(--va-c-primary);
23
+ color: var(--va-c-text);
31
24
  transition: color var(--va-transition-duration);
32
25
 
33
26
  &:hover {
@@ -43,7 +36,7 @@ function goDown() {
43
36
 
44
37
  50% {
45
38
  opacity: 0.8;
46
- transform: translateY(-0.8rem);
39
+ transform: translateY(-0.3em);
47
40
  }
48
41
 
49
42
  100% {
@@ -1,12 +1,22 @@
1
1
  <script lang="ts" setup>
2
- defineProps<{
2
+ import { ref } from 'vue'
3
+ import { useYunSpringAnimation } from '../composables/animation'
4
+
5
+ const props = defineProps<{
6
+ i?: number
3
7
  title: string
4
8
  count: number
5
9
  }>()
10
+
11
+ const tagRef = ref<HTMLElement>()
12
+ useYunSpringAnimation(tagRef, {
13
+ i: props.i || 0,
14
+ })
6
15
  </script>
7
16
 
8
17
  <template>
9
18
  <span
19
+ ref="tagRef"
10
20
  inline-flex my="2" p="1"
11
21
  class="post-tag cursor-pointer items-baseline leading-4"
12
22
  >
@@ -0,0 +1,62 @@
1
+ <script setup lang="ts">
2
+ import { useMotion } from '@vueuse/motion'
3
+ import { ref } from 'vue'
4
+ import { onImgError } from '../utils'
5
+ import type { LinkType } from '../types'
6
+
7
+ const props = defineProps<{
8
+ i: number
9
+ errorImg?: string
10
+ link: LinkType
11
+ }>()
12
+
13
+ function onError(e: Event) {
14
+ onImgError(e, props.errorImg)
15
+ }
16
+
17
+ const itemRef = ref()
18
+ useMotion(itemRef, {
19
+ initial: {
20
+ opacity: 0,
21
+ translateY: 40,
22
+ },
23
+ enter: {
24
+ opacity: 1,
25
+ translateY: 0,
26
+ transition: {
27
+ type: 'spring',
28
+ duration: 400,
29
+ damping: 8,
30
+ delay: props.i * 50,
31
+ },
32
+ },
33
+ })
34
+ </script>
35
+
36
+ <template>
37
+ <li
38
+ ref="itemRef"
39
+ class="yun-link-item inline-flex"
40
+ :style="{
41
+ '--primary-color': link.color,
42
+ }"
43
+ >
44
+ <a
45
+ class="yun-link-url" p="x-4 y-2" :href="link.url" :title="link.name"
46
+ alt="portrait" rel="friend" target="_blank"
47
+ >
48
+ <div class="yun-link-left">
49
+ <img
50
+ class="yun-link-avatar" width="64" height="64" w="16" h="16"
51
+ loading="lazy"
52
+ :src="link.avatar" :alt="link.name"
53
+ @error="onError"
54
+ >
55
+ </div>
56
+ <div class="yun-link-info" m="l-2">
57
+ <div class="yun-link-blog" font="serif black">{{ link.blog }}</div>
58
+ <div class="yun-link-desc">{{ link.desc }}</div>
59
+ </div>
60
+ </a>
61
+ </li>
62
+ </template>
@@ -1,15 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { useRandomData } from '../composables'
3
- import { onImgError } from '../utils'
4
-
5
- interface LinkType {
6
- avatar: string
7
- name: string
8
- url: string
9
- color: string
10
- blog: string
11
- desc: string
12
- }
3
+ import type { LinkType } from '../types'
13
4
 
14
5
  const props = defineProps<{
15
6
  links: string | LinkType[]
@@ -21,50 +12,27 @@ const props = defineProps<{
21
12
  }>()
22
13
 
23
14
  const { data } = useRandomData(props.links, props.random)
24
-
25
- function onError(e: Event) {
26
- onImgError(e, props.errorImg)
27
- }
28
15
  </script>
29
16
 
30
17
  <template>
31
- <div class="links">
32
- <ul class="link-items">
33
- <li v-for="link, i in data" :key="i" class="link-item" :style="`--primary-color: ${link.color}`">
34
- <a class="link-url" p="x-4 y-2" :href="link.url" :title="link.name" alt="portrait" rel="friend" target="_blank">
35
- <div class="link-left">
36
- <img
37
- class="link-avatar" width="64" height="64" w="16" h="16"
38
- loading="lazy" :src="link.avatar" :alt="link.name"
39
- @error="onError"
40
- >
41
- </div>
42
- <div class="link-info" m="l-2">
43
- <div class="link-blog" font="serif black">{{ link.blog }}</div>
44
- <div class="link-desc">{{ link.desc }}</div>
45
- </div>
46
- </a>
47
- </li>
18
+ <div class="yun-links">
19
+ <ul class="yun-link-items" flex="center wrap">
20
+ <YunLinkItem
21
+ v-for="link, i in data"
22
+ :key="i"
23
+ :i="i" :link="link" :error-img="errorImg"
24
+ />
48
25
  </ul>
49
26
  </div>
50
27
  </template>
51
28
 
52
- <style lang="scss" scoped>
53
- .link-item {
54
- display: inline-flex;
55
- }
56
-
57
- .links {
58
- .link-items {
59
- display: flex;
60
- text-align: center;
61
- justify-content: center;
62
- flex-wrap: wrap;
63
-
29
+ <style lang="scss">
30
+ .yun-links {
31
+ .yun-link-items {
64
32
  padding-left: 0;
65
33
  }
66
34
 
67
- .link-url {
35
+ .yun-link-url {
68
36
  --smc-link-color: var(--primary-color);
69
37
 
70
38
  display: inline-flex;
@@ -82,7 +50,7 @@ function onError(e: Event) {
82
50
  box-shadow: 0 2px 20px var(--primary-color, gray);
83
51
  }
84
52
 
85
- .link {
53
+ .yun-link {
86
54
  &-left {
87
55
  line-height: 0;
88
56
  }
@@ -97,7 +65,7 @@ function onError(e: Event) {
97
65
  transition: 0.5s;
98
66
 
99
67
  &:hover {
100
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
68
+ box-shadow: 0 0 20px rgb(0 0 0 / 0.1);
101
69
  }
102
70
  }
103
71
 
@@ -111,7 +79,7 @@ function onError(e: Event) {
111
79
  }
112
80
  }
113
81
 
114
- .link-info {
82
+ .yun-link-info {
115
83
  display: inline-flex;
116
84
  flex-direction: column;
117
85
  justify-content: center;
@@ -0,0 +1,125 @@
1
+ <script setup lang="ts">
2
+ import { onMounted, ref, watch } from 'vue'
3
+ import { useSiteConfig } from 'valaxy'
4
+ import { useRoute } from 'vue-router'
5
+ import { useYunAppStore } from '../stores'
6
+ // import { useThemeConfig } from '../composables'
7
+
8
+ // const app = useAppStore()
9
+ const yunApp = useYunAppStore()
10
+ const siteConfig = useSiteConfig()
11
+ // const themeConfig = useThemeConfig()
12
+
13
+ const showMenu = ref(false)
14
+ const route = useRoute()
15
+ onMounted(() => {
16
+ if (route.meta.layout === 'home') {
17
+ setTimeout(() => {
18
+ showMenu.value = true
19
+ }, 600)
20
+ }
21
+ else {
22
+ showMenu.value = true
23
+ }
24
+ })
25
+
26
+ const playAnimation = ref(false)
27
+ watch(() => yunApp.scrollY, () => {
28
+ if (yunApp.scrollY > 10)
29
+ playAnimation.value = true
30
+ else
31
+ playAnimation.value = false
32
+ })
33
+ </script>
34
+
35
+ <template>
36
+ <Transition
37
+ enter-active-class="animate-fade-in"
38
+ >
39
+ <div
40
+ v-if="showMenu"
41
+ class="yun-nav-menu z-$yun-z-nav-menu"
42
+ border="~ solid $va-c-text"
43
+ :class="{
44
+ play: playAnimation,
45
+ }"
46
+ >
47
+ <!-- -->
48
+ <ValaxyHamburger
49
+ :active="yunApp.fullscreenMenu.isOpen"
50
+ class="menu-btn sidebar-toggle leading-4 size-12"
51
+ inline-flex cursor="pointer"
52
+ hover="bg-white/80 dark:bg-black/80"
53
+ z="$yun-z-menu-btn"
54
+ @click="yunApp.fullscreenMenu.toggle()"
55
+ />
56
+ <YunNavMenuItem icon="i-ri-home-4-line" to="/" />
57
+
58
+ <div class="flex flex-1 flex-center">
59
+ <YunNavMenuTitle />
60
+ </div>
61
+
62
+ <div class="inline-flex-center">
63
+ <!-- <template v-if="!app.isMobile && themeConfig.nav">
64
+ <template v-for="item in themeConfig.nav" :key="item.text">
65
+ <AppLink
66
+ v-if="'link' in item"
67
+ :to="item.link"
68
+ class="menu-btn inline-flex-center p-2 transition text-$va-c-text"
69
+ inline-flex cursor="pointer"
70
+ hover="bg-white/80 dark:bg-black/80"
71
+ z="$yun-z-menu-btn"
72
+ >
73
+ {{ item.text }}
74
+ </AppLink>
75
+ <template v-else-if="'items' in item" />
76
+ </template>
77
+ </template> -->
78
+
79
+ <YunToggleDark class="rounded-none!" />
80
+ <YunSearchTrigger v-if="siteConfig.search.enable" />
81
+ </div>
82
+ </div>
83
+ </Transition>
84
+ </template>
85
+
86
+ <style lang="scss">
87
+ @use 'sass:map';
88
+ @use 'valaxy-theme-yun/styles/vars.scss' as *;
89
+ @use "valaxy/client/styles/mixins/index.scss" as *;
90
+
91
+ .yun-nav-menu {
92
+ position: fixed;
93
+
94
+ // safari not support
95
+ // animation-timeline: scroll();
96
+ // animation-range: 0 calc(30vh), exit;
97
+ background-color: transparent;
98
+ box-shadow: none;
99
+ display: flex;
100
+ top: var(--rect-margin);
101
+ left: var(--rect-margin);
102
+ right: var(--rect-margin);
103
+ align-items: center;
104
+ justify-content: space-between;
105
+ height: 50px;
106
+ transition: all 0.5s map.get($cubic-bezier, 'ease-in');
107
+
108
+ &.play {
109
+ top: 0;
110
+ left: 0;
111
+ right: 0;
112
+ background-color: var(--va-c-bg);
113
+ border-color: rgb(0 0 0 / 0.1);
114
+
115
+ --un-shadow: var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color, rgb(0 0 0 / 0.1)), var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color, rgb(0 0 0 / 0.1));
116
+
117
+ box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow),
118
+ var(--un-shadow);
119
+ }
120
+
121
+ .vt-hamburger-top, .vt-hamburger-middle, .vt-hamburger-bottom {
122
+ background-color: var(--va-c-text);
123
+ }
124
+ }
125
+ </style>
@@ -11,9 +11,8 @@ const themeConfig = useThemeConfig()
11
11
  const container = ref()
12
12
  const marker = ref()
13
13
 
14
- useActiveAnchor(container, marker)
15
-
16
14
  const { headers, handleClick } = useOutline()
15
+ useActiveAnchor(container, marker)
17
16
  </script>
18
17
 
19
18
  <template>
@@ -0,0 +1,31 @@
1
+ <script lang="ts" setup>
2
+ withDefaults(defineProps<{
3
+ show: boolean
4
+ }>(), {
5
+ show: false,
6
+ })
7
+ </script>
8
+
9
+ <template>
10
+ <Transition name="fade">
11
+ <div v-if="show" class="yun-overlay z-$yun-z-overlay" />
12
+ </Transition>
13
+ </template>
14
+
15
+ <style lang="scss">
16
+ @use "sass:map";
17
+ @use "valaxy/client/styles/mixins/index.scss" as *;
18
+
19
+ .yun-overlay {
20
+ background-color: rgb(0 0 0 / 0.3);
21
+ position: fixed;
22
+ inset: 0;
23
+ transition: opacity 0.4s;
24
+ }
25
+
26
+ @include mobile {
27
+ .yun-overlay {
28
+ display: block;
29
+ }
30
+ }
31
+ </style>