1
This commit is contained in:
@@ -12,6 +12,7 @@ import TaoXin from './components/TaoXin.vue'
|
||||
import Cafe from './components/Cafe.vue'
|
||||
import Settings from './components/Settings.vue'
|
||||
import DocSidebar from './components/DocSidebar.vue'
|
||||
import sidebarData from './data/sidebar.json'
|
||||
|
||||
const { frontmatter } = useData()
|
||||
const settingsStore = useSettingsStore()
|
||||
@@ -23,6 +24,13 @@ const isHome = computed(() => frontmatter.value.home === true)
|
||||
const blurAmount = computed(() => settingsStore.theme.blurAmount ?? 20)
|
||||
const backgroundColor = computed(() => settingsStore.theme.backgroundColor ?? 'rgba(30, 30, 30, 0.7)')
|
||||
|
||||
const navItems = computed(() => {
|
||||
return sidebarData.map(group => ({
|
||||
text: group.title,
|
||||
link: group.path
|
||||
}))
|
||||
})
|
||||
|
||||
const handleResize = () => {
|
||||
settingsStore.setMobile(isMobileDevice())
|
||||
}
|
||||
@@ -69,8 +77,14 @@ onUnmounted(() => {
|
||||
<a href="/" class="logo">乌仿镇</a>
|
||||
<nav class="doc-nav">
|
||||
<a href="/" class="nav-link">首页</a>
|
||||
<a href="/java/" class="nav-link">Java</a>
|
||||
<a href="/vue/" class="nav-link">Vue</a>
|
||||
<a
|
||||
v-for="item in navItems"
|
||||
:key="item.link"
|
||||
:href="item.link"
|
||||
class="nav-link"
|
||||
>
|
||||
{{ item.text }}
|
||||
</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user