diff options
author | Shohei Ueda <30958501+peaceiris@users.noreply.github.com> | 2021-06-17 18:33:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 18:33:42 +0300 |
commit | 20f36b9a0829c959cc8511f0e9b1ff66b58abb18 (patch) | |
tree | d83dcfef956e26fc53105fbd6da04cec7e2e5f33 /layouts | |
parent | a14dbf5811dfa7ddfcb246b04df322376d99585f (diff) |
feat: share-buttons (#375)
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 6 | ||||
-rw-r--r-- | layouts/partials/share-buttons.html | 44 |
2 files changed, 50 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e18a101d..221f6c1c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,6 +7,12 @@ {{ partial "content" . }} </section> + <hr> + + <section class="section"> + {{ partial "share-buttons" . }} + </section> + <section class="section"> {{ template "_internal/disqus.html" . }} </section> diff --git a/layouts/partials/share-buttons.html b/layouts/partials/share-buttons.html new file mode 100644 index 00000000..2e8ae21d --- /dev/null +++ b/layouts/partials/share-buttons.html @@ -0,0 +1,44 @@ +<div class="buttons has-addons"> + <!-- Twitter --> + <a + href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }} - {{ .Site.Title }}" + rel="noopener noreferrer nofollow" + target="_blank" + class="button" + >Twitter</a> + <!-- Facebook --> + <a + href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" + rel="noopener noreferrer nofollow" + target="_blank" + class="button" + >Facebook</a> + <!-- Pocket --> + <a + href="https://getpocket.com/edit?url={{ .Permalink }}&title={{ .Title }}" + rel="noopener noreferrer nofollow" + target="_blank" + class="button" + >Pocket</a> + <!-- Feedly --> + <a + href="https://feedly.com/i/subscription/feed/{{ $.Site.BaseURL | safeURL }}index.xml" + rel="noopener noreferrer nofollow" + target="_blank" + class="button" + >Feedly</a> + <!-- Hatena Bookmark --> + <a + href="http://b.hatena.ne.jp/add?url={{ .Permalink }}" + rel="noopener noreferrer nofollow" + target="_blank" + class="button" + >Hatena Bookmark</a> + <!-- Reddit --> + <a + href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" + rel="noopener noreferrer nofollow" + target="_blank" + class="button" + >Reddit</a> +</div> |