Fixing the social sharers and whipping out some padding for them

This commit is contained in:
Tom Slominski
2013-11-02 14:50:39 +00:00
parent 7530b53c56
commit f770cfa03e
2 changed files with 9 additions and 4 deletions

View File

@@ -191,6 +191,11 @@ a.bookmarklet {
font-size: 1.2rem; font-size: 1.2rem;
} }
.social-sharer {
display: inline-block;
padding: 0 2px;
}
/* Footer */ /* Footer */
.footer { .footer {
text-align: center; text-align: center;

View File

@@ -44,9 +44,9 @@ if( isset( $_GET['jsonp'] ) && $_GET['jsonp'] == 'yourls' ) {
<!-- Social sharers --> <!-- Social sharers -->
<h2><?php yourls_e( 'Share', 'isq_translation'); ?></h2> <h2><?php yourls_e( 'Share', 'isq_translation'); ?></h2>
<p><?php yourls_e( 'Share your short URL', 'isq_translation'); ?></p> <p><?php yourls_e( 'Share your short URL', 'isq_translation'); ?></p>
<?php if (!empty(ISQ::$social['facebook'])) { echo '<a href="http://facebook.com/sharer.php?u=$shorturl" class="share-button" target="_blank"><img src="public/img/facebook.png" alt="Facebook" width="55px" height="62px" /></a>'; } ?> <?php if (!empty(ISQ::$social['facebook'])) { echo '<div class="social-sharer"><a href="http://facebook.com/sharer.php?u=' . $shorturl . '" class="share-button" target="_blank"><img src="public/img/facebook.png" alt="Facebook" width="55px" height="62px" /></a></div>'; } ?>
<?php if (!empty(ISQ::$social['twitter'])) { echo '<a href="http://twitter.com/share" class="twitter-share-button" data-url="$shorturl" data-text="$title" data-count="vertical">Tweet</a><script src="http://platform.twitter.com/widgets.js"></script>'; } ?> <?php if (!empty(ISQ::$social['twitter'])) { echo '<div class="social-sharer"><a href="http://twitter.com/share" class="twitter-share-button" data-url="' . $shorturl . '" data-text="Check out this link!" data-count="vertical">Tweet</a><script src="http://platform.twitter.com/widgets.js"></script></div>'; } ?>
<?php if (!empty(ISQ::$social['plus'])) { echo '<div class="g-plus" data-action="share" data-annotation="vertical-bubble" data-height="62" data-href="$shorturl"></div>'; } ?> <?php if (!empty(ISQ::$social['plus'])) { echo '<div class="g-plus social-sharer" data-action="share" data-annotation="vertical-bubble" data-height="62" data-href="' . $shorturl . '"></div>'; } ?>
<?php if (!empty(ISQ::$social['linkedin'])) { echo '<script src="http://platform.linkedin.com/in.js"></script><script type="IN/Share" data-url="$shorturl" data-counter="top"></script>'; } ?> <?php if (!empty(ISQ::$social['linkedin'])) { echo '<div class="social-sharer"><script src="http://platform.linkedin.com/in.js"></script><script type="IN/Share" data-url="' . $shorturl . '" data-counter="top"></script></div>'; } ?>
<?php include('footer.php'); ?> <?php include('footer.php'); ?>