Skip to content

Commit

Permalink
Displayed the RSS icon on homepage route
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosomb committed Dec 12, 2017
1 parent f209798 commit 629f913
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% if tag is defined %}
<a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
{% elseif currentRoute in ['unread', 'starred', 'archive', 'all'] %}
<a rel="alternate" type="application/rss+xml" href="{{ path(currentRoute ~ '_rss', {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
{% endif %}
{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
{% set rssRoute = currentRoute %}
{% if currentRoute == 'homepage' %}
{% set rssRoute = 'unread' %}
{% endif %}
{% set rssRoute = rssRoute ~ '_rss' %}

<a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
{% endif %}

0 comments on commit 629f913

Please sign in to comment.