OXYGENHUB
# d7e2c2754807 oxygenhub / templates / admin_nav.html
618 B · HTML · last changed Administration: a sidebar of grouped pages, one page per section (closes #288) 15 days ago source blame history raw
737de0fa Andy McCall ↶ 1
{# The admin area's sidebar (oxygenhub#288): grouped pages, the current one marked. #}
2
{% macro nav(current) %}
3
<nav class="settings-nav" aria-label="Administration"{% if current == crate::web::admin::AdminSection::Overview %} data-settings-anchors{% endif %}>
4
  {% for (group, pages) in crate::web::admin::admin_groups() %}<div class="settings-group">
5
    <h2>{{ group }}</h2>
6
    <ul>{% for p in pages.iter() %}<li><a href="{{ p.href() }}" data-slug="{{ p.slug() }}"{% if *p == current %} class="on" aria-current="page"{% endif %}>{{ p.title() }}</a></li>{% endfor %}</ul>
7
  </div>{% endfor %}
8
</nav>
9
{% endmacro %}