Skip to content

Pure CSS menu, any level deep #1180

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

Open
trusktr opened this issue May 17, 2020 · 2 comments
Open

Pure CSS menu, any level deep #1180

trusktr opened this issue May 17, 2020 · 2 comments
Assignees
Milestone

Comments

@trusktr
Copy link
Member

trusktr commented May 17, 2020

Feature request

Current menu has limitations. Sometimes (like for links) the menu items can open/close to show child items. Other times (as with non-links) there is no open/close function.

What problem does this feature solve?

We can decouple the menu nesting from the link system, and fix the fact that currently not all items in the Docsify sidebar are collapsible (it seems to depend on items being links or not).

I am on mobile, but I can later post my markdown and what it looks like.

What does the proposed API look like?

Let's get ideas from existing pure-CSS tree views with open/close, any level deep:

How should this be implemented in your opinion?

We can adopt a similar technique, but style it for Docsify. A plug-in could add smooth CSS transition.

Are you willing to work on this yourself?

👍

@vagra
Copy link
Contributor

vagra commented May 27, 2020

I did this.

@vagra
Copy link
Contributor

vagra commented May 27, 2020

I did this.

vagra@6a1389a

this code like the #1200
but has some diffrents.

  1. if you click the icon before item, can expand/collpse the children;
  2. if you click the item link, can scroll to the anchor in the main content.

when loadSidebar: true, look https://kepan.org/click1/
图片

when loadSidebar: true, look https://kepan.org/click0/
图片

if you guys like it, I can submit a PR.

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

No branches or pull requests

3 participants