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:
Sundog Jones 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 %} {% block pagination %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination"> <nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %} {% 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 %} {% endif %}
{% if next %} {% 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 %} {% endif %}
</nav> </nav>
{% endblock %} {% endblock %}

View File

@ -109,10 +109,10 @@ mastodon.notifications()[0]
<nav class="pagination is-centered" role="navigation" aria-label="pagination"> <nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %} {% 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 %} {% endif %}
{% if next %} {% 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 %} {% endif %}
</nav> </nav>

View File

@ -3,10 +3,10 @@
{% block pagination %} {% block pagination %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination"> <nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %} {% 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 %} {% endif %}
{% if next %} {% 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 %} {% endif %}
</nav> </nav>
{% endblock %} {% endblock %}

View File

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

View File

@ -120,10 +120,10 @@ Brutaldon ({{ own_acct.username }}) - {{ user.acct }} timelime
{% endfor %} {% endfor %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination"> <nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %} {% 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 %} {% endif %}
{% if next %} {% 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 %} {% endif %}
</nav> </nav>