This commit is contained in:
2026-02-21 18:48:18 +08:00
parent 9f3fd2ae9d
commit 8a55430d55
20 changed files with 2025 additions and 97 deletions

View File

@@ -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>