feat(theme-yun): add custom config nav instead of same pages

This commit is contained in:
YunYouJun 2025-06-08 10:54:12 +08:00
parent 201e90184f
commit 4032b51627
3 changed files with 12 additions and 16 deletions

View File

@ -1,8 +1,8 @@
import { defineThemeConfig } from 'valaxy-theme-yun'
export default defineThemeConfig({
type: 'strato',
// type: 'nimbo',
// type: 'strato',
type: 'nimbo',
// colors: {
// primary: 'red',
// },
@ -20,16 +20,11 @@ export default defineThemeConfig({
},
nav: [
{
text: '导航',
link: '/projects',
items: [
{ text: '项目列表', link: '/projects' },
{ text: '友情链接', link: '/links' },
{ text: '老婆列表', link: '/girls' },
{ text: '赞助者', link: 'https://www.yunyoujun.cn/sponsors/' },
],
},
{ text: '项目列表', link: '/projects', icon: 'i-ri-gallery-view' },
{ text: '相册', link: '/albums', icon: 'i-ri-image-line' },
{ text: '友情链接', link: '/links/', icon: 'i-ri-link' },
{ text: '老婆列表', link: '/girls/', icon: 'i-ri-women-line' },
{ text: '赞助者们', link: '/sponsors/', icon: 'i-ri-heart-line' },
],
pages: [

View File

@ -64,11 +64,11 @@ const app = useAppStore()
/>
<YunNavMenuItem
v-for="item, i in themeConfig.pages"
v-for="item, i in themeConfig.nav"
:key="i"
:icon="item.icon"
:to="item.url"
:title="item.name"
:to="item.link"
:title="item.text"
/>
</template>
</div>

View File

@ -295,7 +295,8 @@ export interface NavItemGroup {
items: NavItemLink[]
}
export type NavItem = NavItemLink | NavItemGroup
// export type NavItem = NavItemLink | NavItemGroup
export type NavItem = NavItemLink
/**
* girl