You are here

share-everywhere.html.twig in Share Everywhere 2.x

Same filename and directory in other branches
  1. 8 templates/share-everywhere.html.twig

Default theme implementation for Share Everywhere module.

Available variables:

  • attributes: Remaining HTML attributes for the element, including:

    • class: HTML classes that can be used to style contextually through CSS.
  • title: The title of the module.
  • facebook_like: The rendered Facebook like button if enabled in the settings.
  • share_icon: Universal share icon.
    • id: Unique id.
    • class: Additional classes.
    • src: Path to the share icon.
    • alt: Alt text of the image.
  • se_links_id: Unique id.
  • is_active: Gives se-active class to the ul element if it is setup to be non-collapsible or gives se-inactive by default.
  • buttons: The social buttons to be rendered.

File

templates/share-everywhere.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for Share Everywhere module.
  5. *
  6. * Available variables:
  7. * - attributes: Remaining HTML attributes for the element, including:
  8. * - class: HTML classes that can be used to style contextually through CSS.
  9. * - title: The title of the module.
  10. * - facebook_like: The rendered Facebook like button if enabled in the settings.
  11. * - share_icon: Universal share icon.
  12. * - id: Unique id.
  13. * - class: Additional classes.
  14. * - src: Path to the share icon.
  15. * - alt: Alt text of the image.
  16. * - se_links_id: Unique id.
  17. * - is_active: Gives se-active class to the ul element if it is setup to be non-collapsible or gives se-inactive by default.
  18. * - buttons: The social buttons to be rendered.
  19. *
  20. */
  21. #}
  22. <div class="se-block {{ attributes.class }}" {{ attributes }}>
  23. {% if title %}
  24. <h3 class="block-title">{{ title }}</h3>
  25. {% endif %}
  26. <div class="block-content">
  27. {% if facebook_like %}
  28. <div class="se-like-container">
  29. {{ facebook_like }}
  30. </div>
  31. {% endif %}
  32. <div class="se-container">
  33. <div id="{{ share_icon.id }}" class="se-trigger {{ share_icon.class }}">
  34. <img src="{{ share_icon.src }}" alt="{{ share_icon.alt }}">
  35. </div>
  36. <div class="se-links-container">
  37. <ul id="{{ se_links_id }}" class="se-links {{ is_active }}">
  38. {% for key, button in buttons %}
  39. <li class="se-link {{ key }}"> {{ button }} </li>
  40. {% endfor %}
  41. </ul>
  42. </div>
  43. </div>
  44. </div>
  45. </div>