changing css and template to better visualize sidebar

This commit is contained in:
Hasko, Vladimir 2023-02-23 00:46:26 +00:00 committed by Gitea
parent ec7ca5950f
commit ba3d472ae2
2 changed files with 10 additions and 1 deletions

View File

@ -47,3 +47,12 @@
.navigator-container .card li {
padding: 0.2rem 1rem;
}
/* A "nice" workaround to let us keep l2 level permanently open
* but hide child ul's not underneath current selection.
* The only eventually open issue is that this way the whole child tree is
* open including all subtrees.
*/
.docs-sidebar-toc li.toctree-l2:not(.current) > ul {
display: none;
}

View File

@ -6,7 +6,7 @@
{%- if theme_sidebar_mode == 'toc' %}
{{ toc }}
{%- elif theme_sidebar_mode == 'toctree' %}
{{ toctree(maxdepth=2,includehidden=True, collapse=False) }}
{{ toctree(maxdepth=4, includehidden=True, collapse=False, titles_only=True) }}
{%- endif %}
</div>
{%- endif %}