Merge branch 'add-rel-attribute' into 'main'

Added rel attributes to the next and prev links

Closes #4

See merge request brutaldon/brutaldon!4
This commit is contained in:
DJ Sundog 2021-08-01 20:39:25 +00:00
commit 6d7d8d936a
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>