-
-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update sidebar ui * fix dark theme * Update docs * Update style * Refactor * Remove unused style * Update style
- Loading branch information
1 parent
94b8168
commit cec2af2
Showing
11 changed files
with
236 additions
and
128 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<template> | ||
<div | ||
class="PageToc" | ||
v-if=" | ||
!$store.state.fetchingFile && | ||
link.toc !== false && | ||
link.link === $route.path && | ||
$store.state.page.headings && | ||
$store.state.page.headings.length > 0 | ||
" | ||
> | ||
<router-link | ||
class="PageTocHeading" | ||
:to="{hash: heading.slug}" | ||
:data-level="heading.level" | ||
v-for="heading in $store.state.page.headings" | ||
:key="heading.slug" | ||
v-html="heading.text" | ||
></router-link> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
link: { | ||
type: Object, | ||
required: true | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.PageToc { | ||
border-left: 1px solid var(--border-color); | ||
margin-left: 16px; | ||
margin-top: 10px; | ||
} | ||
.PageTocHeading { | ||
display: flex; | ||
line-height: 1; | ||
position: relative; | ||
&:not(:last-child) { | ||
margin-bottom: 8px; | ||
} | ||
&[data-level='2'] { | ||
margin-left: 16px; | ||
} | ||
&.router-link-exact-active { | ||
font-weight: bold; | ||
color: var(--sidebar-link-active-color); | ||
} | ||
} | ||
</style> |
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
Oops, something went wrong.