diff options
Diffstat (limited to 'alabaster-lite/inc')
-rw-r--r-- | alabaster-lite/inc/homepage_nav.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/alabaster-lite/inc/homepage_nav.html b/alabaster-lite/inc/homepage_nav.html new file mode 100644 index 0000000..ed2edfa --- /dev/null +++ b/alabaster-lite/inc/homepage_nav.html @@ -0,0 +1,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) }} |