Added rel attributes to the next and prev links

This commit is contained in:
Zac Bohon 2021-08-01 15:37:06 -05:00
parent 13761e6125
commit 06d306ce2b
5 changed files with 10 additions and 8 deletions

View File

@ -3,10 +3,10 @@
{% block pagination %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'local_prev' prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'local_prev' prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'local_next' next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'local_next' next.max_id %}">Older</a>
{% endif %}
</nav>
{% endblock %}

View File

@ -109,10 +109,10 @@ mastodon.notifications()[0]
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'note_prev' prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'note_prev' prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'note_next' next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'note_next' next.max_id %}">Older</a>
{% endif %}
</nav>

View File

@ -3,10 +3,10 @@
{% block pagination %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'fed_prev' prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'fed_prev' prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'fed_next' next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'fed_next' next.max_id %}">Older</a>
{% endif %}
</nav>
{% endblock %}

View File

@ -40,6 +40,7 @@
{% if next %}
<p class="column is-one-quarter">
<a class="pagination-previous is-fullwidth button"
rel="prev"
href="{% url 'home_next' next.max_id %}"
{% if preferences.click_to_load %}
ic-get-from="{% url 'home_next' next.max_id %}"
@ -57,6 +58,7 @@
{% if prev %}
<p class="column is-one-quarter">
<a class="pagination-next is-fullwidth button"
rel="next"
href="{% url 'home_prev' prev.min_id %}">
Newer
</a>

View File

@ -120,10 +120,10 @@ Brutaldon ({{ own_acct.username }}) - {{ user.acct }} timelime
{% endfor %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'user_prev' user.acct prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'user_prev' user.acct prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'user_next' user.acct next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'user_next' user.acct next.max_id %}">Older</a>
{% endif %}
</nav>