Skip to content

Commit

Permalink
fix(docs): use UContent components instead of UDocs (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
nogic1008 committed May 8, 2024
1 parent 32f37d3 commit 11fe34f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ provide('navigation', navigation)
<AppFooter />

<ClientOnly>
<LazyUDocsSearch :files="files" :navigation="navigation" />
<LazyUContentSearch :files="files" :navigation="navigation" />
</ClientOnly>

<UNotifications />
Expand Down
4 changes: 2 additions & 2 deletions docs/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const items: DropdownItem[][] = [
</template>

<template v-if="header?.search" #center>
<UDocsSearchButton class="hidden lg:flex" />
<UContentSearchButton class="hidden lg:flex" />
</template>

<template #right>
<UDocsSearchButton v-if="header?.search" class="lg:hidden" />
<UContentSearchButton v-if="header?.search" class="lg:hidden" />

<UColorModeButton v-if="header?.colorMode" />
Expand Down
2 changes: 1 addition & 1 deletion docs/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ provide('navigation', navigation)
<AppFooter />

<ClientOnly>
<LazyUDocsSearch :files="files" :navigation="navigation" />
<LazyUContentSearch :files="files" :navigation="navigation" />
</ClientOnly>

<UNotifications />
Expand Down
6 changes: 3 additions & 3 deletions docs/layouts/docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ const navigation = inject<Ref<NavItem[]>>('navigation')
<hr v-if="surround?.length" />
<UDocsSurround :surround="surround!" />
<UContentSurround :surround="surround!" />
</UPageBody>
<template v-if="page?.toc !== false" #right>
<UDocsToc :title="toc?.title" :links="page!.body?.toc?.links">
<UContentToc :title="toc?.title" :links="page!.body?.toc?.links">
<template v-if="toc?.bottom" #bottom>
<div
class="hidden lg:block space-y-6"
Expand All @@ -73,7 +73,7 @@ const navigation = inject<Ref<NavItem[]>>('navigation')
<UPageLinks :title="toc.bottom.title" :links="links" />
</div>
</template>
</UDocsToc>
</UContentToc>
</template>
</UPage>
</UContainer>
Expand Down
40 changes: 14 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 11fe34f

Please sign in to comment.