Add pinterest share button. (#16)

Close #15
This commit is contained in:
John Sing Dao Siu 2019-09-11 16:25:14 -04:00 committed by Vimux
parent e72cb22fa3
commit 33bff944f2
2 changed files with 7 additions and 1 deletions

View file

@ -177,6 +177,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
linkedin = true
vk = true
pocket = true
pinterest = true
# Web App Manifest settings
# https://www.w3.org/TR/appmanifest/
@ -302,7 +303,7 @@ More information available at [Hugo Related Content](https://gohugo.io/content-m
To display share buttons, set up `[Params.Share]` specific parameters in your site config file.
Available share buttons: Facebook, Twitter, Reddit, Telegram, LinkedIn, VK, Pocket
Available share buttons: Facebook, Twitter, Reddit, Telegram, LinkedIn, VK, Pocket, Pinterest
#### Thumbnail Image

View file

@ -35,5 +35,10 @@
{{ partial "svg/pocket.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.pinterest" }}
<a class="share__link btn" title="{{ T "save-caption" }} Pinterest" href="https://pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "save-caption" }} Pocket', 'width=800,height=720,toolbar=0,status=0'); return false">
{{ partial "svg/pinterest.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
</div>
{{- end }}