{% if template contains 'article' or template contains 'blog' %}
{% capture permalinkURL %}{{ shop.url }}{{ article.url }}{% endcapture %}
{% capture shareTitle %}{{ article.title }}{% endcapture %}
{% capture shareHandle %}{{ article.handle }}{% endcapture %}

{% elsif template contains 'product' %}
{% capture permalinkURL %}{{ shop.url }}{{ product.url }}{% endcapture %}
{% capture shareTitle %}{{ product.title }}{% endcapture %}
{% capture shareHandle %}{{ product.handle }}{% endcapture %}

{% elsif template == 'password' %}
  {% capture permalinkURL %}{{ shop.url }}{% endcapture %}
  {% capture shareTitle %}{% unless shop.description == blank %}{{ shop.description | url_param_escape }}{% else %}{{ shop.name | url_param_escape }}{% endunless %}{% endcapture %}
{% endif %}

<div class="share-links social-sharing" data-permalink="{{ permalinkURL }}"{% if template contains 'product' %} style="background-color: {{ section.settings.prod_content_bg_color }};"{% endif %}>
  {% if template contains 'product' %}<span>{{ 'products.product.share' | t }}</span>{% endif %}
  <ul class="list-inline">
    
    {% if settings.share_twitter %}
    <li>
      <a class="twitter" target="_blank" rel="noopener" href="//twitter.com/share?url={{ permalinkURL }}&amp;text={{ shareHandle }}" title="Twitter">
        <i class="demo-icon icon-twitter"></i>
        <span>Twitter</span>
      </a>
    </li>
    {% endif %}

    {% if settings.share_facebook %}
    <li>
      <a class="facebook" target="_blank" rel="noopener" href="//www.facebook.com/sharer.php?u={{ permalinkURL }}" title="Facebook">
        <i class="demo-icon icon-facebook"></i>
        <span>Facebook</span>
      </a>
    </li>
    {% endif %}   

    {% if settings.share_google %}
    <li>
      <a class="google" target="_blank" rel="noopener" href="//plus.google.com/share?url={{ permalinkURL }}" title="Google">
        <i class="demo-icon icon-google"></i>
        <span>Google+</span>
      </a>
    </li>
    {% endif %}

  </ul>
 
</div>