mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
social share buttons
This commit is contained in:
parent
14d4b606d9
commit
b852669aa7
4 changed files with 33 additions and 1 deletions
21
view/template/content/_postSocialShare.php
Normal file
21
view/template/content/_postSocialShare.php
Normal 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>
|
|
@ -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
9
web/scss/_social.scss
Normal 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;
|
||||
}
|
||||
}
|
|
@ -14,4 +14,5 @@
|
|||
@import "code";
|
||||
@import "blog";
|
||||
@import "bounty";
|
||||
@import "roadmap";
|
||||
@import "roadmap";
|
||||
@import "social";
|
Loading…
Add table
Reference in a new issue