-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Documentation integration (#42)
Co-authored-by: Valia Fetisov <[email protected]>
- Loading branch information
1 parent
e0701ac
commit 52a1e29
Showing
12 changed files
with
14,516 additions
and
19,049 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<script setup lang="ts"> | ||
const props = defineProps<{ | ||
tocLinks: Array<{ | ||
id: string; | ||
text: string; | ||
children: { id: string; text: string }[]; | ||
}> | null; | ||
}>() | ||
defineEmits<{(e: 'scrollToId', id: string): void }>() | ||
</script> | ||
|
||
<template> | ||
<nav> | ||
<ul class="!p-0"> | ||
<li | ||
v-for="{ id, text, children } in props.tocLinks" | ||
:id="`toc-${id}`" | ||
:key="id" | ||
class="text-sm list-none" | ||
> | ||
<template v-if="text !== 'Table of contents'"> | ||
<a :href="`#${id}`" class="!text-neutral-800" @click="$emit('scrollToId', id)">{{ text }}</a> | ||
<ul v-if="children" class="!p-0 ml-4 mt-1 mb-2 flex flex-col gap-2"> | ||
<li | ||
v-for="{ id: childId, text: childText } in children" | ||
:id="`toc-${childId}`" | ||
:key="childId" | ||
class="text-xs list-none ml-0 hover:underline" | ||
> | ||
<a :href="`#${childId}`" class="!text-neutral-700" @click="$emit('scrollToId', childId)">{{ childText }}</a> | ||
</li> | ||
</ul> | ||
</template> | ||
</li> | ||
</ul> | ||
</nav> | ||
</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
Oops, something went wrong.