file-link.html.twig 452 B

123456789101112131415161718192021
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a link to a file.
  5. *
  6. * Available variables:
  7. * - attributes: The HTML attributes for the containing element.
  8. * - link: A link to the file.
  9. * - file_size: The size of the file.
  10. *
  11. * @see template_preprocess_file_link()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% if file_size %}
  17. <a rel="noopener" target="_blank" href="{{link['#title']}}">
  18. <img src="{{link['#url']}}" alt="logo">
  19. </a>
  20. {% endif %}