summaryrefslogtreecommitdiff
path: root/alabaster-lite/inc/homepage_nav.html
blob: ed2edfa99922c0ff8b07e06a573d48acff5750b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<h2>Navigation</h2>

{% macro nav_tree(nav) -%}
  <ul>
  {% for nav_item in nav %}
      {% if not nav_item.children %}
        <li>
          <a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
        </li>
      {% else %}
        <li>
          {{ nav_item.title }}
          {{ nav_tree(nav_item.children) }}
        </li>
      {% endif %}
    {% endfor %}
  </ul>
{%- endmacro %}
{{ nav_tree(nav) }}