Last active
August 29, 2015 14:02
-
-
Save graylaurenm/422f0340d2a5c356e0c0 to your computer and use it in GitHub Desktop.
Styling Po.st's social sharing buttons http://oncecoupled.com/2014/06/19/styling-po-sts-social-sharing-buttons/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Enqueue child theme JavaScript. | |
add_action( 'wp_enqueue_scripts', 'lgd_enqueue_js' ); | |
//* Load additional javascript. | |
function lgd_enqueue_js() { | |
wp_enqueue_script( 'social-by-post', get_stylesheet_directory_uri().'/js/social-by-post.js' , '', '', true ); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Add Po.st sharing under post title, on single pages | |
add_filter( 'genesis_entry_content', 'lgd_post_sharing', 4 ); | |
function lgd_post_sharing() { | |
if ( is_single() ) | |
echo '<div class="pw-widget"></div>'; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Po.st Social Sharing | |
------------------------- */ | |
.sidebar .widget .pw-widget, | |
.entry .entry-content .pw-widget { | |
width: 100% !important; | |
} | |
.entry .entry-content .pw-widget { | |
margin: 20px 0; | |
margin: 2rem 0; | |
} | |
.sidebar .widget .pw-widget .pw-button, | |
.entry-content .pw-widget .pw-button { | |
color: #FFF; | |
background: #222 !important; | |
margin: 0 0 5px !important; | |
margin: 0 0 .5rem !important; | |
width: 100%; | |
} | |
.entry .entry-content .pw-widget .pw-button { | |
display: inline-block !important; | |
margin: 0 1.8% 0 0 !important; | |
width: 15%; | |
} | |
.entry .entry-content .pw-widget .pw-button:last-child { | |
margin-right: 0 !important; | |
} | |
.sidebar .widget .pw-widget .pw-button-facebook, | |
.entry-content .pw-widget .pw-button-facebook { | |
background-color: #3b5998 !important; | |
} | |
.sidebar .widget .pw-widget .pw-button-twitter, | |
.entry-content .pw-widget .pw-button-twitter { | |
background-color: #55acee !important; | |
} | |
.sidebar .widget .pw-widget .pw-button-googleplus, | |
.entry-content .pw-widget .pw-button-googleplus { | |
background-color: #dd4b39 !important; | |
} | |
.sidebar .widget .pw-widget .pw-button-pinterest, | |
.entry-content .pw-widget .pw-button-pinterest { | |
background-color: #cb2027 !important; | |
} | |
.sidebar .widget .pw-widget .pw-button-email, | |
.entry-content .pw-widget .pw-button-email { | |
background-color: #e04c40 !important; | |
} | |
.sidebar .widget .pw-widget .pw-button:hover, | |
.entry-content .pw-widget .pw-button:hover { | |
background: #AAA !important; | |
} | |
.sidebar .widget .pw-widget .pw-icon:before, | |
.entry-content .pw-widget .pw-icon:before { | |
display: block; | |
text-align: center; | |
font: 25px/40px 'FontAwesome' !important; | |
font: 2.5rem/4rem 'FontAwesome' !important; | |
height: 40px; | |
width: 100%; | |
} | |
.entry-content .pw-widget .pw-icon:before { | |
font: 2px/30px 'FontAwesome' !important; | |
font: 2rem/3rem 'FontAwesome' !important; | |
height: 30px; | |
height: 3rem; | |
} | |
.sidebar .widget .pw-widget .pw-button-facebook .pw-icon:before, | |
.entry-content .pw-widget .pw-button-facebook .pw-icon:before { | |
content: "\f09a"; | |
} | |
.sidebar .widget .pw-widget .pw-button-twitter .pw-icon:before, | |
.entry-content .pw-widget .pw-button-twitter .pw-icon:before { | |
content: "\f099"; | |
} | |
.sidebar .widget .pw-widget .pw-button-googleplus .pw-icon:before, | |
.entry-content .pw-widget .pw-button-googleplus .pw-icon:before { | |
content: "\f0d5"; | |
} | |
.sidebar .widget .pw-widget .pw-button-pinterest .pw-icon:before, | |
.entry-content .pw-widget .pw-button-pinterest .pw-icon:before { | |
content: "\f0d2"; | |
} | |
.sidebar .widget .pw-widget .pw-button-email .pw-icon:before, | |
.entry-content .pw-widget .pw-button-email .pw-icon:before { | |
content: "\f0e0"; | |
} | |
.sidebar .widget .pw-widget .pw-button-post .pw-icon:before, | |
.entry-content .pw-widget .pw-button-post .pw-icon:before { | |
content: "\f067"; | |
} | |
.sidebar .widget .pw-widget .pw-button .pw-icon, | |
.entry-content .pw-widget .pw-button .pw-icon, | |
.sidebar .widget .pw-widget .pw-button .pw-button-counter i, | |
.entry-content .pw-widget .pw-button .pw-button-counter i { | |
background-image: none; | |
} | |
.sidebar .widget .pw-widget .pw-button .pw-icon, | |
.entry-content .pw-widget .pw-button .pw-icon { | |
margin: 0; | |
height: 40px; | |
width: 50%; | |
} | |
.entry-content .pw-widget .pw-button .pw-icon { | |
height: 30px; | |
height: 3rem; | |
} | |
.sidebar .widget .pw-widget .pw-button .pw-button-counter, | |
.entry-content .pw-widget .pw-button .pw-button-counter { | |
height: 40px; | |
width: 50% !important; | |
padding: 0 !important; | |
} | |
.entry-content .pw-widget .pw-button .pw-button-counter { | |
height: 30px; | |
height: 3rem; | |
} | |
.sidebar .widget .pw-widget .pw-button .pw-button-counter i, | |
.entry-content .pw-widget .pw-button .pw-button-counter i { | |
margin: 0 !important; | |
width: 0; | |
} | |
.sidebar .widget .pw-widget .pw-button .pw-button-counter span, | |
.entry-content .pw-widget .pw-button .pw-button-counter span { | |
color: #FFF !important; | |
font: 20px/40px 'museosans', Arial, Helvetica, sans-serif !important; | |
font: 2rem/4rem 'museosans', Arial, Helvetica, sans-serif !important; | |
padding: 0 !important; | |
border: 0 !important; | |
width: 100% !important; | |
background-color: transparent; | |
-webkit-border-radius: 0; | |
-moz-border-radius: 0; | |
border-radius: 0; | |
} | |
.entry-content .pw-widget .pw-button .pw-button-counter span { | |
font: 15px/30px 'museosans', Arial, Helvetica, sans-serif !important; | |
font: 1.5rem/3rem 'museosans', Arial, Helvetica, sans-serif !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment