share-everywhere.html.twig in Share Everywhere 2.x
Same filename and directory in other branches
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.
1 theme call to share-everywhere.html.twig
- ShareEverywhereService::build in src/
ShareEverywhereService.php - Builds a renderable array of Social buttons.
File
templates/share-everywhere.html.twigView source
- {#
- /**
- * @file
- * 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.
- *
- */
- #}
- <div class="se-block {{ attributes.class }}" {{ attributes }}>
- {% if title %}
- <h3 class="block-title">{{ title }}</h3>
- {% endif %}
- <div class="block-content">
- {% if facebook_like %}
- <div class="se-like-container">
- {{ facebook_like }}
- </div>
- {% endif %}
- <div class="se-container">
- <div id="{{ share_icon.id }}" class="se-trigger {{ share_icon.class }}">
- <img src="{{ share_icon.src }}" alt="{{ share_icon.alt }}">
- </div>
- <div class="se-links-container">
- <ul id="{{ se_links_id }}" class="se-links {{ is_active }}">
- {% for key, button in buttons %}
- <li class="se-link {{ key }}"> {{ button }} </li>
- {% endfor %}
- </ul>
- </div>
- </div>
- </div>
- </div>