Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I add manual/auto expand/collapse function to sub-sidebar. #1135

Open
vagra opened this issue Apr 24, 2020 · 2 comments
Open

I add manual/auto expand/collapse function to sub-sidebar. #1135

vagra opened this issue Apr 24, 2020 · 2 comments

Comments

@vagra
Copy link
Contributor

@vagra vagra commented Apr 24, 2020

enhanced sidebar

  1. using '.sidebar' for main sidebar, using '.app-sub-sidebar' for docs sidebar.

  2. add '+/-' sign before link.

  3. when you click at '+/-' button, you can expand/collapse the item.

  4. when you click the link, the main page sync scroll and heighlight.

  5. when you scroll the main page, the '.app-sub-sidebar' sync scroll and auto expand/collapse.

source code

https://github.com/vagra/docsify
branch: sidebar

demo site

https://kepan.org/alpha/#/kepan/
(this is a temp link, will be closed in the future)

https://kepan.org/docsify/
this is using modify version of docsify, support for up to 108 levels heading.

If you feel good, you can merge my code to your project.

@vagra
Copy link
Contributor Author

@vagra vagra commented Apr 24, 2020

loadSidebar: true

图片

@vagra
Copy link
Contributor Author

@vagra vagra commented Apr 24, 2020

loadSidebar: false

图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.