valaxy-theme-yun 0.23.4 → 0.23.6

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.
@@ -44,7 +44,7 @@ onMounted(async () => {
44
44
  await sleep(500)
45
45
  lineStatus.value = 'active'
46
46
  if (yun.isNimbo) {
47
- await sleep(500)
47
+ await sleep(themeConfig.value.banner.duration || 500)
48
48
  lineStatus.value = 'exit'
49
49
 
50
50
  animationStatus.value = 'prologue'
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useValaxyDark } from 'valaxy'
3
3
  import { computed } from 'vue'
4
+
4
5
  // background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
5
6
  const { isDark } = useValaxyDark()
6
7
  const gradientStyles = computed(() => {
@@ -64,11 +64,11 @@ const app = useAppStore()
64
64
  />
65
65
 
66
66
  <YunNavMenuItem
67
- v-for="item, i in themeConfig.pages"
67
+ v-for="item, i in themeConfig.nav"
68
68
  :key="i"
69
69
  :icon="item.icon"
70
- :to="item.url"
71
- :title="item.name"
70
+ :to="item.link"
71
+ :title="item.text"
72
72
  />
73
73
  </template>
74
74
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.23.4",
4
+ "version": "0.23.6",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
7
7
  "name": "YunYouJun",
@@ -24,15 +24,15 @@
24
24
  "@ctrl/tinycolor": "^4.1.0",
25
25
  "@explosions/fireworks": "^0.2.0",
26
26
  "@iconify-json/ant-design": "^1.2.5",
27
- "@iconify-json/simple-icons": "^1.2.35",
27
+ "@iconify-json/simple-icons": "^1.2.40",
28
28
  "@vueuse/motion": "^3.0.3",
29
29
  "animejs": "^4.0.2",
30
30
  "gsap": "^3.13.0",
31
- "primevue": "^4.3.4"
31
+ "primevue": "^4.3.5"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/animejs": "^3.1.13",
35
- "valaxy": "0.23.4",
35
+ "valaxy": "0.23.6",
36
36
  "valaxy-addon-waline": "0.2.1"
37
37
  },
38
38
  "scripts": {
package/types/index.d.ts CHANGED
@@ -27,6 +27,14 @@ export namespace YunTheme {
27
27
  * site-name class
28
28
  */
29
29
  siteNameClass?: string
30
+
31
+ /**
32
+ * @nimbo
33
+ * @en Banner Animation Duration
34
+ * @zh Banner 动画持续时间
35
+ * @default 500
36
+ */
37
+ duration?: number
30
38
  }
31
39
  }
32
40
 
@@ -89,6 +97,14 @@ export interface ThemeConfig extends DefaultTheme.Config {
89
97
  * 首页标语
90
98
  */
91
99
  banner: YunTheme.Banner
100
+ // /**
101
+ // * prologue
102
+ // * 开场白
103
+ // * @zh banner 之后的首页导航
104
+ // */
105
+ // prologue: {
106
+ // enable: boolean
107
+ // }
92
108
 
93
109
  /**
94
110
  * @en Background image
@@ -279,7 +295,8 @@ export interface NavItemGroup {
279
295
  items: NavItemLink[]
280
296
  }
281
297
 
282
- export type NavItem = NavItemLink | NavItemGroup
298
+ // export type NavItem = NavItemLink | NavItemGroup
299
+ export type NavItem = NavItemLink
283
300
 
284
301
  /**
285
302
  * girl
@@ -1,60 +0,0 @@
1
- <script setup lang="ts">
2
- import type { ComponentInstance } from 'vue'
3
- import { useMotion } from '@vueuse/motion'
4
- import Popover from 'primevue/popover'
5
- import { onMounted, ref } from 'vue'
6
-
7
- const op = ref<ComponentInstance<typeof Popover>>()
8
-
9
- const pContentRef = ref<HTMLElement>()
10
- const motion = useMotion(pContentRef, {
11
- initial: {
12
- opacity: 0,
13
- translateY: 30,
14
- },
15
- enter: {
16
- opacity: 1,
17
- translateY: 0,
18
- transition: {
19
- type: 'spring',
20
- duration: 200,
21
- damping: 9,
22
- },
23
- },
24
- })
25
-
26
- onMounted(() => {
27
- motion.variant.value = 'initial'
28
-
29
- // 滚动时隐藏
30
- window.addEventListener('scroll', () => {
31
- motion.variant.value = 'initial'
32
- setTimeout(() => {
33
- op.value?.hide()
34
- }, 200)
35
- })
36
- })
37
-
38
- function toggle(event: Event) {
39
- op.value?.toggle(event)
40
- motion.variant.value = op.value?.visible ? 'enter' : 'initial'
41
- }
42
- </script>
43
-
44
- <template>
45
- <YunNavMenuItem
46
- icon="i-ri-mind-map" @click="toggle"
47
- />
48
- <Popover
49
- ref="op"
50
- >
51
- <div
52
- ref="pContentRef"
53
- class="p-4 shadow-xl"
54
- bg="$va-c-bg-light"
55
- >
56
- <YunSiteInfo class="text-center" />
57
- <YunPostsInfo />
58
- </div>
59
- </Popover>
60
- </template>