You are here

forum-icon.html.twig in Zircon Profile 8

Theme override to display a status icon for a forum post.

Available variables:

  • attributes: HTML attributes to be applied to the wrapper element.

    • class: HTML classes that determine which icon to display. May be one of 'hot', 'hot-new', 'new', 'default', 'closed', or 'sticky'.
    • title: Text alternative for the forum icon.
  • icon_title: Text alternative for the forum icon, same as above.
  • new_posts: '1' when this topic contains new posts, otherwise '0'.
  • first_new: '1' when this is the first topic with new posts, otherwise '0'.
  • icon_status: Indicates which status icon should be used.

File

core/themes/stable/templates/dataset/forum-icon.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display a status icon for a forum post.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes to be applied to the wrapper element.
  8. * - class: HTML classes that determine which icon to display. May be one of
  9. * 'hot', 'hot-new', 'new', 'default', 'closed', or 'sticky'.
  10. * - title: Text alternative for the forum icon.
  11. * - icon_title: Text alternative for the forum icon, same as above.
  12. * - new_posts: '1' when this topic contains new posts, otherwise '0'.
  13. * - first_new: '1' when this is the first topic with new posts, otherwise '0'.
  14. * - icon_status: Indicates which status icon should be used.
  15. *
  16. * @see template_preprocess_forum_icon()
  17. */
  18. #}
  19. <div{{ attributes }}>
  20. {% if first_new -%}
  21. <a id="new"></a>
  22. {%- endif %}
  23. <span class="visually-hidden">{{ icon_title }}</span>
  24. </div>