valaxy-theme-yun 0.21.0 → 0.21.1
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/App.vue +1 -1
- package/components/ValaxyMain.vue +6 -0
- package/components/YunFullscreenMenu.vue +10 -11
- package/components/YunPostCard.vue +15 -3
- package/components/menu/YunNavMenuItem.vue +4 -9
- package/components/site/YunSiteTitle.vue +1 -1
- package/components/theme/nimbo/YunNimboNavMenu.vue +2 -2
- package/package.json +2 -2
package/App.vue
CHANGED
@@ -61,7 +61,7 @@ const isDev = import.meta.env.DEV
|
|
61
61
|
<YunPageHeaderGradient />
|
62
62
|
<YunNavMenu />
|
63
63
|
|
64
|
-
<YunFullscreenMenu v-if="yun.isNimbo" />
|
64
|
+
<YunFullscreenMenu v-if="yun.isNimbo && !yun.size.isSm" />
|
65
65
|
<YunStratoSidebar v-if="yun.isStrato" />
|
66
66
|
|
67
67
|
<YunFireworks v-if="themeConfig.fireworks.enable" />
|
@@ -5,11 +5,15 @@ import { onClickHref, onContentUpdated, scrollTo, usePostTitle, useSiteConfig }
|
|
5
5
|
import { computed, nextTick } from 'vue'
|
6
6
|
import { useRoute, useRouter } from 'vue-router'
|
7
7
|
import { usePostProperty } from '../composables'
|
8
|
+
import { useYunAppStore } from '../stores'
|
8
9
|
|
9
10
|
const props = defineProps<{
|
10
11
|
frontmatter: Post
|
11
12
|
data?: PageData
|
12
13
|
}>()
|
14
|
+
|
15
|
+
const yun = useYunAppStore()
|
16
|
+
|
13
17
|
const siteConfig = useSiteConfig()
|
14
18
|
|
15
19
|
const { styles, icon, color } = usePostProperty(props.frontmatter.type)
|
@@ -91,6 +95,8 @@ onContentUpdated(() => {
|
|
91
95
|
<YunComment :class="frontmatter.nav === false ? 'mt-4' : 0" />
|
92
96
|
</slot>
|
93
97
|
|
98
|
+
<YunAdBoard v-if="!yun.size.isLg" class="mt-4" />
|
99
|
+
|
94
100
|
<slot name="main-footer-before" />
|
95
101
|
<slot name="main-footer-after" />
|
96
102
|
</div>
|
@@ -14,7 +14,7 @@ const app = useAppStore()
|
|
14
14
|
<div
|
15
15
|
v-if="yunApp.fullscreenMenu.isOpen"
|
16
16
|
ref="fullscreenMenuRef"
|
17
|
-
p="t-
|
17
|
+
p="t-12 md:t-20"
|
18
18
|
class="yun-fullscreen-menu fixed left-0 right-0 bottom-0 top-0 bg-$va-c-bg-soft z-$yun-z-fullscreen-menu overflow-auto"
|
19
19
|
>
|
20
20
|
<!-- <div v-if="app.isMobile" class="flex-center gap-2">
|
@@ -22,19 +22,18 @@ const app = useAppStore()
|
|
22
22
|
<YunToggleLocale v-if="app.showToggleLocale" />
|
23
23
|
</div> -->
|
24
24
|
|
25
|
-
<
|
26
|
-
|
25
|
+
<!-- <YunFullscreenMenuList /> -->
|
26
|
+
<YunSiteInfo class="text-center" />
|
27
|
+
<YunGradientDivider class="my-2 op-20" />
|
28
|
+
<YunPostsInfo />
|
29
|
+
<YunGradientDivider class="my-2 op-20" />
|
30
|
+
<YunSocialLinks />
|
31
|
+
<YunGradientDivider class="my-2 op-20" />
|
32
|
+
<YunSidebarLinks />
|
27
33
|
|
28
|
-
<YunGradientDivider class="my-2 op-20" />
|
29
|
-
|
30
|
-
<YunPostsInfo />
|
31
|
-
</div>
|
32
34
|
<YunGradientDivider v-if="!yunApp.size.isLg" class="my-2 op-20" />
|
33
35
|
|
34
|
-
<
|
35
|
-
|
36
|
-
<YunGradientDivider v-if="!yunApp.size.isLg" class="my-2 op-20" />
|
37
|
-
<div v-if="!yunApp.size.isLg" class="flex-center">
|
36
|
+
<div class="flex-center">
|
38
37
|
<YunConfig />
|
39
38
|
</div>
|
40
39
|
</div>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import type { Post } from 'valaxy'
|
3
|
+
import { computed, ref } from 'vue'
|
3
4
|
import { useI18n } from 'vue-i18n'
|
4
5
|
import { usePostProperty } from '../composables'
|
5
6
|
|
@@ -9,7 +10,15 @@ const props = defineProps<{
|
|
9
10
|
|
10
11
|
const { t } = useI18n()
|
11
12
|
|
12
|
-
const { icon, styles } = usePostProperty(props.post.type)
|
13
|
+
const { icon, styles, color } = usePostProperty(props.post.type)
|
14
|
+
|
15
|
+
const gradientClasses = ref('bg-gradient-to-r gradient-text from-$va-c-primary to-$va-c-primary-lighter')
|
16
|
+
const postTitleClass = computed(() => {
|
17
|
+
if (color) {
|
18
|
+
return ''
|
19
|
+
}
|
20
|
+
return props.post.postTitleClass || gradientClasses.value
|
21
|
+
})
|
13
22
|
</script>
|
14
23
|
|
15
24
|
<template>
|
@@ -35,9 +44,12 @@ const { icon, styles } = usePostProperty(props.post.type)
|
|
35
44
|
class="post-title-link cursor-pointer"
|
36
45
|
:to="post.path || ''"
|
37
46
|
m="t-3"
|
38
|
-
:class="
|
47
|
+
:class="postTitleClass"
|
39
48
|
>
|
40
|
-
<div
|
49
|
+
<div
|
50
|
+
class="flex-center title text-2xl"
|
51
|
+
text="center" font="serif black"
|
52
|
+
>
|
41
53
|
<div v-if="post.type" class="inline-flex" m="r-1" :class="icon" />
|
42
54
|
<span>{{ post.title }}</span>
|
43
55
|
</div>
|
@@ -1,22 +1,17 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import { useRouter } from 'vue-router'
|
3
|
-
|
4
2
|
defineProps<{
|
5
3
|
icon: string
|
6
4
|
to?: string
|
7
5
|
}>()
|
8
|
-
|
9
|
-
const router = useRouter()
|
10
6
|
</script>
|
11
7
|
|
12
8
|
<template>
|
13
|
-
<
|
14
|
-
class="size-12 inline-flex-center cursor-pointer z-$yun-z-nav-menu"
|
15
|
-
text="$va-c-text"
|
9
|
+
<AppLink
|
10
|
+
class="size-12 inline-flex-center cursor-pointer z-$yun-z-nav-menu text-$va-c-text"
|
16
11
|
hover="bg-white/80 dark:bg-black/80 op-100"
|
17
12
|
op-80
|
18
|
-
|
13
|
+
:to="to"
|
19
14
|
>
|
20
15
|
<div class="size-6" :class="icon" />
|
21
|
-
</
|
16
|
+
</AppLink>
|
22
17
|
</template>
|
@@ -6,7 +6,7 @@ import { useRouter } from 'vue-router'
|
|
6
6
|
const router = useRouter()
|
7
7
|
const siteConfig = useSiteConfig()
|
8
8
|
|
9
|
-
const classes = ref('site-name
|
9
|
+
const classes = ref('site-name text-lg leading-loose bg-gradient-to-r gradient-text from-#1e3c72 to-dark dark:(from-#66a6ff to-blue-500)')
|
10
10
|
</script>
|
11
11
|
|
12
12
|
<template>
|
@@ -48,7 +48,7 @@ const app = useAppStore()
|
|
48
48
|
<!-- -->
|
49
49
|
<div class="inline-flex justify-start items-center flex-1">
|
50
50
|
<ValaxyHamburger
|
51
|
-
v-if="!yunApp.size.
|
51
|
+
v-if="!yunApp.size.isSm"
|
52
52
|
:active="yunApp.fullscreenMenu.isOpen"
|
53
53
|
class="menu-btn sidebar-toggle leading-4 size-12"
|
54
54
|
inline-flex cursor="pointer"
|
@@ -57,7 +57,7 @@ const app = useAppStore()
|
|
57
57
|
@click="yunApp.fullscreenMenu.toggle()"
|
58
58
|
/>
|
59
59
|
<YunNavMenuItem icon="i-ri-home-4-line" to="/" />
|
60
|
-
<template v-if="yunApp.size.
|
60
|
+
<template v-if="yunApp.size.isSm">
|
61
61
|
<YunNavMenuItem
|
62
62
|
icon="i-ri-article-line" to="/posts/"
|
63
63
|
title="博客文章"
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.21.
|
4
|
+
"version": "0.21.1",
|
5
5
|
"author": {
|
6
6
|
"email": "me@yunyoujun.cn",
|
7
7
|
"name": "YunYouJun",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"devDependencies": {
|
34
34
|
"@types/animejs": "^3.1.12",
|
35
35
|
"valaxy-addon-waline": "0.2.0",
|
36
|
-
"valaxy": "0.21.
|
36
|
+
"valaxy": "0.21.1"
|
37
37
|
},
|
38
38
|
"scripts": {
|
39
39
|
"release": "bumpp && pnpm publish"
|