Skip to content

Commit

Permalink
Fix alignment of social share buttons.
Browse files Browse the repository at this point in the history
- fix vertical alignment of FB share button
- adjust spacing between buttons
  • Loading branch information
willkoehler committed Aug 21, 2014
1 parent 5c122b2 commit 374aca6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 6 additions & 1 deletion _assets/stylesheets/_article.scss
Expand Up @@ -13,7 +13,12 @@ article {

> div {
display:inline-block;
min-width:120px;
width: 100px;

&.google { width: 85px; }

// vertically align facebook like button with other sharing icons
.fb-like > span { vertical-align: baseline !important; }
}
}

Expand Down
9 changes: 5 additions & 4 deletions _includes/_social-sharing.html
@@ -1,22 +1,23 @@
{% if site.info.sharing.twitter or site.info.sharing.facebook or site.info.sharing.gplus or site.info.sharing.hn %}
<div class="social">
{% if site.info.sharing.twitter %}<div>
{% if site.info.sharing.twitter %}
<div class='twitter'>
<a href="https://twitter.com/share" class="twitter-share-button" {% if site.info.sharing.twitter.via %}data-via="{{ site.info.sharing.twitter.via }}"{% endif %} data-text="{{ page.title }}" data-related="{{ site.info.twitter }}">Tweet</a>
</div>
{% endif %}
{% if site.info.sharing.facebook %}
<div>
<div class='facebook'>
<div class="fb-like" data-width="150" data-layout="button_count" data-action="like" data-show-faces="true" data-send="false"></div>
</div>
{% endif %}
{% if site.info.sharing.gplus %}
<div>
<div class='google'>
<div class="g-plusone" data-size="medium"></div>
</div>
{% endif %}

{% if site.info.sharing.hn %}
<div>
<div class='hn'>
<a href="https://news.ycombinator.com/submit" class="hn-button" data-title="{{ page.title }}" data-url="{{ site.info.url }}{{ page.url }}" data-count="horizontal">Vote on Hacker News</a>
</div>
{% endif %}
Expand Down

0 comments on commit 374aca6

Please sign in to comment.