social share buttons

This commit is contained in:
Alex Grintsvayg 2016-10-21 18:49:16 -04:00
parent 14d4b606d9
commit b852669aa7
4 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,21 @@
<?php $url = urlencode(Request::getHost() . $post->getRelativeUrl()) ?>
<?php $title = urlencode($post->getTitle()) ?>
<div class="social-share-buttons">
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url ?>&t=<?php echo $title ?>" title="Share on Facebook" target="_blank">
<span class="icon-fw icon-facebook"></span>
</a>
<a href="https://twitter.com/intent/tweet?source=<?php echo $url ?>&text=<?php echo $title ?>%20<?php echo $url ?>&via=lbryio"
target="_blank" title="Tweet">
<span class="icon-fw icon-twitter"></span>
</a>
<a href="http://www.reddit.com/submit?url=<?php echo $url ?>&title=<?php echo $title ?>" target="_blank" title="Post to Reddit">
<span class="icon-fw icon-reddit"></span>
</a>
<a href="http://www.tumblr.com/share?v=3&u=<?php echo $url ?>&t=<?php echo $title ?>&s=" target="_blank" title="Post to Tumblr">
<span class="icon-fw icon-tumblr"></span>
</a>
<a href="mailto:?subject=<?php echo urlencode('LBRY: ') . $title ?>&body=<?php echo $url . urlencode("\n\n" . $post->getContentText(50,true)) ?>"
title="Email a Friend">
<span class="icon-fw icon-envelope"></span>
</a>
</div>

View file

@ -23,6 +23,7 @@
<?php echo $post->getContentHtml() ?>
</div>
<?php echo View::render('content/_postNav', ['post' => $post]) ?>
<?php echo View::render('content/_postSocialShare', ['post' => $post]) ?>
</section>

9
web/scss/_social.scss Normal file
View file

@ -0,0 +1,9 @@
.social-share-buttons {
margin: $spacing-vertical auto;
text-align: center;
font-size: $font-size-h4;
a {
text-decoration: none !important;
margin: 0 $spacing-vertical;
}
}

View file

@ -14,4 +14,5 @@
@import "code";
@import "blog";
@import "bounty";
@import "roadmap";
@import "roadmap";
@import "social";