You are here

micon.html.twig in Micon 8

Same filename and directory in other branches
  1. 2.x templates/micon.html.twig

micon.html.twig Default theme implementation to present an icon along with its label.

File

templates/micon.html.twig
View source
  1. {#
  2. /**
  3. * @file micon.html.twig
  4. * Default theme implementation to present an icon along with its label.
  5. *
  6. * @see template_preprocess_micon()
  7. *
  8. * @ingroup themeable
  9. */
  10. #}
  11. {%
  12. set classes = [
  13. 'icon-label',
  14. icon_only and icon ? 'visually-hidden',
  15. ]
  16. %}
  17. {% if icon and position=="before" %}
  18. {{ icon }}
  19. {% endif %}
  20. {% if title %}
  21. <span {{ attributes.addClass(classes) }}>
  22. {{ title }}
  23. </span>
  24. {% endif %}
  25. {% if icon and position=="after" %}
  26. {{ icon }}
  27. {% endif %}