diff options
author | gabrielgio <gabriel.giovanini@pm.me> | 2020-07-11 22:35:14 +0200 |
---|---|---|
committer | gabrielgio <gabriel.giovanini@pm.me> | 2020-07-11 22:35:14 +0200 |
commit | 60fe49ea3af38d4a7d5e8de1cdb72887b167b22d (patch) | |
tree | bb05011c311b74c7c7676b7b689bbbc2c8546c9a /themes/ananke/layouts/partials/social-share.html | |
parent | 60b4299cb90a5b3f6e74ffd0ee0f51a0008fb3cf (diff) | |
download | gabrielgio.me-60fe49ea3af38d4a7d5e8de1cdb72887b167b22d.tar.gz gabrielgio.me-60fe49ea3af38d4a7d5e8de1cdb72887b167b22d.tar.bz2 gabrielgio.me-60fe49ea3af38d4a7d5e8de1cdb72887b167b22d.zip |
Moving from jekyll to hugo
Diffstat (limited to 'themes/ananke/layouts/partials/social-share.html')
-rw-r--r-- | themes/ananke/layouts/partials/social-share.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/themes/ananke/layouts/partials/social-share.html b/themes/ananke/layouts/partials/social-share.html new file mode 100644 index 0000000..eb313c0 --- /dev/null +++ b/themes/ananke/layouts/partials/social-share.html @@ -0,0 +1,26 @@ +{{ $title := .Title }} +{{ $url := printf "%s" .Permalink | absLangURL }} +{{ $icon_size := "32px" }} + +{{ if not .Params.disable_share }} + <div id="sharing" class="mt3"> + + {{ $facebook_href := printf "https://www.facebook.com/sharer.php?u=%s" $url }} + <a href="{{ $facebook_href }}" class="facebook no-underline" aria-label="share on Facebook"> + {{ partialCached "svg/facebook.svg" (dict "size" $icon_size) $icon_size }} + </a> + + {{ $twitter_href := printf "https://twitter.com/share?url=%s&text=%s" $url $title }} + {{ with .Site.Social.twitter }} + {{ $twitter_href = printf "%s&via=%s" $twitter_href . }} + {{ end }} + <a href="{{ $twitter_href }}" class="twitter no-underline" aria-label="share on Twitter"> + {{ partialCached "svg/twitter.svg" (dict "size" $icon_size) $icon_size }} + </a> + + {{ $linkedin_href := printf "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s" $url $title }} + <a href="{{ $linkedin_href }}" class="linkedin no-underline" aria-label="share on LinkedIn"> + {{ partialCached "svg/linkedin.svg" (dict "size" $icon_size) $icon_size }} + </a> + </div> +{{ end }} |