diff --git a/index.html b/index.html index bde6cca..67907ed 100644 --- a/index.html +++ b/index.html @@ -45,6 +45,7 @@ + @@ -67,6 +68,7 @@ + @@ -94,6 +96,7 @@ + @@ -118,6 +121,7 @@ Поделиться + Share diff --git a/src/icons/email.svg b/src/icons/email.svg new file mode 100644 index 0000000..c694920 --- /dev/null +++ b/src/icons/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/shareon.css b/src/shareon.css index 8339582..c5024d5 100644 --- a/src/shareon.css +++ b/src/shareon.css @@ -81,6 +81,10 @@ background-image: url("icons/copy-url-done.svg"); } +.shareon > .email:before { + background-image: url("icons/email.svg"); +} + .shareon > .facebook { background-color: #1877f2; } diff --git a/src/shareon.js b/src/shareon.js index d5ce29f..c8cfc50 100644 --- a/src/shareon.js +++ b/src/shareon.js @@ -18,6 +18,7 @@ import "./shareon.css"; */ const urlBuilderMap = { facebook: (d) => `https://www.facebook.com/sharer/sharer.php?u=${d.url}${d.hashtags? `&hashtag=%23${d.hashtags.split('%2C')[0]}` : ''}`, + email: (d) => `mailto:?subject=${d.title}&body=${d.url}`, linkedin: (d) => `https://www.linkedin.com/sharing/share-offsite/?url=${d.url}`, mastodon: (d) => `https://toot.kytta.dev/?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}${d.via ? `%0D%0A%0D%0A${d.via}` : ''}`, messenger: (d) => `https://www.facebook.com/dialog/send?app_id=${d.fbAppId}&link=${d.url}&redirect_uri=${d.url}`,