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.
- package/components/YunClassifyPopover.vue +2 -1
- package/components/YunConfig.vue +4 -1
- package/components/YunFullscreenMenu.vue +4 -1
- package/components/YunLinkItem.vue +11 -7
- package/components/YunLinks.vue +0 -1
- package/components/YunNavMenu.vue +8 -2
- package/components/YunSidebarCard.vue +2 -1
- package/components/YunSocialLinkItem.vue +25 -0
- package/components/YunSocialLinks.vue +4 -3
- package/components/config/YunToggleDark.vue +2 -1
- package/layouts/home.vue +1 -2
- package/node/config.ts +3 -1
- package/package.json +7 -7
- package/styles/vars.scss +1 -1
- package/types/index.d.ts +11 -0
- package/valaxy.config.ts +1 -1
@@ -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, {
|
package/components/YunConfig.vue
CHANGED
@@ -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"
|
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
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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>
|
package/components/YunLinks.vue
CHANGED
@@ -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
|
-
<
|
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>
|
@@ -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
|
-
<
|
10
|
-
|
11
|
-
|
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"
|
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
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: '
|
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.
|
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.
|
28
|
-
"@vueuse/motion": "^2.2.
|
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
|
32
|
-
"radix-vue": "^1.9.
|
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
|
37
|
-
"valaxy": "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
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