diff --git a/.themes/classic/sass/partials/_sharing.scss b/.themes/classic/sass/partials/_sharing.scss index e6a220a..0f8a4ac 100644 --- a/.themes/classic/sass/partials/_sharing.scss +++ b/.themes/classic/sass/partials/_sharing.scss @@ -1,22 +1,47 @@ -@mixin social-button-bg($img, $color: #444) { +@import "icon/*.png";/**/ +@include all-icon-sprites($dimensions: true); + +@mixin social-button-bg($icon: false, $color: #333, $img: false) { color: $color; &:visited, &:hover, &:visited:hover { color: $color; } - position: relative; - padding-left: image-width($img) + 6px; - &:before { - content: ""; - background: image-url($img) no-repeat center center; - width: image-width($img); - height: image-height($img); - display: inline-block; - position: absolute; left: 3px; - top: 3px; + @if $img { + padding-left: image-width($img) + 6px; + &:before { + background: image-url($img) no-repeat center center; + width: image-width($img); + height: image-height($img); + position: absolute; left: 3px; + top: 3px; + } + } @else if $icon { + padding-left: icon-sprite-width($icon) + 6px; + &:before { + vertical-align: middle; + @extend .icon-#{$icon}; + position: absolute; left: 3px; + top: 3px; + } } } +@mixin icon-bg($icon, $align: middle) { + display: inline-block; + vertical-align: $align; + @extend .icon-#{$icon}; +} + .simple-social-button { + position: relative; + overflow: hidden; + font-family: "Lucida Grande", Helvetica, Arial, sans; display: inline-block; border: 1px solid #ccc; + padding: .2em .5em; line-height: 1.45em; + font-size: 11px; + font-weight: bold; + text-decoration: none; + text-shadow: #fff 0 1px; + @include border-radius(.3em); background-color: #e5e5e5; @include background-image(linear-gradient(#fff, #ddd)); &:hover { @@ -24,12 +49,10 @@ border-color: #b5b5b5; background-color: #ddd; } - padding: .2em .5em .1em; line-height: 1.45em; - font-size: 13px; - font-weight: bold; - text-decoration: none; - text-shadow: #fff 0 1px; - @include border-radius(.3em); + &:before { + content: ""; + display: inline-block; + } } .sharing { @@ -43,13 +66,13 @@ .googleplus-share { @extend .simple-social-button; - @include social-button-bg('googleplus.png', #db583b); + @include social-button-bg('googleplus', #db583b); } .facebook-share { @extend .simple-social-button; - @include social-button-bg('facebook.png', #4e5a9b); + @include social-button-bg('facebook', #4e5a9b); } .twitter-share, .sidebar a.twitter-follow-button { @extend .simple-social-button; - @include social-button-bg('twitter.png'); + @include social-button-bg('twitter'); } diff --git a/.themes/classic/source/_includes/after_footer.html b/.themes/classic/source/_includes/after_footer.html index 2aee47f..0324a32 100644 --- a/.themes/classic/source/_includes/after_footer.html +++ b/.themes/classic/source/_includes/after_footer.html @@ -1,7 +1,7 @@ {% include disqus.html %} -{% unless site.do_not_track %} -{% include facebook_like.html %} -{% include google_plus_one.html %} -{% include twitter_sharing.html %} +{% unless site.respectfully_social %} + {% include facebook_like.html %} + {% include google_plus_one.html %} + {% include twitter_sharing.html %} {% endunless %} {% include custom/after_footer.html %} diff --git a/.themes/classic/source/_includes/post/sharing.html b/.themes/classic/source/_includes/post/sharing.html index 0e04abb..ed9ea72 100644 --- a/.themes/classic/source/_includes/post/sharing.html +++ b/.themes/classic/source/_includes/post/sharing.html @@ -1,20 +1,20 @@