{% load wagtailcore_tags core_tags wagtailsettings_tags wagtailimages_tags %}
{% get_settings %}
  <ul class="social-media-list">
    {% pageurl page.specific as path %}
    {% if settings.core.SiteSettings.facebook_sharing %}
      <li class="social-media-list__item">
        <a href="http://www.facebook.com/sharer.php?u=http{% if request.is_secure %}s{%endif %}://{{ request.get_host }}{{ path }}"  target="_top" class="social-media__anchor social-media__anchor--facebook">
          {% if facebook %}{% image facebook width-40 format-png class="social-media__icon" %}{% else %}<span class="social-media__default-icon">{% trans "Facebook" %}<span>{% endif %}
        </a>
      </li>
    {% endif %}
    {% if settings.core.SiteSettings.twitter_sharing %}
      <li class="social-media-list__item">
        <a href="https://twitter.com/share?url=http{% if request.is_secure %}s{%endif %}://{{ request.get_host }}{{ path }}" target="_top" class="social-media__anchor social-media__anchor--twitter">
          {% if twitter %}{% image twitter width-40 format-png class="social-media__icon" %}{% else %}<span class="social-media__default-icon">{% trans "Twitter" %}<span>{% endif %}
        </a>
      </li>
    {% endif %}
    {% if settings.core.SiteSettings.whatsapp_sharing %}
      <li class="social-media-list__item">
        <a href="whatsapp://send?text=http{% if request.is_secure %}s{%endif %}://{{ request.get_host }}{{ path }}" target="_blank" rel="noreferrer" class="social-media__anchor social-media__anchor--whatsapp " data-action="share/whatsapp/share">
          {% if whatsapp %}{% image whatsapp width-40 format-png class="social-media__icon" %}{% else %}<span class="social-media__default-icon">{% trans "Whatsapp" %}<span>{% endif %}
        </a>
      </li>
    {% endif %}
  </ul>
