{%- if template contains 'article' or template contains 'blog' -%}
  {%- capture permalink_url -%}{{ shop.url }}{{ article.url }}{%- endcapture -%}
  {%- capture share_handle -%}{{ article.handle }}{%- endcapture -%}
{%- elsif template contains 'product' -%}
  {%- capture permalink_url -%}{{ shop.url }}{{ product.url }}{%- endcapture -%}
  {%- capture share_handle -%}{{ product.handle }}{%- endcapture -%}
{%- elsif template == 'password' -%}
  {%- capture permalink_url -%}{{ shop.url }}{%- endcapture -%}
{%- endif -%}

<div class="share-links social-sharing" data-permalink="{{ permalink_url }}">
  <ul class="list-inline">
    {%- if settings.share_facebook -%}
      <li>
        <a class="facebook" target="_blank" rel="noopener" href="//www.facebook.com/sharer.php?u={{ permalink_url }}" title="Facebook">
          {%- render 'svg', type: 'facebook' -%}
          <span>Share</span>
        </a>
      </li>
    {%- endif -%} 
    
    {%- if settings.share_twitter -%}
      <li>
        <a class="twitter" target="_blank" rel="noopener" href="//twitter.com/share?url={{ permalink_url }}&amp;text={{ share_handle }}" title="Twitter">
          {%- render 'svg', type: 'twitter' -%}
          <span>Tweet</span>
        </a>
      </li>
    {%- endif -%}  
  </ul>
</div>