1
Fork 0

Convert social share buttons to partial

This commit is contained in:
Jake Howard 2018-08-17 23:19:40 +01:00
parent 6b216f56a3
commit ffec95f94d
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 14 additions and 11 deletions

View file

@ -27,5 +27,6 @@
</a>
</h4>
</div>
{{ partial "share.html" . }}
</div>
{{ end }}

View file

@ -3,16 +3,6 @@
<div class="container">
{{ partial "content.html" . }}
</div>
{{ if .Section }}
<div class="container mt-3 text-center">
<small>Share this page</small>
<h3>
<a href="https://twitter.com/intent/tweet?text={{ .Permalink }}"><i class="mx-1 fab fa-twitter" aria-hidden="true"></i></a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}"><i class="mx-1 fab fa-facebook" aria-hidden="true"></i></a>
<a href="http://www.reddit.com/submit?url={{ .Permalink }}"><i class="mx-1 fab fa-reddit" aria-hidden="true"></i></a>
<a href="{{ .Permalink }}" data-clipboard-text="{{ .Permalink }}" title="Copy link to clipboard"><i class="mx-1 fas fa-copy" aria-hidden="true"></i></a>
</h3>
</div>
{{ end }}
{{ partial "share.html" . }}
</div>
{{ end }}

View file

@ -43,5 +43,6 @@
</table>
</div>
</div>
{{ partial "share.html" . }}
</div>
{{ end }}

View file

@ -0,0 +1,11 @@
{{ if .Section }}
<div class="container mt-3 text-center">
<small>Share this page</small>
<h3>
<a href="https://twitter.com/intent/tweet?text={{ .Permalink }}"><i class="mx-1 fab fa-twitter" aria-hidden="true"></i></a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}"><i class="mx-1 fab fa-facebook" aria-hidden="true"></i></a>
<a href="http://www.reddit.com/submit?url={{ .Permalink }}"><i class="mx-1 fab fa-reddit" aria-hidden="true"></i></a>
<a href="{{ .Permalink }}" data-clipboard-text="{{ .Permalink }}" title="Copy link to clipboard"><i class="mx-1 fas fa-copy" aria-hidden="true"></i></a>
</h3>
</div>
{{ end }}