mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-08 06:58:43 +00:00
Fix sidebar navigation rendering
This commit is contained in:
@@ -60,6 +60,7 @@ body {
|
|||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
.sidebar ul { list-style: none; padding: 0; }
|
.sidebar ul { list-style: none; padding: 0; }
|
||||||
|
.sidebar ul ul { padding-left: 1rem; }
|
||||||
.sidebar a { text-decoration: none; color: var(--text-color); }
|
.sidebar a { text-decoration: none; color: var(--text-color); }
|
||||||
main {
|
main {
|
||||||
flex: 1;
|
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">
|
<aside class="sidebar" id="sidebar">
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
{{ renderNav(navigation) }}
|
||||||
{% for item in navigation %}
|
|
||||||
<li><a href="{{ item.path }}">{{ item.page.title }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
|
Reference in New Issue
Block a user