valaxy-theme-yun 0.20.1 → 0.20.3

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 (43) hide show
  1. package/App.vue +8 -4
  2. package/components/ValaxyMain.vue +7 -4
  3. package/components/YunAside.vue +2 -2
  4. package/components/YunBanner.vue +31 -28
  5. package/components/YunConfig.vue +4 -1
  6. package/components/YunFullscreenMenu.vue +27 -15
  7. package/components/YunFuseSearch.vue +7 -54
  8. package/components/YunLinkItem.vue +9 -6
  9. package/components/YunLinks.vue +0 -1
  10. package/components/YunNavMenu.vue +3 -118
  11. package/components/YunOverlay.vue +1 -1
  12. package/components/YunSearchBtn.vue +2 -1
  13. package/components/YunSearchTrigger.vue +2 -11
  14. package/components/YunSidebarCard.vue +5 -1
  15. package/components/YunSidebarLinks.vue +1 -1
  16. package/components/YunSiteInfo.vue +1 -1
  17. package/components/YunSocialLinkItem.vue +25 -0
  18. package/components/YunSocialLinks.vue +4 -3
  19. package/components/config/YunToggleDark.vue +2 -1
  20. package/components/layout/YunLayoutLeft.vue +1 -1
  21. package/components/layout/YunLayoutWrapper.vue +12 -2
  22. package/components/menu/YunNavMenuTitle.vue +11 -4
  23. package/components/prologue/PrologueSquare.vue +7 -5
  24. package/components/site/YunFullscreenMenuItem.vue +1 -2
  25. package/components/site/YunFullscreenMenuList.vue +7 -2
  26. package/components/theme/nimbo/YunNimboBanner.vue +0 -0
  27. package/components/theme/nimbo/YunNimboNavMenu.vue +130 -0
  28. package/components/theme/strato/YunStratoApp.vue +10 -0
  29. package/components/theme/strato/YunStratoBanner.vue +0 -0
  30. package/components/theme/strato/YunStratoNavMenu.vue +81 -0
  31. package/components/{YunSidebar.vue → theme/strato/YunStratoSidebar.vue} +19 -16
  32. package/components/ui/YunBannerCharContainer.vue +24 -0
  33. package/components/ui/YunGradientDivider.vue +24 -0
  34. package/composables/helper.ts +16 -1
  35. package/composables/useYunBanner.ts +21 -0
  36. package/layouts/collection.vue +9 -12
  37. package/layouts/collections.vue +12 -15
  38. package/layouts/home.vue +4 -1
  39. package/node/config.ts +1 -1
  40. package/package.json +5 -5
  41. package/stores/app.ts +11 -0
  42. package/styles/css-vars.scss +5 -0
  43. package/styles/vars.scss +4 -2
@@ -1,12 +1,22 @@
1
1
  <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { useYunAppStore } from '../../stores'
4
+
2
5
  // common layout
6
+
7
+ const yun = useYunAppStore()
8
+ const classes = computed(() => {
9
+ if (yun.isNimbo)
10
+ return 'mt-24 md:mt-36'
11
+ return 'mt-12'
12
+ })
3
13
  </script>
4
14
 
5
15
  <template>
6
16
  <div
7
17
  flex="~"
8
- m="t-24 md:t-36"
9
- class="w-full max-w-screen-2xl m-auto justify-center items-start gap-4"
18
+ class="w-full m-auto justify-center items-start gap-4"
19
+ :class="classes"
10
20
  >
11
21
  <slot />
12
22
  </div>
@@ -1,16 +1,23 @@
1
1
  <script setup lang="ts">
2
2
  import { useFrontmatter, useSiteConfig } from 'valaxy'
3
- import { ref, watch } from 'vue'
4
- import { useRouter } from 'vue-router'
3
+ import { computed, ref, watch } from 'vue'
4
+ import { useRoute, useRouter } from 'vue-router'
5
5
  import { useYunAppStore } from '../../stores'
6
6
 
7
7
  const yunApp = useYunAppStore()
8
8
  const fm = useFrontmatter()
9
9
  const siteConfig = useSiteConfig()
10
10
 
11
+ const route = useRoute()
11
12
  const showPostTitle = ref(false)
13
+ const showSiteTitle = computed(() => {
14
+ if (yunApp.isStrato)
15
+ return route.path === '/' ? false : yunApp.scrollY < 10
16
+ return !showPostTitle.value
17
+ })
12
18
  watch(() => yunApp.scrollY, () => {
13
- showPostTitle.value = yunApp.scrollY > 200
19
+ if (yunApp.isNimbo)
20
+ showPostTitle.value = yunApp.scrollY > 200
14
21
  })
15
22
 
16
23
  const router = useRouter()
@@ -57,7 +64,7 @@ function goToLink() {
57
64
  {{ fm.subtitle }}
58
65
  </span>
59
66
  </div>
60
- <span v-else class="font-light truncate">
67
+ <span v-if="showSiteTitle" class="font-light truncate">
61
68
  {{ siteConfig.title }}
62
69
  </span>
63
70
  </div>
@@ -56,16 +56,18 @@ const showContent = ref(false)
56
56
  <YunAuthorName class="mt-3" />
57
57
  <YunAuthorIntro />
58
58
 
59
- <YunDivider />
60
-
61
- <div flex="~ col" class="gap-2 items-center justify-center">
59
+ <div
60
+ flex="~ col"
61
+ class="gap-2 items-center justify-center"
62
+ my-4 md:my-6
63
+ py-4 md:py-6
64
+ border="t-1px b-1px black/60 dark:white/60"
65
+ >
62
66
  <YunSiteTitle />
63
67
  <YunSiteSubtitle />
64
68
  <YunSiteDescription />
65
69
  </div>
66
70
 
67
- <YunDivider />
68
-
69
71
  <div
70
72
  class="mt-4 flex-center w-64 md:w-100 m-auto gap-2"
71
73
  flex="~ wrap"
@@ -11,8 +11,7 @@ const yunApp = useYunAppStore()
11
11
 
12
12
  <template>
13
13
  <AppLink
14
- class="link-item w-full items-center justify-center md:justify-start gap-2 transition rounded text-2xl p-4 sm:(text-3xl p-6) lg:(text-4xl p-7)"
15
- inline-flex
14
+ class="inline-flex link-item items-center justify-center md:justify-start gap-2 transition rounded text-xl p-3 sm:(text-3xl p-6) lg:(text-4xl p-7 w-full)"
16
15
  :to="page.url" :title="page.name"
17
16
  :style="`color:${page.color}`"
18
17
  hover="bg-gray-100/50 dark:bg-gray-800/50"
@@ -1,14 +1,19 @@
1
1
  <script lang="ts" setup>
2
+ import { useAppStore } from 'valaxy'
2
3
  import { useThemeConfig } from '../../composables'
3
4
 
5
+ const app = useAppStore()
4
6
  const themeConfig = useThemeConfig()
5
7
  </script>
6
8
 
7
9
  <template>
8
10
  <div
9
- class="links flex-center"
10
- flex="~ col" text="left"
11
+ class="links flex-center lg:flex-col"
12
+ flex="~" text="left"
11
13
  p="x-$rect-margin"
14
+ :class="{
15
+ 'flex-wrap': app.isMobile,
16
+ }"
12
17
  >
13
18
  <slot />
14
19
  <YunFullscreenMenuItem
File without changes
@@ -0,0 +1,130 @@
1
+ <script setup lang="ts">
2
+ import { onMounted, ref, watch } from 'vue'
3
+ import { useAppStore, 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
+
34
+ const app = useAppStore()
35
+ </script>
36
+
37
+ <template>
38
+ <Transition
39
+ enter-active-class="animate-fade-in"
40
+ >
41
+ <div
42
+ v-if="showMenu"
43
+ class="yun-nav-menu z-$yun-z-nav-menu fixed bg-transparent"
44
+ border="~ solid $va-c-text"
45
+ :class="{
46
+ play: playAnimation,
47
+ }"
48
+ >
49
+ <!-- -->
50
+ <div class="inline-flex justify-start items-center flex-1">
51
+ <ValaxyHamburger
52
+ :active="yunApp.fullscreenMenu.isOpen"
53
+ class="menu-btn sidebar-toggle leading-4 size-12"
54
+ inline-flex cursor="pointer"
55
+ hover="bg-white/80 dark:bg-black/80"
56
+ z="$yun-z-menu-btn"
57
+ @click="yunApp.fullscreenMenu.toggle()"
58
+ />
59
+ <YunNavMenuItem icon="i-ri-home-4-line" to="/" />
60
+ </div>
61
+
62
+ <div class="flex flex-1 flex-center">
63
+ <YunNavMenuTitle />
64
+ </div>
65
+
66
+ <div class="inline-flex-center justify-end items-center flex-1">
67
+ <!-- <template v-if="!app.isMobile && themeConfig.nav">
68
+ <template v-for="item in themeConfig.nav" :key="item.text">
69
+ <AppLink
70
+ v-if="'link' in item"
71
+ :to="item.link"
72
+ class="menu-btn inline-flex-center p-2 transition text-$va-c-text"
73
+ inline-flex cursor="pointer"
74
+ hover="bg-white/80 dark:bg-black/80"
75
+ z="$yun-z-menu-btn"
76
+ >
77
+ {{ item.text }}
78
+ </AppLink>
79
+ <template v-else-if="'items' in item" />
80
+ </template>
81
+ </template> -->
82
+
83
+ <YunToggleLocale
84
+ v-if="yunApp.size.isSm && app.showToggleLocale"
85
+ class="rounded-none!"
86
+ />
87
+ <YunToggleDark class="rounded-none!" transition />
88
+ <YunSearchTrigger v-if="siteConfig.search.enable" />
89
+ </div>
90
+ </div>
91
+ </Transition>
92
+ </template>
93
+
94
+ <style lang="scss" scoped>
95
+ @use 'sass:map';
96
+ @use 'valaxy-theme-yun/styles/vars.scss' as *;
97
+ @use "valaxy/client/styles/mixins/index.scss" as *;
98
+
99
+ .yun-nav-menu {
100
+ // safari not support
101
+ // animation-timeline: scroll();
102
+ // animation-range: 0 calc(30vh), exit;
103
+ box-shadow: none;
104
+ display: flex;
105
+ top: var(--rect-margin);
106
+ left: var(--rect-margin);
107
+ right: var(--rect-margin);
108
+ align-items: center;
109
+ justify-content: space-between;
110
+ height: 50px;
111
+ transition: all 0.5s map.get($cubic-bezier, 'ease-in');
112
+
113
+ &.play {
114
+ top: 0;
115
+ left: 0;
116
+ right: 0;
117
+ background-color: var(--va-c-bg);
118
+ border-color: rgb(0 0 0 / 0.1);
119
+
120
+ --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));
121
+
122
+ box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow),
123
+ var(--un-shadow);
124
+ }
125
+
126
+ .vt-hamburger-top, .vt-hamburger-middle, .vt-hamburger-bottom {
127
+ background-color: var(--va-c-text);
128
+ }
129
+ }
130
+ </style>
@@ -0,0 +1,10 @@
1
+ <script setup lang="ts">
2
+ import { useCssVar } from '@vueuse/core'
3
+
4
+ const yunMT = useCssVar('--yun-margin-top')
5
+ yunMT.value = '48px'
6
+ </script>
7
+
8
+ <template>
9
+ <div />
10
+ </template>
File without changes
@@ -0,0 +1,81 @@
1
+ <script setup lang="ts">
2
+ import { computed, onMounted, ref, watch } from 'vue'
3
+ import { useAppStore, 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
+
34
+ const app = useAppStore()
35
+
36
+ const showHamburger = computed(() => {
37
+ return app.isMobile ? true : route.meta.layout === 'home'
38
+ })
39
+ </script>
40
+
41
+ <template>
42
+ <div class="fixed left-0 top-0" z="$yun-z-left-sidebar-menu">
43
+ <ValaxyHamburger
44
+ v-if="showHamburger"
45
+ :active="yunApp.leftSidebar.isOpen"
46
+ class="menu-btn sidebar-toggle leading-4 size-12 fixed"
47
+ inline-flex cursor="pointer"
48
+ hover="bg-white/80 dark:bg-black/80"
49
+ @click="yunApp.leftSidebar.toggle()"
50
+ />
51
+ <YunNavMenuItem v-else icon="i-ri-home-4-line" to="/" />
52
+ </div>
53
+
54
+ <Transition
55
+ enter-active-class="animate-fade-in"
56
+ >
57
+ <div
58
+ v-if="showMenu"
59
+ class="yun-nav-menu z-$yun-z-nav-menu fixed w-full flex justify-between items-center top-0"
60
+ :class="{
61
+ play: playAnimation,
62
+ }"
63
+ >
64
+ <!-- -->
65
+ <div class="inline-flex justify-start items-center flex-1" />
66
+
67
+ <div class="flex flex-1 flex-center">
68
+ <YunNavMenuTitle />
69
+ </div>
70
+
71
+ <div class="inline-flex flex-1 justify-end items-center">
72
+ <YunToggleLocale
73
+ v-if="yunApp.size.isSm && app.showToggleLocale"
74
+ class="rounded-none!"
75
+ />
76
+ <YunToggleDark class="rounded-none!" transition />
77
+ <YunSearchTrigger v-if="siteConfig.search.enable" />
78
+ </div>
79
+ </div>
80
+ </Transition>
81
+ </template>
@@ -1,17 +1,18 @@
1
1
  <script lang="ts" setup>
2
2
  import { ref } from 'vue'
3
- import { useYunAppStore } from '../stores'
3
+ import { useYunAppStore } from '../../../stores'
4
4
 
5
5
  defineProps<{
6
6
  showHamburger?: boolean
7
7
  }>()
8
8
 
9
- const yunStore = useYunAppStore()
9
+ const yun = useYunAppStore()
10
10
  const showOverview = ref(false)
11
11
  </script>
12
12
 
13
13
  <template>
14
- <ValaxyOverlay class="md:hidden" :show="yunStore.leftSidebar.isOpen" @click="yunStore.leftSidebar.toggle()" />
14
+ <!-- class="md:hidden" -->
15
+ <YunOverlay :show="yun.leftSidebar.isOpen" @click="yun.leftSidebar.toggle()" />
15
16
 
16
17
  <!-- <ValaxyHamburger
17
18
  :active="yunStore.leftSidebar.isOpen"
@@ -22,12 +23,14 @@ const showOverview = ref(false)
22
23
  /> -->
23
24
 
24
25
  <aside
25
- class="va-card transition sidebar fixed inset-y-0 left-0 overflow-y-auto"
26
+ id="yun-left-sidebar"
27
+ class="va-card transition yun-sidebar fixed inset-y-0 left-0 overflow-y-auto"
26
28
  :class="{
27
- 'open': yunStore.leftSidebar.isOpen,
29
+ 'open': yun.leftSidebar.isOpen,
28
30
  'md:translate-x-0': !showHamburger,
29
31
  }"
30
- text="center" bg="$yun-sidebar-bg-color contain no-repeat" z="$yun-z-sidebar"
32
+ text="center" bg="$yun-sidebar-bg-color contain no-repeat"
33
+ z="$yun-z-left-sidebar"
31
34
  >
32
35
  <div v-if="$slots.default" class="sidebar-nav" m="t-6">
33
36
  <button
@@ -58,7 +61,7 @@ const showOverview = ref(false)
58
61
  @use 'sass:map';
59
62
  @use 'valaxy-theme-yun/styles/vars.scss' as *;
60
63
 
61
- .sidebar {
64
+ #yun-left-sidebar {
62
65
  width: calc(100vw - 64px);
63
66
  max-width: var(--va-sidebar-width);
64
67
  background-image: var(--yun-sidebar-bg-img);
@@ -71,17 +74,17 @@ const showOverview = ref(false)
71
74
  &.open {
72
75
  transform: translateX(0);
73
76
  }
74
- }
75
-
76
- .sidebar-nav {
77
- .sidebar-nav-item {
78
- color: var(--va-c-primary);
79
- border: 1px solid var(--va-c-primary);
80
77
 
81
- &.active {
78
+ .sidebar-nav {
79
+ .sidebar-nav-item {
80
+ color: var(--va-c-primary);
82
81
  border: 1px solid var(--va-c-primary);
83
- color: white;
84
- background-color: var(--va-c-primary);
82
+
83
+ &.active {
84
+ border: 1px solid var(--va-c-primary);
85
+ color: white;
86
+ background-color: var(--va-c-primary);
87
+ }
85
88
  }
86
89
  }
87
90
  }
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { CSSProperties } from 'vue'
3
+
4
+ defineProps<{
5
+ title: string
6
+ chars: number[]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <div class="banner-char-container">
12
+ <div v-for="c, i in title" :key="i" class="char-box">
13
+ <span
14
+ :class="[i % 2 !== 0 ? 'char-right' : 'char-left']" :style="{
15
+ '--banner-char-size': `${chars[i]}rem`,
16
+ } as CSSProperties"
17
+ >
18
+ <span class="char">
19
+ {{ c }}
20
+ </span>
21
+ </span>
22
+ </div>
23
+ </div>
24
+ </template>
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div class="yun-gradient-line" />
3
+ </template>
4
+
5
+ <style lang="scss">
6
+ .yun-gradient-line {
7
+ --c-end: rgba(0 0 0 / 0);
8
+ --c-mid: rgba(0 0 0 / 1);
9
+ }
10
+
11
+ .dark {
12
+ .yun-gradient-line {
13
+ --c-end: rgba(255 255 255 / 0);
14
+ --c-mid: rgba(255 255 255 / 1);
15
+ }
16
+ }
17
+
18
+ /* stylelint-disable-next-line no-duplicate-selectors */
19
+ .yun-gradient-line {
20
+ width: 100%;
21
+ height: 1px;
22
+ background: linear-gradient(to right, var(--c-end) 0%, var(--c-mid) 50%, var(--c-end) 100%);
23
+ }
24
+ </style>
@@ -1,5 +1,5 @@
1
1
  import { ref, watch } from 'vue'
2
- import { isClient } from '@vueuse/core'
2
+ import { isClient, useEventListener } from '@vueuse/core'
3
3
 
4
4
  /**
5
5
  * fetch data from source, and random
@@ -25,3 +25,18 @@ export function useRandomData<T>(source: string | T[], random = false) {
25
25
  data,
26
26
  }
27
27
  }
28
+
29
+ export function useHotKey(key: string, callback: () => void) {
30
+ const isHotKeyActive = ref(false)
31
+
32
+ function handleHotKey(event: KeyboardEvent) {
33
+ if (event.key.toLowerCase() === key.toLowerCase() && (event.metaKey || event.ctrlKey)) {
34
+ event.preventDefault()
35
+ callback()
36
+ }
37
+ }
38
+
39
+ useEventListener('keydown', handleHotKey)
40
+
41
+ return { isHotKeyActive }
42
+ }
@@ -0,0 +1,21 @@
1
+ import { computed } from 'vue'
2
+ import { random } from 'valaxy'
3
+ import type { YunTheme } from '../types'
4
+
5
+ export function useYunBanner(options: YunTheme.Banner) {
6
+ const chars = computed(() => {
7
+ const arr = []
8
+ for (let i = 0; i < options.title.length; i++) {
9
+ const rn = random(1.5, 3.5)
10
+ arr.push(rn)
11
+ }
12
+ return arr
13
+ })
14
+
15
+ const totalCharHeight = computed(() => chars.value.reduce((a, b) => a + b, 0))
16
+
17
+ return {
18
+ chars,
19
+ totalCharHeight,
20
+ }
21
+ }
@@ -3,16 +3,13 @@
3
3
  </script>
4
4
 
5
5
  <template>
6
- <YunSidebar v-if="$slots['sidebar-child']">
7
- <slot name="sidebar-child" />
8
- </YunSidebar>
9
- <YunSidebar v-else />
10
-
11
- <RouterView v-slot="{ Component }">
12
- <component :is="Component">
13
- <div flex="~ wrap" gap="4">
14
- Collection
15
- </div>
16
- </component>
17
- </RouterView>
6
+ <YunLayoutWrapper>
7
+ <RouterView v-slot="{ Component }">
8
+ <component :is="Component">
9
+ <div flex="~ wrap" gap="4">
10
+ Collection
11
+ </div>
12
+ </component>
13
+ </RouterView>
14
+ </YunLayoutWrapper>
18
15
  </template>
@@ -5,19 +5,16 @@ const { collections } = useCollections()
5
5
  </script>
6
6
 
7
7
  <template>
8
- <YunSidebar v-if="$slots['sidebar-child']">
9
- <slot name="sidebar-child" />
10
- </YunSidebar>
11
- <YunSidebar v-else />
12
-
13
- <RouterView v-slot="{ Component }">
14
- <component :is="Component">
15
- <div flex="~ wrap" gap="4">
16
- <YunCollectionItem
17
- v-for="collection in collections" :key="collection.id"
18
- :collection="collection"
19
- />
20
- </div>
21
- </component>
22
- </RouterView>
8
+ <YunLayoutWrapper>
9
+ <RouterView v-slot="{ Component }">
10
+ <component :is="Component">
11
+ <div flex="~ wrap" gap="4">
12
+ <YunCollectionItem
13
+ v-for="collection in collections" :key="collection.id"
14
+ :collection="collection"
15
+ />
16
+ </div>
17
+ </component>
18
+ </RouterView>
19
+ </YunLayoutWrapper>
23
20
  </template>
package/layouts/home.vue CHANGED
@@ -2,6 +2,9 @@
2
2
  import { computed } from 'vue'
3
3
  import { useRoute } from 'vue-router'
4
4
  import { useThemeConfig } from '../composables'
5
+ import { useYunAppStore } from '../stores'
6
+
7
+ const yun = useYunAppStore()
5
8
 
6
9
  const route = useRoute()
7
10
  const themeConfig = useThemeConfig()
@@ -24,7 +27,7 @@ const showNotice = computed(() => {
24
27
  <template v-if="!isPage">
25
28
  <YunBanner />
26
29
  <YunSay v-if="themeConfig.say.enable" w="full" />
27
- <YunPrologue class="absolute left-0 top-0 right-0 bottom-0" />
30
+ <YunPrologue v-if="yun.isNimbo" class="absolute left-0 top-0 right-0 bottom-0" />
28
31
  </template>
29
32
 
30
33
  <YunNotice
package/node/config.ts CHANGED
@@ -94,7 +94,7 @@ export const defaultThemeConfig: ThemeConfig = {
94
94
  icon: 'i-simple-icons-notion',
95
95
  },
96
96
  'twitter': {
97
- color: '#1da1f2',
97
+ color: 'black',
98
98
  icon: 'i-ri-twitter-x-fill',
99
99
  },
100
100
  'wechat': {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.20.1",
4
+ "version": "0.20.3",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
7
7
  "name": "YunYouJun",
@@ -24,16 +24,16 @@
24
24
  "@ctrl/tinycolor": "^4.1.0",
25
25
  "@explosions/fireworks": "^0.1.0",
26
26
  "@iconify-json/ant-design": "^1.2.2",
27
- "@iconify-json/simple-icons": "^1.2.10",
27
+ "@iconify-json/simple-icons": "^1.2.11",
28
28
  "@vueuse/motion": "^2.2.6",
29
29
  "animejs": "^3.2.2",
30
30
  "gsap": "^3.12.5",
31
- "primevue": "^4.1.1",
32
- "radix-vue": "^1.9.8"
31
+ "primevue": "^4.2.1",
32
+ "radix-vue": "^1.9.9"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/animejs": "^3.1.12",
36
- "valaxy": "0.20.1",
36
+ "valaxy": "0.20.3",
37
37
  "valaxy-addon-waline": "0.2.0"
38
38
  },
39
39
  "scripts": {
package/stores/app.ts CHANGED
@@ -1,8 +1,16 @@
1
1
  import { acceptHMRUpdate, defineStore } from 'pinia'
2
2
  import { isClient, useScroll, useToggle } from '@vueuse/core'
3
3
  import { useScreenSize } from 'valaxy'
4
+ import { computed } from 'vue'
5
+ import { useThemeConfig } from '../composables'
4
6
 
5
7
  export const useYunAppStore = defineStore('yun-app', () => {
8
+ const themeConfig = useThemeConfig()
9
+ // v1 Theme
10
+ const isStrato = computed(() => themeConfig.value.type === 'strato')
11
+ // v2 Theme
12
+ const isNimbo = computed(() => themeConfig.value.type === 'nimbo')
13
+
6
14
  // 左侧边栏
7
15
  const [isLeftSidebarOpen, toggleLeftSidebar] = useToggle()
8
16
  // 右侧边栏
@@ -28,6 +36,9 @@ export const useYunAppStore = defineStore('yun-app', () => {
28
36
  toggle: toggleFullscreenMenu,
29
37
  },
30
38
  scrollY: isClient ? useScroll(window).y : 0,
39
+
40
+ isStrato,
41
+ isNimbo,
31
42
  }
32
43
  })
33
44