{% macro link(path, title) %}
<a
  class="nav-link {% if request.path.endswith(path) %}active{% endif %}"
  href="/{{ owner.canonical_name }}/{{ repo.name }}/settings{{ path }}"
>{{ title }}</a>
{% endmacro %}

<li class="nav-item">
  <a
    class="nav-link"
    href="/{{ owner.canonical_name }}/{{ repo.name }}"
  >
    {{icon("caret-left")}} back
  </a>
</li>
{% if request.path.endswith("/rename") %}
<li class="nav-item">
  {{ link("/rename", "rename") }}
</li>
{% endif %}
<li class="nav-item">
  {{ link("/info", "info") }}
</li>
<li class="nav-item">
  {{ link("/access", "access") }}
</li>
<li class="nav-item">
  {{ link("/delete", "delete") }}
</li>
