| 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 %} |