valaxy-theme-yun 0.20.1 → 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,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>
@@ -47,12 +47,15 @@ useMotion(itemRef, {
47
47
  alt="portrait" rel="friend" target="_blank"
48
48
  >
49
49
  <div class="yun-link-left">
50
- <img
51
- class="yun-link-avatar w-16 h-16 aspect-ratio-1" width="64" height="64"
52
- loading="lazy"
53
- :src="link.avatar" :alt="link.name"
54
- @error="onError"
55
- >
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>
56
59
  </div>
57
60
  <div class="yun-link-info" m="l-2">
58
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/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.2",
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",
31
+ "primevue": "^4.2.1",
32
32
  "radix-vue": "^1.9.8"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/animejs": "^3.1.12",
36
- "valaxy": "0.20.1",
36
+ "valaxy": "0.20.2",
37
37
  "valaxy-addon-waline": "0.2.0"
38
38
  },
39
39
  "scripts": {
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