mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Feature: Added post sharing options.
Also added a license statement at the bottom of the posts.
This commit is contained in:
28
_includes/post-sharing.html
Normal file
28
_includes/post-sharing.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
Post sharing snippet
|
||||
|
||||
v2.1
|
||||
https://github.com/cotes2020/jekyll-theme-chirpy
|
||||
© 2019 Cotes Chung
|
||||
Published under the MIT License
|
||||
-->
|
||||
|
||||
<div class="share-wrapper">
|
||||
<span class="share-label ml-1 mr-1">{{ site.data.share.label }}</span>
|
||||
<span class="share-icon">
|
||||
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
||||
{% assign url = page.url | relative_url | prepend: site.url %}
|
||||
|
||||
{% for share in site.data.share.platforms %}
|
||||
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
|
||||
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
|
||||
title="{{ share.type }}" target="_blank">
|
||||
<i class="fa-fw {{ share.icon }} mr-1"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
<i class="fa-fw fas fa-link mr-1 small" onclick="copyLink()"
|
||||
data-toggle="tooltip" data-placement="top" title="Copy link"></i>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
Reference in New Issue
Block a user