Skip to content

Instantly share code, notes, and snippets.

@erikflowers
Created August 8, 2013 04:46
Show Gist options
  • Save erikflowers/6181527 to your computer and use it in GitHub Desktop.
Save erikflowers/6181527 to your computer and use it in GitHub Desktop.
A stylized, large tweet button that is made for use in Wordpress that is using Bootstrap and Font Awesome
custom-tweet-button {
text-align: center;
margin: 20px 0px 50px 0px;
.clearfix;
a.big-tweet {
display: block;
width: 300px;
margin: 0 auto;
font-size: 16px;
padding: 15px 30px;
border: 1px solid hsl(0, 0%, 86%);
.border-radius(10px);
color: hsl(0, 0%, 50%);
text-decoration: none;
font-family: @copy;
#gradient > .vertical(hsl(0, 0%, 94%), 0%, hsl(0, 0%, 90%), 100%);
.icon-twitter {
margin-left: 7px;
color: hsl(195, 99%, 60%);
line-height: .4em;
}
&:hover {
#gradient > .vertical(hsl(0, 0%, 88%), 0%, hsl(0, 0%, 84%), 100%);
}
}
}
<div class="custom-tweet-button">
<?php echo ('<a href="https://twitter.com/intent/tweet?url=' . get_permalink() . '&text=' . get_the_title() . ' via @YOUR_HANDLE" class="big-tweet" alt="' . get_the_title() . '" target="_blank">Tweet this post <i class="icon-twitter icon-2x"></i></a>')?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment