forked from a64f7bb4-7358-4778-9fbe-3b882c34cc1d/v1
46 lines
1.3 KiB
Twig
46 lines
1.3 KiB
Twig
{#
|
|
/**
|
|
* @file
|
|
* Default theme implementation of standard AddToAny share buttons.
|
|
*
|
|
* Available variables:
|
|
* - addtoany_html: HTML for AddToAny buttons.
|
|
* - button_image: URL for universal button.
|
|
* - button_setting: Setting of button.
|
|
* - buttons_size: Size of buttons.
|
|
* - universal_button_placement: Value of 'before' or 'after' to place button.
|
|
* - link_url: Value of URL to share.
|
|
* - link_title: Value of page title to share.
|
|
*
|
|
* @ingroup themeable
|
|
*/
|
|
#}
|
|
{# Remove whitespace between tags for even spacing between buttons. #}
|
|
{% apply spaceless %}
|
|
|
|
{% if button_setting != 'none' %}
|
|
{% set universal_button %}
|
|
<a class="a2a_dd addtoany_share" href="https://www.addtoany.com/share#url={{ link_url|url_encode }}&title={{ link_title|url_encode }}">
|
|
{% if button_image %}
|
|
<img src="{{ button_image }}" alt="{{ 'Share'|t }}">
|
|
{% endif %}
|
|
</a>
|
|
{% endset %}
|
|
{% endif %}
|
|
|
|
<span class="a2a_kit a2a_kit_size_{{ buttons_size }} addtoany_list" data-a2a-url="{{ link_url }}" data-a2a-title="{{ link_title }}">
|
|
{% if universal_button_placement == 'before' %}
|
|
{{ universal_button }}
|
|
{% endif %}
|
|
|
|
{% if addtoany_html %}
|
|
{{ addtoany_html|raw }}
|
|
{% endif %}
|
|
|
|
{% if universal_button_placement == 'after' %}
|
|
{{ universal_button }}
|
|
{% endif %}
|
|
</span>
|
|
|
|
{% endapply %}
|