Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jbub/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jonsson <dannie92@gmail.com>2017-01-16 16:09:27 +0300
committerJuraj Bubniak <juraj.bubniak@gmail.com>2017-01-16 16:09:27 +0300
commit208cd773d75209cede6703e75a22181fc03f983d (patch)
treec771e1e1d2a8d1c18991691c3bb8aecaa8e6edaf /layouts
parente9128f78ce001633674eb3b0037a83f373a37bf7 (diff)
Add settings to control visible social media share buttons
If the share setting hasn't been set for a social media button, it falls back on `true`. This ensures that this change doesn't break any existing installs.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/post-footer.html36
1 files changed, 21 insertions, 15 deletions
diff --git a/layouts/partials/post-footer.html b/layouts/partials/post-footer.html
index 68a1dc6..effa690 100644
--- a/layouts/partials/post-footer.html
+++ b/layouts/partials/post-footer.html
@@ -11,22 +11,28 @@
{{ end}}
<div class="share">
- <a class="icon-twitter" href="https://twitter.com/share?text={{ .Title }}&url={{ .Permalink }}"
- onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
- <i class="fa fa-twitter"></i>
- <span class="hidden">Twitter</span>
- </a>
+ {{ if or (not (isset .Site.Params "sharetwitter")) .Site.Params.shareTwitter }}
+ <a class="icon-twitter" href="https://twitter.com/share?text={{ .Title }}&url={{ .Permalink }}"
+ onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
+ <i class="fa fa-twitter"></i>
+ <span class="hidden">Twitter</span>
+ </a>
+ {{ end }}
- <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}"
- onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
- <i class="fa fa-facebook"></i>
- <span class="hidden">Facebook</span>
- </a>
+ {{ if or (not (isset .Site.Params "sharefacebook")) .Site.Params.shareFacebook }}
+ <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}"
+ onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
+ <i class="fa fa-facebook"></i>
+ <span class="hidden">Facebook</span>
+ </a>
+ {{ end }}
- <a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}"
- onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
- <i class="fa fa-google-plus"></i>
- <span class="hidden">Google+</span>
- </a>
+ {{ if or (not (isset .Site.Params "sharegoogleplus")) .Site.Params.shareGooglePlus }}
+ <a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}"
+ onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
+ <i class="fa fa-google-plus"></i>
+ <span class="hidden">Google+</span>
+ </a>
+ {{ end }}
</div>
</footer> \ No newline at end of file