feed-icon.html.twig 921 B

1234567891011121314151617181920212223242526272829303132
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a feed icon.
  5. *
  6. * Available variables:
  7. * - url: An internal system path or a fully qualified external URL of the feed.
  8. * - title: Title of the feed for describing the feed on the subscribe link.
  9. * - attributes: Remaining HTML attributes for the feed link.
  10. * - title: A descriptive title of the feed link.
  11. * - class: HTML classes to be applied to the feed link.
  12. */
  13. #}
  14. {{ attach_library('rorschach/feed') }}
  15. {#
  16. @todo - This works around https://www.drupal.org/project/drupal/issues/3156244,
  17. Title variable isn't set by Syndicate block.
  18. #}
  19. {% if title is not defined or title is null %}
  20. {% set title = 'RSS Feed'|t %}
  21. {% endif %}
  22. <a href="{{ url }}"{{ attributes.addClass('feed-icon') }}>
  23. <span class="feed-icon__label">
  24. {{ title }}
  25. </span>
  26. <span class="feed-icon__icon" aria-hidden="true">
  27. {% include "@rorschach/../images/rss.svg" %}
  28. </span>
  29. </a>