Open
Description
OptionA
Feature request
Add manual expand/collapse function for app-sub-sidebar.
What problem does this feature solve?
Because docsify has been doing this before:
- when
loadSidebar: true
, the sidebar hierarchy is:sidebar
as rootsidebar-nav
for _sidebar.mdapp-sub-sidebar
for main content
- when
loadSidebar: false
, the sidebar hierarchy is:sidebar
as rootsidebar-nav
for main content- does not have
app-sub-sidebar
- does not have
so there is no way to use a unified method to control the expand/collapse for sidebar-nav
and app-sub-sidebar
, when loadSidebar
set to false
, the items can't expand/collapse by click.
What does the proposed API look like?
- make the
app-sub-sidebar
can expand/collapse by click. - sidebar of main content can expand/collapse always.
- the icon of sidebar items can change display when expand/collapse.
How should this be implemented in your opinion?
- change the sidebar hierarchy to:
sidebar
as rootsidebar-nav
for _sidebar.mdapp-sub-sidebar
for main content
regardless of whether the loadSidebar
set to false
or true
.
- add manual expand/collapse function for app-sub-sidebar.
this making the tree of main content can expand/collapse always.
Are you willing to work on this yourself?
I make some changes at:
vagra@56e643a
when loadSidebar: true
, look https://kepan.org/side1/
when loadSidebar: false
, look https://kepan.org/side0/
if you guys like it, I can submit a PR.