feat(nav): complete Tier 1 hierarchical navigation
Add config option [nav] nested (defaults false), update base.html template with nested nav rendering, and add .nav-children CSS styling for indented section children. - Add NavConfig struct with nested: bool - Template renders item.children in .nav-children div - CSS: left border + indent for nested items
This commit is contained in:
13
docs/templates/base.html
vendored
13
docs/templates/base.html
vendored
@@ -34,8 +34,17 @@
|
||||
</label>
|
||||
</header>
|
||||
<nav>
|
||||
{% for item in nav %}<a href="{{ prefix }}{{ item.path }}" {% if page_path==item.path %} class="active" {% endif
|
||||
%}>{{ item.label }}</a>{% endfor %}
|
||||
{% for item in nav %}
|
||||
<a href="{{ prefix }}{{ item.path }}" {% if page_path==item.path %}class="active" {% endif %}>{{ item.label }}</a>
|
||||
{% if config.nested_nav and item.children %}
|
||||
<div class="nav-children">
|
||||
{% for child in item.children %}
|
||||
<a href="{{ prefix }}{{ child.path }}" {% if page_path==child.path %}class="active" {% endif %}>{{ child.label
|
||||
}}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
<footer class="sidebar-footer">
|
||||
<a href="https://github.com/nrdxp/sukr">GitHub</a>
|
||||
|
||||
Reference in New Issue
Block a user