valaxy-theme-yun 0.20.0 → 0.20.2

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.
@@ -1,9 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { useMotion } from '@vueuse/motion'
3
3
  import Popover from 'primevue/popover'
4
+ import type { ComponentInstance } from 'vue'
4
5
  import { onMounted, ref } from 'vue'
5
6
 
6
- const op = ref<typeof Popover>()
7
+ const op = ref<ComponentInstance<typeof Popover>>()
7
8
 
8
9
  const pContentRef = ref<HTMLElement>()
9
10
  const motion = useMotion(pContentRef, {
@@ -1,11 +1,14 @@
1
1
  <script lang="ts" setup>
2
+ import { useAppStore } from 'valaxy'
3
+
2
4
  // sidebar config
5
+ const app = useAppStore()
3
6
  </script>
4
7
 
5
8
  <template>
6
9
  <div>
7
10
  <YunToggleDark />
8
11
 
9
- <YunToggleLocale />
12
+ <YunToggleLocale v-if="app.showToggleLocale" />
10
13
  </div>
11
14
  </template>
@@ -1,9 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
+ import { useAppStore } from 'valaxy'
3
4
  import { useYunAppStore } from '../stores'
4
5
 
5
6
  const yunApp = useYunAppStore()
6
7
  const fullscreenMenuRef = ref<HTMLElement>()
8
+
9
+ const app = useAppStore()
7
10
  </script>
8
11
 
9
12
  <template>
@@ -16,7 +19,7 @@ const fullscreenMenuRef = ref<HTMLElement>()
16
19
  >
17
20
  <div class="flex-center gap-2">
18
21
  <YunToggleDark transition />
19
- <YunToggleLocale />
22
+ <YunToggleLocale v-if="app.showToggleLocale" />
20
23
  </div>
21
24
 
22
25
  <YunFullscreenMenuList>
@@ -42,16 +42,20 @@ useMotion(itemRef, {
42
42
  }"
43
43
  >
44
44
  <a
45
- class="yun-link-url" p="x-4 y-2" :href="link.url" :title="link.name"
45
+ class="yun-link-url" p="x-4 y-2"
46
+ :href="link.url" :title="link.name"
46
47
  alt="portrait" rel="friend" target="_blank"
47
48
  >
48
49
  <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
- >
50
+ <div class="yun-link-avatar size-16 overflow-hidden flex-center">
51
+ <img
52
+ class="size-16 object-center object-cover m-0!"
53
+ width="64" height="64"
54
+ loading="lazy"
55
+ :src="link.avatar" :alt="link.name"
56
+ @error="onError"
57
+ >
58
+ </div>
55
59
  </div>
56
60
  <div class="yun-link-info" m="l-2">
57
61
  <div class="yun-link-blog" font="serif black">{{ link.blog }}</div>
@@ -58,7 +58,6 @@ const { data } = useRandomData(props.links, props.random)
58
58
  &-avatar {
59
59
  margin: 0;
60
60
  display: inline-flex;
61
- max-width: 100%;
62
61
  border-radius: 50%;
63
62
  background-color: #fff;
64
63
  border: 1px solid var(--primary-color, gray);
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { onMounted, ref, watch } from 'vue'
3
- import { useSiteConfig } from 'valaxy'
3
+ import { useAppStore, useSiteConfig } from 'valaxy'
4
4
  import { useRoute } from 'vue-router'
5
5
  import { useYunAppStore } from '../stores'
6
6
  // import { useThemeConfig } from '../composables'
@@ -30,6 +30,8 @@ watch(() => yunApp.scrollY, () => {
30
30
  else
31
31
  playAnimation.value = false
32
32
  })
33
+
34
+ const app = useAppStore()
33
35
  </script>
34
36
 
35
37
  <template>
@@ -76,7 +78,11 @@ watch(() => yunApp.scrollY, () => {
76
78
  </template>
77
79
  </template> -->
78
80
 
79
- <YunToggleDark class="rounded-none!" />
81
+ <YunToggleLocale
82
+ v-if="yunApp.size.isSm && app.showToggleLocale"
83
+ class="rounded-none!"
84
+ />
85
+ <YunToggleDark class="rounded-none!" transition />
80
86
  <YunSearchTrigger v-if="siteConfig.search.enable" />
81
87
  </div>
82
88
  </div>
@@ -3,8 +3,9 @@
3
3
  </script>
4
4
 
5
5
  <template>
6
- <YunCard class="p-4 min-h-sm">
6
+ <YunCard class="p-4 min-h-sm" flex="~ col gap-1">
7
7
  <YunSiteInfo class="text-center" />
8
8
  <YunPostsInfo />
9
+ <YunSocialLinks />
9
10
  </YunCard>
10
11
  </template>
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import { useAppStore } from 'valaxy'
3
+ import type { SocialLink } from 'valaxy/types'
4
+ import { computed } from 'vue'
5
+
6
+ const props = defineProps<{
7
+ social: SocialLink
8
+ }>()
9
+
10
+ const appStore = useAppStore()
11
+ const color = computed(() => {
12
+ return (appStore.isDark && props.social.color === 'black') ? 'white' : props.social.color
13
+ })
14
+ </script>
15
+
16
+ <template>
17
+ <a
18
+ class="links-of-author-item yun-icon-btn"
19
+ rel="noopener" :href="social.link" :title="social.name"
20
+ target="_blank"
21
+ :style="`color:${color}`"
22
+ >
23
+ <div class="icon" :class="social.icon" />
24
+ </a>
25
+ </template>
@@ -6,9 +6,10 @@ const siteConfig = useSiteConfig()
6
6
 
7
7
  <template>
8
8
  <div class="links-of-author">
9
- <a v-for="item, i in siteConfig.social" :key="i" class="links-of-author-item yun-icon-btn" rel="noopener" :href="item.link" :title="item.name" target="_blank" :style="`color:${item.color}`">
10
- <div class="icon" :class="item.icon" />
11
- </a>
9
+ <YunSocialLinkItem
10
+ v-for="item, i in siteConfig.social" :key="i"
11
+ :social="item"
12
+ />
12
13
  </div>
13
14
  </template>
14
15
 
@@ -29,7 +29,8 @@ function toggle(e: MouseEvent) {
29
29
  <button
30
30
  class="yun-icon-btn"
31
31
  :title="themeTitle"
32
- :style="styles" @mousedown.prevent="() => { console.log('yes') }"
32
+ :style="styles"
33
+ @mousedown.prevent="() => {}"
33
34
  @click="toggle"
34
35
  >
35
36
  <div i="ri-sun-line dark:ri-moon-line" />
package/layouts/home.vue CHANGED
@@ -41,7 +41,6 @@ const showNotice = computed(() => {
41
41
  <slot>
42
42
  <RouterView />
43
43
  </slot>
44
-
45
- <YunFooter />
46
44
  </YunLayoutWrapper>
45
+ <YunFooter />
47
46
  </template>
package/node/config.ts CHANGED
@@ -4,6 +4,8 @@ import type { ThemeConfig, UserThemeConfig } from '../types'
4
4
  * Default Config
5
5
  */
6
6
  export const defaultThemeConfig: ThemeConfig = {
7
+ type: 'nimbo',
8
+
7
9
  valaxyDarkOptions: {
8
10
  circleTransition: true,
9
11
  },
@@ -92,7 +94,7 @@ export const defaultThemeConfig: ThemeConfig = {
92
94
  icon: 'i-simple-icons-notion',
93
95
  },
94
96
  'twitter': {
95
- color: '#1da1f2',
97
+ color: 'black',
96
98
  icon: 'i-ri-twitter-x-fill',
97
99
  },
98
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.0",
4
+ "version": "0.20.2",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
7
7
  "name": "YunYouJun",
@@ -24,17 +24,17 @@
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.7",
28
- "@vueuse/motion": "^2.2.5",
27
+ "@iconify-json/simple-icons": "^1.2.11",
28
+ "@vueuse/motion": "^2.2.6",
29
29
  "animejs": "^3.2.2",
30
30
  "gsap": "^3.12.5",
31
- "primevue": "^4.1.0",
32
- "radix-vue": "^1.9.7"
31
+ "primevue": "^4.2.1",
32
+ "radix-vue": "^1.9.8"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/animejs": "^3.1.12",
36
- "valaxy-addon-waline": "0.2.0",
37
- "valaxy": "0.20.0"
36
+ "valaxy": "0.20.2",
37
+ "valaxy-addon-waline": "0.2.0"
38
38
  },
39
39
  "scripts": {
40
40
  "release": "bumpp && npm publish"
package/styles/vars.scss CHANGED
@@ -14,7 +14,7 @@ $dark: () !default;
14
14
  $dark: map.merge(
15
15
  (
16
16
  "bg": red,
17
- "bg-img": none,
17
+ "bg-img": radial-gradient(circle, #171424, #000),
18
18
  "sidebar-bg-img": none,
19
19
  ),
20
20
  $dark
package/types/index.d.ts CHANGED
@@ -50,6 +50,17 @@ export interface PageProps {
50
50
  * Theme Config
51
51
  */
52
52
  export interface ThemeConfig extends DefaultTheme.Config {
53
+ /**
54
+ * Theme Type
55
+ * - v1 strato 层云 Legacy
56
+ * - v2 nimbo 雨云
57
+ * - cirro 卷云 (未来)
58
+ * - cumulo 积云 (未来)
59
+ * - alto 高云 (未来)
60
+ * @default 'nimbo'
61
+ */
62
+ type: 'strato' | 'nimbo'
63
+
53
64
  /**
54
65
  * toc title
55
66
  * @default 'On this page'
package/valaxy.config.ts CHANGED
@@ -20,7 +20,7 @@ function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
20
20
  },
21
21
 
22
22
  optimizeDeps: {
23
- include: ['gsap/dist/ScrollToPlugin'],
23
+ include: ['@ctrl/tinycolor', 'gsap/dist/ScrollToPlugin'],
24
24
  exclude: ['@docsearch/js'],
25
25
  },
26
26
  }