[Boyscout] Feed link HTML facto

This commit is contained in:
Simounet 2023-05-25 20:57:14 +02:00
parent d8ddc5d7bb
commit eae4d5a142
No known key found for this signature in database
GPG key ID: 77D3B7DC794EB770

View file

@ -1,11 +1,12 @@
{% if tag is defined %} {% if tag is defined %}
<a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a> {% set feed_route = 'tag_feed' %}
{% set slug = tag.slug %}
{% elseif current_route in ['homepage', 'unread', 'starred', 'archive', 'all'] %} {% elseif current_route in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
{% set feed_route = current_route %} {% set feed_route = current_route %}
{% if current_route == 'homepage' %} {% if current_route == 'homepage' %}
{% set feed_route = 'unread' %} {% set feed_route = 'unread' %}
{% endif %} {% endif %}
{% set feed_route = feed_route ~ '_feed' %} {% set feed_route = feed_route ~ '_feed' %}
{% set slug = null %}
<a rel="alternate" type="application/atom+xml" href="{{ path(feed_route, {'username': app.user.username, 'token': app.user.config.feedToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
{% endif %} {% endif %}
<a rel="alternate" type="application/atom+xml" href="{{ path(feed_route, {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': slug}) }}" class="right"><i class="material-icons">rss_feed</i></a>