some modifications to social media sharing section
This commit is contained in:
parent
587cb46290
commit
48cf013e55
@ -101,6 +101,7 @@ defaults:
|
||||
values:
|
||||
layout: "post"
|
||||
comments: true # add comments to all blog posts
|
||||
social-share: true # add social media sharing buttons to all blog posts
|
||||
-
|
||||
scope:
|
||||
path: "" # all files
|
||||
|
@ -1,33 +1,3 @@
|
||||
<section>
|
||||
|
||||
<!--- Share on Twitter -->
|
||||
{% if site.share-links-active.twitter %}
|
||||
<a href="https://twitter.com/intent/tweet?text={{ site.url }}{{ page.url }}" class="btn btn-social btn-sm btn-twitter" title="{{ site.data.ui-text[site.locale].share_on_label }} Twitter">
|
||||
<i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!--- Share on Facebook -->
|
||||
{% if site.share-links-active.facebook %}
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}" class="btn btn-social btn-sm btn-facebook" title="{{ site.data.ui-text[site.locale].share_on_label }} Facebook">
|
||||
<i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!--- Share on Google Plus -->
|
||||
{% if site.share-links-active.google %}
|
||||
<a href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}" class="btn btn-social btn-sm btn-google" title="{{ site.data.ui-text[site.locale].share_on_label }} Google Plus">
|
||||
<i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!--- Share on LinkedIn -->
|
||||
{% if site.share-links-active.linkedin %}
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ site.url }}{{ page.url }}" class="btn btn-social btn-sm btn-linkedin" title="{{ site.data.ui-text[site.locale].share_on_label }} LinkedIn">
|
||||
<i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!-- Check if any share-links are active -->
|
||||
{% assign any-share-links = false %}
|
||||
{% for links in site.share-links-active %}
|
||||
@ -36,9 +6,41 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- Add an extra space under share links if present -->
|
||||
{% if any-share-links %}
|
||||
<br><br/>
|
||||
<section id = "social-share-section">
|
||||
|
||||
<!--- Share on Twitter -->
|
||||
{% if site.share-links-active.twitter %}
|
||||
<a href="https://twitter.com/intent/tweet?text={{ site.url }}{{ page.url }}"
|
||||
class="btn btn-social-icon btn-twitter" title="Share on Twitter">
|
||||
<span class="fa fa-fw fa-twitter" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!--- Share on Facebook -->
|
||||
{% if site.share-links-active.facebook %}
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}"
|
||||
class="btn btn-social-icon btn-facebook" title="Share on Facebook">
|
||||
<span class="fa fa-fw fa-facebook" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!--- Share on Google Plus -->
|
||||
{% if site.share-links-active.google %}
|
||||
<a href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}"
|
||||
class="btn btn-social-icon btn-google" title="Share on Google+">
|
||||
<span class="fa fa-fw fa-google-plus" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!--- Share on LinkedIn -->
|
||||
{% if site.share-links-active.linkedin %}
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ site.url }}{{ page.url }}"
|
||||
class="btn btn-social-icon btn-linkedin" title="Share on LinkedIn">
|
||||
<span class="fa fa-fw fa-linkedin" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
|
||||
{% endif %}
|
@ -7,10 +7,11 @@ layout: base
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
|
||||
<article role="main" class="blog-post">
|
||||
{{ content }}
|
||||
</article>
|
||||
{% include social-share.html %}
|
||||
|
||||
{% if page.tags.size > 0 %}
|
||||
<div class="blog-tags">
|
||||
Tags:
|
||||
@ -23,6 +24,11 @@ layout: base
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.social-share %}
|
||||
{% include social-share.html %}
|
||||
{% endif %}
|
||||
|
||||
<ul class="pager blog-pager">
|
||||
{% if page.previous.url %}
|
||||
<li class="previous">
|
||||
@ -35,6 +41,7 @@ layout: base
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if page.comments %}
|
||||
<div class="disqus-comments">
|
||||
{% include disqus.html %}
|
||||
|
@ -620,3 +620,9 @@ td.code pre {
|
||||
td.gutter {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
/* --- Social media sharing section --- */
|
||||
|
||||
#social-share-section {
|
||||
margin-bottom: 30px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user