-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ZTL-UwU <zhangtianli2006@163.com>
- Loading branch information
Showing
4 changed files
with
30 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<template> | ||
<header class="sticky z-40 top-0 bg-background/80 backdrop-blur-lg border-b border-border"> | ||
<div | ||
class="container px-4 md:px-8 flex h-14 max-w-screen-2xl items-center" | ||
> | ||
<header class="sticky z-40 top-0 bg-background/80 backdrop-blur-lg border-b"> | ||
<div class="container px-4 md:px-8 flex h-14 max-w-screen-2xl items-center border-b lg:border-none"> | ||
<LayoutMobileNav /> | ||
<span class="flex-1" /> | ||
<DarkModeToggle /> | ||
</div> | ||
<div class="lg:hidden"> | ||
<LayoutToc /> | ||
</div> | ||
</header> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
<template> | ||
<template v-if="toc?.links"> | ||
<div class="hidden xl:block"> | ||
<div class="hidden lg:block"> | ||
<UiScrollArea orientation="vertical" class="h-[calc(100vh-6.5rem)] z-30 md:block overflow-y-auto" type="hover"> | ||
<p class="mb-2 text-base font-semibold"> | ||
<p v-if="toc.links.length" class="mb-2 text-base font-semibold"> | ||
On This Page | ||
</p> | ||
<LayoutTocTree :links="toc.links" :level="0" /> | ||
</UiScrollArea> | ||
</div> | ||
|
||
<div class="block xl:hidden mb-6"> | ||
<UiCollapsible> | ||
<UiCollapsibleTrigger> | ||
<UiButton variant="outline"> | ||
On This Page | ||
</UiButton> | ||
</UiCollapsibleTrigger> | ||
<UiCollapsibleContent> | ||
<LayoutTocTree :links="toc.links" :level="0" class="text-sm pl-4 border-l mt-4" /> | ||
</UiCollapsibleContent> | ||
</UiCollapsible> | ||
</div> | ||
<UiCollapsible | ||
v-model:open="isOpen" | ||
class="block lg:hidden text-sm px-4 py-3 w-full" | ||
> | ||
<UiCollapsibleTrigger class="w-full flex text-left font-semibold"> | ||
On This Page | ||
<Icon | ||
name="lucide:chevron-right" | ||
class="ml-auto self-center transition-all" | ||
:class="[isOpen && 'rotate-90']" | ||
/> | ||
</UiCollapsibleTrigger> | ||
<UiCollapsibleContent> | ||
<LayoutTocTree :links="toc.links" :level="0" class="text-sm pl-4 border-l my-3" /> | ||
</UiCollapsibleContent> | ||
</UiCollapsible> | ||
</template> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const { toc } = useContent(); | ||
const isOpen = ref(false); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters