Tabs for relationship views

This commit is contained in:
Mouse Reeve 2021-04-30 09:23:59 -07:00
parent 418e656aea
commit b65d0d05c9
2 changed files with 18 additions and 0 deletions

View file

@ -45,6 +45,7 @@
</div>
{% endif %}
</div>
{% block tabs %}
{% with user|username as username %}
<nav class="tabs">

View file

@ -2,6 +2,23 @@
{% load i18n %}
{% load bookwyrm_tags %}
{% block tabs %}
{% with user|username as username %}
<nav class="tabs">
<ul>
{% url 'user-following' user|username as url %}
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Following" %}</a>
</li>
{% url 'user-followers' user|username as url %}
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Followers" %}</a>
</li>
</ul>
</nav>
{% endwith %}
{% endblock %}
{% block panel %}
<div class="block">
{% for follow in follow_list %}