mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-07 14:48:40 +00:00
Merge pull request #20 from PR0M3TH3AN/codex/fix-sidebar-display-issues
Fix sidebar hierarchical navigation rendering
This commit is contained in:
@@ -60,6 +60,7 @@ body {
|
||||
padding: 1rem;
|
||||
}
|
||||
.sidebar ul { list-style: none; padding: 0; }
|
||||
.sidebar ul ul { padding-left: 1rem; }
|
||||
.sidebar a { text-decoration: none; color: var(--text-color); }
|
||||
main {
|
||||
flex: 1;
|
||||
|
@@ -1,9 +1,18 @@
|
||||
{% macro renderNav(items) %}
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
<li>
|
||||
<a href="{{ item.path }}">{{ item.page.title }}</a>
|
||||
{% if item.children and item.children.length %}
|
||||
{{ renderNav(item.children) }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
<aside class="sidebar" id="sidebar">
|
||||
<nav>
|
||||
<ul>
|
||||
{% for item in navigation %}
|
||||
<li><a href="{{ item.path }}">{{ item.page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{{ renderNav(navigation) }}
|
||||
</nav>
|
||||
</aside>
|
||||
|
Reference in New Issue
Block a user