sutty-base-jekyll-theme/_includes/share.html

23 lines
855 B
HTML
Raw Permalink Normal View History

{% capture url %}{{ site.url }}{{ include.url }}{% endcapture %}
{% unless include.share.url == '%url' %}
2020-08-29 21:41:57 +00:00
{% assign url = url | default: '' | cgi_escape %}
{% endunless %}
2020-08-29 21:41:57 +00:00
{% assign title = include.title | default: '' | cgi_escape %}
{% assign description = include.description | default: '' | cgi_escape %}
2020-11-14 23:40:04 +00:00
{% assign tags = include.tags | join: ',' | default: '' | cgi_escape %}
2020-06-17 20:01:11 +00:00
<a
{% if include.share.url == '%url' %}
download
{% else %}
target="_blank"
{% endif %}
2020-11-14 23:40:04 +00:00
rel="noopener nofollow"
2020-06-17 20:01:11 +00:00
title="{{ include.share.title }}"
class="d-flex flex-column align-items-center p-3"
2020-11-14 23:40:04 +00:00
href="{{ include.share.url | replace: '%url', url | replace: '%title', title | replace: '%description', description | replace: '%tags', tags }}">
2020-06-17 20:01:11 +00:00
<i class="fa fa-fw fa-2x fa-{{ include.share.icon }}"></i>
<span>{{ include.share.title }}</span>
</a>