diff options
author | Yoshiharu Yamashita <yoshiharuyamashita@users.noreply.github.com> | 2019-10-03 10:44:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 10:44:39 +0300 |
commit | 09001c2f83f5cd446b72e88a3a69c6b349415511 (patch) | |
tree | 7bb60148c69ac6850d79c0e0f95edeb9a82392bb | |
parent | 534f91463b7ef8a8846d2d527df2771cbde6a91c (diff) | |
parent | e9772e53519396e8d1d01b6d09bdd4a25ce4766e (diff) |
Merge pull request #64 from HorribleGeek/master
Custom Share buttons after each article
-rw-r--r-- | layouts/partials/share.html | 38 | ||||
-rw-r--r-- | layouts/post/single.html | 2 |
2 files changed, 40 insertions, 0 deletions
diff --git a/layouts/partials/share.html b/layouts/partials/share.html new file mode 100644 index 0000000..544fa40 --- /dev/null +++ b/layouts/partials/share.html @@ -0,0 +1,38 @@ +<h4><i class="fa-share-alt" aria-hidden="true"></i> Share!</h4> +<ul class="share-buttons"> + <li><a href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook"><i class="fa-facebook" aria-hidden="true"></i><span class="sr-only">Share on Facebook</span></a> + </li> + <li><a href="https://twitter.com/intent/tweet?source={{ .Permalink }}&via=HorribleGeek" target="_blank" title="Tweet"><i class="fa-twitter" aria-hidden="true"></i><span class="sr-only">Tweet</span></a> + </li> + <li><a href="https://plus.google.com/share?url={{ .Permalink }}" target="_blank" title="Share on Google+"><i class="fa-google-plus" aria-hidden="true"></i><span class="sr-only">Share on Google+</span></a> + </li> + <li><a href="http://www.tumblr.com/share?v=3&u={{ .Permalink }}" target="_blank" title="Post to Tumblr"><i class="fa-tumblr" aria-hidden="true"></i><span class="sr-only">Post to Tumblr</span></a> + </li> + <li><a href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}" target="_blank" title="Pin it"><i class="fa-pinterest-p" aria-hidden="true"></i><span class="sr-only">Pin it</span></a> + </li> + <li><a href="http://www.reddit.com/submit?url={{ .Permalink }}" target="_blank" title="Submit to Reddit"><i class="fa-reddit-alien" aria-hidden="true"></i><span class="sr-only">Submit to Reddit</span></a> + </li> +</ul> + +<!-- Style for Icons, Inlined for less requests--> +<style> + ul.share-buttons{ + list-style: none; + padding: 0; + } + + ul.share-buttons li{ + display: inline; + } + + ul.share-buttons .sr-only{ + position: absolute; + clip: rect(1px 1px 1px 1px); + clip: rect(1px, 1px, 1px, 1px); + padding: 0; + border: 0; + height: 1px; + width: 1px; + overflow: hidden; + } +</style> diff --git a/layouts/post/single.html b/layouts/post/single.html index 904a433..4bb45cf 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -9,6 +9,8 @@ {{ partial "post_meta.html" . }} {{ .Content }} + + {{ partial "share.html" . }} {{ partial "prev_next_post.html" . }} |