Skip to content

Commit

Permalink
Add Atom+RSS links at the bottom of the blog index page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Nov 21, 2024
1 parent 8ffdfbd commit 6271a27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions blog/templates/blog/blocks/feeds.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% load wagtailroutablepage_tags %}

<div class="fr-mt-2w">
<ul class="fr-btns-group fr-btns-group--inline-sm fr-btns-group--icon-left fr-btns-group--right">
<li>
<a class="fr-btn fr-btn--tertiary-no-outline fr-btn--icon-left fr-icon-rss-fill"
href="{% routablepageurl page 'atom_feed' %}">Atom</a>
</li>
<li>
<a class="fr-btn fr-btn--tertiary-no-outline fr-btn--icon-left fr-icon-rss-fill"
href="{% routablepageurl page 'rss_feed' %}">RSS</a>
</li>
</ul>
</div>
2 changes: 2 additions & 0 deletions blog/templates/blog/blog_index_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,15 @@ <h2 class="fr-h6">{% translate "Filter by source" %}</h2>
{% if posts.paginator.num_pages > 1 %}
<div class="fr-container fr-grid-row fr-grid-row--center fr-mt-6w">{% dsfr_pagination posts %}</div>
{% endif %}
{% include "blog/blocks/feeds.html" %}
</div>
</div>
{% else %}
<div class="fr-grid-row fr-grid-row--gutters">{% include "blog/blocks/blog_index_posts_list.html" %}</div>
{% if posts.paginator.num_pages > 1 %}
<div class="fr-container fr-grid-row fr-grid-row--center fr-mt-6w">{% dsfr_pagination posts %}</div>
{% endif %}
{% include "blog/blocks/feeds.html" %}
{% endif %}
</div>
{% endblock content %}

0 comments on commit 6271a27

Please sign in to comment.