Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post share buttons #47

Closed
adishavit opened this issue Nov 29, 2016 · 2 comments
Closed

Post share buttons #47

adishavit opened this issue Nov 29, 2016 · 2 comments

Comments

@adishavit
Copy link

How can I add share post buttons for each post for e.g. Twitter, Facebook, Reddit etc.?
It would be great if these buttons will have the same slick icons as for the author contact.

@tayfuncetin
Copy link

Hello adishavit. Copy following codes into uno.css

.small-icon { font-size: 15px; }
.medium-icon { font-size: 30px; }
.large-icon { font-size: 50px; }

.share-divider {
	width: 100%;
	margin: 20px auto;
	border-top: 2px solid rgb(216, 216, 216); }

And also copy those codes to between line 15 and line 21 into _layouts/post.html

<hr class="share-divider">
<a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url}}"  title="Share on Facebook" target="_blank"><i class="icon icon-social-facebook medium-icon"></i></a>
<a href="https://twitter.com/home?status=Check this out: {{ site.url }}{{ page.url}}"  title="Share on Twitter" target="_blank"><i class="icon icon-social-twitter medium-icon"></i></a>
<a href="https://plus.google.com/share?url={{ site.url }}{{ page.url}}"  title="Share on Google+" target="_blank"><i class="icon icon-social-google-plus medium-icon"></i></a>
<a href="http://www.reddit.com/submit?url={{ site.url }}{{ page.url}}&title={{ page.title }}"  title="Share on Reddit" target="_blank"><i class="icon icon-social-reddit medium-icon"></i></a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ site.url }}{{ page.url}}&title={{ page.title }}"  title="Share on LinkedIn" target="_blank"><i class="icon icon-social-linkedin medium-icon"></i></a>
<a href="mailto:?subject={{ page.title }}&body=Hey! Please check this article out. It may be interesting for you. {{ site.url }}{{ page.url}}"  title="Share by e-mail" target="_blank"><i class="icon icon-mail medium-icon"></i></a>

Here you go! You have facebook,twitter,google+,reddit,linkedin and mail share buttons for each post.
I defined 3 different share icon sizes and adjusted current icon size to medium.

  • for small size share button, please use small-icon class.
  • for medium size share button, please use medium-icon class.
  • for large size share button, please use large-icon class.

@adishavit
Copy link
Author

Works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants