Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basic information
Addressed problems
<a>
tag and also the corresponding parent<a>
element received the class, but not grandparent elements. Now really only the active<a>
element gets the class "active", but all<li>
ancestors get the class "active-path"..Site.Params.ui.sidebar_menu_compact = true
) all ancestors and descendants were visible until now. As a result, when the lowest level was active, the whole menu was visible - not really compact ;-) All the child pages were only hidden when a sub-page was opened. At the moment I would have implemented it in such a way that all ancestors, siblings and direct descendants are always shown. In addition, the.Site.Params.ui.ul_show
parameter can be used to set a desired menu depth to always be visible. For example, the 1st menu level can always be displayed.<a>
elements of<li class = "td-sidebar-nav__section-title">
. This was deleted without replacement because (1) it is not used in the CSS definitions (just "collapse") and (2) the control of the fade-in and fade-out via the<li>
seems to work without any problems.Changes
<ul>
for menu items with children.<li>
element in order to correct the structure of the nested lists and nevertheless to support the existing CSS as best as possible.New Features
navRoot
to make it easier to format the heading of the section, which is part of the<ul>
structure, as "heading".<span>
around menu links.Site.Params.ui.ul_show
(default: 1): Possibility to specify a menu depth that is always visible, even with compact menus.Site.Params.ui.sidebar_cache_limit
(default: 2000): Limit from which the sidebar menu is cached (previously hardcoded).Site.Params.ui.sidebar_menu_truncate
(default: 50): Limit from which a submenu is shortened (previously hardcoded).IsPage
were output directly). ==> Advantage only 1 definition for the markup per menu entry and therefore easier to understand and to maintain.<span>
element of the active menu item is also marked with the "td-sidebar-nav-active-item" class.Further steps
Because this PR is the basis for further steps, I would dedicate myself again on the other open issues I'm working on: #342, #348, #449, #457 and some CSS tweaks, when this PR is OK,