2023-05-06 02:22:29 +03:00
|
|
|
<!-- Post sharing snippet -->
|
2020-02-16 22:01:48 +03:00
|
|
|
|
2023-09-10 15:23:34 +03:00
|
|
|
<div class="share-wrapper d-flex align-items-center">
|
2023-10-29 21:02:58 +03:00
|
|
|
<span class="share-label text-muted">{{ site.data.locales[include.lang].post.share }}</span>
|
2020-02-29 16:51:18 +03:00
|
|
|
<span class="share-icons">
|
2020-02-16 22:01:48 +03:00
|
|
|
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
2023-01-06 01:44:08 +03:00
|
|
|
{% assign title = title | uri_escape %}
|
2022-03-03 15:55:27 +03:00
|
|
|
{% assign url = page.url | absolute_url | url_encode %}
|
2020-02-16 22:01:48 +03:00
|
|
|
|
2023-10-29 21:02:58 +03:00
|
|
|
{% for share in site.data.share.platforms -%}
|
|
|
|
{% if share.type == 'Mastodon' %}
|
|
|
|
<script defer type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/share-to-mastodon/+esm"></script>
|
|
|
|
<button
|
|
|
|
class="btn text-start"
|
|
|
|
data-bs-toggle="tooltip"
|
|
|
|
data-bs-placement="top"
|
|
|
|
title="{{ share.type }}"
|
|
|
|
aria-label="{{ share.type }}"
|
|
|
|
>
|
|
|
|
<share-to-mastodon
|
|
|
|
class="share-mastodon"
|
|
|
|
message="{{ title }}"
|
|
|
|
url="{{ url }}"
|
|
|
|
{%- if share.instances -%}
|
|
|
|
customInstanceList="{{ share.instances | jsonify | xml_escape }}"
|
|
|
|
{%- endif %}
|
|
|
|
>
|
|
|
|
<i class="{{ share.icon }}"></i>
|
|
|
|
</share-to-mastodon>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
{% continue %}
|
|
|
|
{% endif %}
|
|
|
|
|
2022-03-03 15:55:27 +03:00
|
|
|
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
|
2023-10-29 21:02:58 +03:00
|
|
|
|
2023-05-06 02:22:29 +03:00
|
|
|
<a
|
|
|
|
href="{{ link }}"
|
2023-04-10 05:54:27 +03:00
|
|
|
data-bs-toggle="tooltip"
|
|
|
|
data-bs-placement="top"
|
2023-05-06 02:22:29 +03:00
|
|
|
title="{{ share.type }}"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
aria-label="{{ share.type }}"
|
|
|
|
>
|
|
|
|
<i class="fa-fw {{ share.icon }}"></i>
|
|
|
|
</a>
|
2020-02-16 22:01:48 +03:00
|
|
|
{% endfor %}
|
|
|
|
|
2023-08-02 00:18:35 +03:00
|
|
|
<button
|
2023-05-06 02:22:29 +03:00
|
|
|
id="copy-link"
|
2023-08-02 00:18:35 +03:00
|
|
|
aria-label="Copy link"
|
|
|
|
class="btn small"
|
2023-04-10 05:54:27 +03:00
|
|
|
data-bs-toggle="tooltip"
|
|
|
|
data-bs-placement="top"
|
2023-05-06 02:22:29 +03:00
|
|
|
title="{{ site.data.locales[include.lang].post.button.share_link.title }}"
|
|
|
|
data-title-succeed="{{ site.data.locales[include.lang].post.button.share_link.succeed }}"
|
|
|
|
>
|
2023-10-29 21:02:58 +03:00
|
|
|
<i class="fa-fw fas fa-link pe-none fs-6"></i>
|
2023-08-02 00:18:35 +03:00
|
|
|
</button>
|
2020-02-16 22:01:48 +03:00
|
|
|
</span>
|
2020-10-26 23:11:21 +03:00
|
|
|
</div>
|