feat(docs): align documentation shell with HeroUI baseline

This commit is contained in:
maoyingjie
2026-10-24 07:18:36 +08:00
parent 406497a20f
commit b2246f0058
33 changed files with 2499 additions and 1540 deletions
@@ -0,0 +1,23 @@
<script setup lang="ts">
import { Link } from "@heroui-vue/components";
import { withBase } from "vitepress";
import type { DocsGroup } from "./navigation";
defineProps<{ groups: DocsGroup[]; current: string; label?: string }>();
const emit = defineEmits<{ navigate: [] }>();
</script>
<template>
<nav :aria-label="label ?? '文档导航'" class="sidebar-tree">
<section v-for="group in groups" :key="group.title">
<h2>{{ group.title }}</h2>
<Link
v-for="item in group.items"
:key="item.url"
:href="withBase(item.url)"
:aria-current="current === item.url ? 'page' : undefined"
@click="emit('navigate')"
>
{{ item.title }}
</Link>
</section>
</nav>
</template>