From 2fa97b40e15f574dd22abdbfdd442c04af5681ed Mon Sep 17 00:00:00 2001 From: f Date: Sat, 14 Nov 2020 20:40:04 -0300 Subject: [PATCH] compartir --- _data/en.yml | 22 +++++++++++----------- _data/es.yml | 22 +++++++++++----------- _includes/share.html | 5 +++-- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/_data/en.yml b/_data/en.yml index bdccd11..66b7e83 100644 --- a/_data/en.yml +++ b/_data/en.yml @@ -58,27 +58,27 @@ share: text: Share icon: share-alt items: - - title: Fediverse - url: "https://fediverse.sutty.nl/en/?u=%url&t=%title&d=%description" - icon: mastodon-alt - - title: Facebook - url: "https://www.facebook.com/sharer/sharer.php?u=%url&t=%title%0A%0A%description" - icon: facebook-official - title: Twitter - url: "https://twitter.com/intent/tweet?url=%url&text=%title%0A%0A%description&hashtags=ContamosConVoz" + url: "https://twitter.com/intent/tweet?url=%url&text=%title%0A%0A%description&hashtags=%tags" icon: twitter + - title: Facebook + url: "https://www.facebook.com/sharer/sharer.php?u=%url&t=%title%0A%0A%description" + icon: facebook-official - title: Whatsapp url: "https://api.whatsapp.com/send?text=%title%0A%0A%description%0A%0A%url" icon: whatsapp - title: Telegram - url: "https://t.me/share/url?url=%url&text=%title%0A%0A%description" + url: "https://t.me/share/url?url=%url&text=%title%0A%0A%description" icon: telegram - title: Tumblr - url: "https://www.tumblr.com/widgets/share/tool?canonicalUrl=%url&title=%title&caption=%description&tags=ContamosConVoz" + url: "https://www.tumblr.com/widgets/share/tool?canonicalUrl=%url&title=%title&caption=%description&tags=%tags" icon: tumblr - title: Reddit - url: "https://reddit.com/submit?url=%url&title=ConVozContamos%20-%20%title" + url: "https://reddit.com/submit?url=%url&title=%tags%20-%20%title" icon: reddit - title: E-mail - url: "mailto:?subject=%title&body=%description%0A%0A%url" + url: "mailto:?subject=%title&body=%description%0A%0A%url" icon: envelope + - title: Fediverse + url: "https://fediverse.sutty.nl/en/?u=%url&t=%title&d=%description%20%tags" + icon: mastodon-alt diff --git a/_data/es.yml b/_data/es.yml index b902424..57f9efa 100644 --- a/_data/es.yml +++ b/_data/es.yml @@ -58,27 +58,27 @@ share: text: Compartir icon: share-alt items: - - title: Fediverso - url: "https://fediverse.sutty.nl/es/?u=%url&t=%title&d=%description" - icon: mastodon-alt - - title: Facebook - url: "https://www.facebook.com/sharer/sharer.php?u=%url&t=%title%0A%0A%description" - icon: facebook-official - title: Twitter - url: "https://twitter.com/intent/tweet?url=%url&text=%title%0A%0A%description&hashtags=ContamosConVoz" + url: "https://twitter.com/intent/tweet?url=%url&text=%title%0A%0A%description&hashtags=%tags" icon: twitter + - title: Facebook + url: "https://www.facebook.com/sharer/sharer.php?u=%url&t=%title%0A%0A%description" + icon: facebook-official - title: Whatsapp url: "https://api.whatsapp.com/send?text=%title%0A%0A%description%0A%0A%url" icon: whatsapp - title: Telegram - url: "https://t.me/share/url?url=%url&text=%title%0A%0A%description" + url: "https://t.me/share/url?url=%url&text=%title%0A%0A%description" icon: telegram - title: Tumblr - url: "https://www.tumblr.com/widgets/share/tool?canonicalUrl=%url&title=%title&caption=%description&tags=ContamosConVoz" + url: "https://www.tumblr.com/widgets/share/tool?canonicalUrl=%url&title=%title&caption=%description&tags=%tags" icon: tumblr - title: Reddit - url: "https://reddit.com/submit?url=%url&title=ConVozContamos%20-%20%title" + url: "https://reddit.com/submit?url=%url&title=%tags%20-%20%title" icon: reddit - title: Correo - url: "mailto:?subject=%title&body=%description%0A%0A%url" + url: "mailto:?subject=%title&body=%description%0A%0A%url" icon: envelope + - title: Fediverso + url: "https://fediverse.sutty.nl/es/?u=%url&t=%title&d=%description%20%tags" + icon: mastodon-alt diff --git a/_includes/share.html b/_includes/share.html index 50e59a4..ca25452 100644 --- a/_includes/share.html +++ b/_includes/share.html @@ -5,6 +5,7 @@ {% endunless %} {% assign title = include.title | default: '' | cgi_escape %} {% assign description = include.description | default: '' | cgi_escape %} +{% assign tags = include.tags | join: ',' | default: '' | cgi_escape %} + href="{{ include.share.url | replace: '%url', url | replace: '%title', title | replace: '%description', description | replace: '%tags', tags }}"> {{ include.share.title }}