fmouhart.epheme.re/templates/nav.html

13 lines
597 B
HTML

{% if page %}
{% set page_section = get_section(path=page.ancestors[1], metadata_only = true) %}
{% endif %}
<nav>
<menu>
<li><a {% if section and section == root %} class="nav_current" {% endif %} href="/">Home</a></li>
{% for subsection in root.subsections %}
{% set subsection = get_section(path=subsection, metadata_only=true) %}
<li><a href="{{ subsection.permalink }}" {% if section and section.title == subsection.title or page and page_section.title == subsection.title %} class="nav_current" {% endif %}>{{ subsection.title }}</a></li>
{% endfor %}
</menu>
</nav>