Skip to content

Commit

Permalink
Merge pull request #2946 from bookwyrm-social/followers-page-breadcrumbs
Browse files Browse the repository at this point in the history
Adds breadcrumbs and better titles to followers/following pages
  • Loading branch information
mouse-reeve authored Aug 7, 2023
2 parents 15e82ec + 0e43cc4 commit 53c8085
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bookwyrm/templates/user/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ <h1 class="title">
{% endblock %}
</header>

{% block breadcrumbs %}{% endblock %}

{# user bio #}
<div class="block">
<div class="columns">
Expand Down
19 changes: 19 additions & 0 deletions bookwyrm/templates/user/relationships/followers.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
{% extends 'user/relationships/layout.html' %}
{% load utilities %}
{% load i18n %}

{% block title %}
{% trans "Followers" %} - {{ user|username }}
{% endblock %}

{% block header %}
<h1 class="title">
{% trans "Followers" %}
</h1>
{% endblock %}

{% block breadcrumbs %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'user-feed' user|username %}">{% trans "User profile" %}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{% trans "Followers" %}
</a>
</li>
</ul>
</nav>
{% endblock %}


{% block nullstate %}
<div>
<em>{% blocktrans with username=user.display_name %}{{ username }} has no followers{% endblocktrans %}</em>
Expand Down
18 changes: 18 additions & 0 deletions bookwyrm/templates/user/relationships/following.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
{% extends 'user/relationships/layout.html' %}
{% load utilities %}
{% load i18n %}

{% block title %}
{% trans "Following" %} - {{ user|username }}
{% endblock %}

{% block header %}
<h1 class="title">
{% trans "Following" %}
</h1>
{% endblock %}

{% block breadcrumbs %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'user-feed' user|username %}">{% trans "User profile" %}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{% trans "Following" %}
</a>
</li>
</ul>
</nav>
{% endblock %}

{% block nullstate %}
<div>
<em>{% blocktrans with username=user.display_name %}{{ username }} isn't following any users{% endblocktrans %}</em>
Expand Down

0 comments on commit 53c8085

Please sign in to comment.