LoveIt/layouts/partials/post/share.html

72 lines
3.8 KiB
HTML
Raw Normal View History

{{- if .Params.share.enable | default .Site.Params.share.enable | eq true -}}
{{- /* 001: Twitter */ -}}
{{- if .Params.Share.Twitter | default .Site.Params.Share.Twitter | eq true -}}
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Params.Social.Twitter }}" target="_blank" title="{{ T "share" }} Twitter">
{{- partial "function/icon.html" (dict "class" "fab fa-twitter fa-fw") -}}
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 002: Facebook */ -}}
{{- if .Params.Share.Facebook | default .Site.Params.Share.Facebook | eq true -}}
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="{{ T "share" }} Facebook">
{{- partial "function/icon.html" (dict "class" "fab fa-facebook-square fa-fw") -}}
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 003: Reddit */ -}}
{{- if .Params.Share.Reddit | default .Site.Params.Share.Reddit | eq true -}}
<a href="//reddit.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} Reddit">
{{- partial "function/icon.html" (dict "class" "fab fa-reddit fa-fw") -}}
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 004: Linkedin */ -}}
{{- if .Params.Share.Linkedin | default .Site.Params.Share.Linkedin | eq true -}}
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} LinkedIn">
{{- partial "function/icon.html" (dict "class" "fab fa-linkedin fa-fw") -}}
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 005: Pinterest */ -}}
{{- if .Params.Share.Pinterest | default .Site.Params.Share.Pinterest | eq true -}}
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T "share" }} Pinterest">
{{- partial "function/icon.html" (dict "class" "fab fa-pinterest fa-fw") -}}
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 006: Hacker News */ -}}
{{- if .Params.Share.Hackernews | default .Site.Params.Share.Hackernews | eq true -}}
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T "share" }} Hacker News">
{{- partial "function/icon.html" (dict "class" "fab fa-hacker-news fa-fw") -}}
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 007: Mix */ -}}
{{- if .Params.Share.Mix | default .Site.Params.Share.Mix | eq true -}}
<a href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T "share" }} Mix">
{{- partial "function/icon.html" (dict "class" "fab fa-mix fa-fw") -}}
2019-08-05 15:15:01 +02:00
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 008: Tumblr */ -}}
{{- if .Params.Share.Tumblr | default .Site.Params.Share.Tumblr | eq true -}}
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} Tumblr">
{{- partial "function/icon.html" (dict "class" "fab fa-tumblr fa-fw") -}}
2019-08-05 15:15:01 +02:00
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 009: VKontakte */ -}}
{{- if .Params.Share.VKontakte | default .Site.Params.Share.VKontakte | eq true -}}
<a href="//vk.com/share.php?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} VKontakte ">
{{- partial "function/icon.html" (dict "class" "fab fa-vk fa-fw") -}}
2019-08-05 15:15:01 +02:00
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* 010: 微博 */ -}}
{{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&amp;appkey=&amp;title={{ .Title }}{{ with $.Params.featuredImage }}&amp;pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} 微博">
{{- partial "function/icon.html" (dict "class" "fab fa-weibo fa-fw") -}}
2019-08-05 15:15:01 +02:00
</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
2020-02-06 17:10:00 +01:00
{{- end -}}