quadstat_misc-8.x-1.x-dev/templates/social-share-link-mail.html.twig
templates/social-share-link-mail.html.twig
{#
/**
* @file
* Default theme implementation to display a social share link.
*
* Available variables:
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - mail_link_text: The sharing link text.
* - mail_subject: The sharing mail subject.
* - mail_body: The text to share.
*
* See \Drupal\social_share\Plugin\SocialShareLink\MailShareLink() for a
* a complete list of supported variables. Every context defind by the plugin
* is made available as variable.
*
* @ingroup themeable
*/
#}
{% set url_params = {
'subject': mail_subject,
'body': mail_body,
}
%}
{% set attributes = attributes.
addClass('social-share-mail')
%}
<div class="social_share_link button mail">
<a href="mailto:?{{ url_params|url_encode }}" {{ attributes }}>
<i class="fa fa-envelope"></i> {{ mail_link_text }}
</a>
</div>
