You are here

addtocal-links.html.twig in Add to Cal 8.2

Default theme implementation for addtocal_links.

Available variables:

  • attributes: An associative array of element attributes.
  • button_text: The addtocal button text.
  • button_attributes: An associative array of button attributes.
  • menu_attributes: An associative array of menu attributes.
  • items: List of add to cal links.

File

templates/addtocal-links.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for addtocal_links.
  5. *
  6. * Available variables:
  7. * - attributes: An associative array of element attributes.
  8. * - button_text: The addtocal button text.
  9. * - button_attributes: An associative array of button attributes.
  10. * - menu_attributes: An associative array of menu attributes.
  11. * - items: List of add to cal links.
  12. *
  13. * @see template_preprocess_addtocal_links()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <div{{ attributes }}>
  19. <button{{ button_attributes }}>{{ button_text }}</button>
  20. <div{{ menu_attributes }}>
  21. <ul class="addtocal-links">
  22. {% for type, item in items %}
  23. <li class="addtocal-link" data-addtocal-type="{{ type }}">
  24. <a href="{{ item.url }}" target="_blank" rel="noopener" aria-label="{{ item['aria-label'] }}">{{ item.title }}</a>
  25. </li>
  26. {% endfor %}
  27. </ul>
  28. </div>
  29. </div>