beautifulSA-jekyll/_includes/social-share.html

56 lines
2.0 KiB
HTML
Raw Permalink Normal View History

<!-- Check if any share-links are active -->
{% assign any-share-links = false %}
{% for links in site.share-links-active %}
{% if links[1] == true %}
{% assign any-share-links = true %}
{% endif %}
{% endfor %}
{% if any-share-links %}
<section id = "social-share-section">
<span class="sr-only">Share: </span>
2016-08-01 03:30:03 +02:00
{% if site.share-links-active.twitter %}
<a href="https://twitter.com/intent/tweet?text={{ page.title | url_encode }}&url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-twitter" title="Share on Twitter">
2020-03-16 19:36:28 +01:00
<span class="fab fa-fw fa-twitter" aria-hidden="true"></span>
<span class="sr-only">Twitter</span>
2016-08-01 03:30:03 +02:00
</a>
{% endif %}
{% if site.share-links-active.facebook %}
<a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-facebook" title="Share on Facebook">
2020-03-16 19:36:28 +01:00
<span class="fab fa-fw fa-facebook" aria-hidden="true"></span>
<span class="sr-only">Facebook</span>
2016-08-01 03:30:03 +02:00
</a>
{% endif %}
{% if site.share-links-active.linkedin %}
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-linkedin" title="Share on LinkedIn">
2020-03-16 19:36:28 +01:00
<span class="fab fa-fw fa-linkedin" aria-hidden="true"></span>
<span class="sr-only">LinkedIn</span>
2016-08-01 03:30:03 +02:00
</a>
{% endif %}
2020-06-12 04:53:39 +02:00
{% if site.share-links-active.vk %}
<a href="https://vk.com/share.php?url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-vk" title="Share on VK">
<span class="fab fa-fw fa-vk" aria-hidden="true"></span>
<span class="sr-only">VK</span>
</a>
{% endif %}
{% if site.share-links-active.reddit %}
<a href="https://www.reddit.com/submit?url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-reddit" title="Share on Reddit">
<span class="fab fa-fw fa-reddit" aria-hidden="true"></span>
<span class="sr-only">Reddit</span>
</a>
{% endif %}
2016-08-01 03:30:03 +02:00
</section>
{% endif %}