diff --git a/README.md b/README.md index 74e9155..927dd03 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ > Lightweight, stylish, and ethical share buttons -- **Small.** Dependency-free. CSS+JS bundle is 7.5 kB minified and brotlied. +- **Small.** Dependency-free. CSS+JS bundle is under 7.7 KiB minified and brotlied. - **Stylish.** Uses official vector logos and colours with no visual mess. - **Ethical.** Embeds no tracking code. JS is required only for the setup. @@ -96,7 +96,9 @@ names of which match the names of the social networks (or `copy-url`, for the + + @@ -114,6 +116,7 @@ names of which match the names of the social networks (or `copy-url`, for the + ``` diff --git a/assets/demo@2x.png b/assets/demo@2x.png index 7402575..4cf728d 100644 Binary files a/assets/demo@2x.png and b/assets/demo@2x.png differ diff --git a/index.html b/index.html index adb6fe4..9e82df1 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@ + @@ -61,6 +62,7 @@ + @@ -93,6 +95,7 @@ + @@ -115,29 +118,30 @@

Specimen

- - + Share + + Toot -
+ Pin - Send - + + Post -
- Поделиться + Send + - + Copy URL - Print +
diff --git a/package.json b/package.json index 5b405ea..a8fa777 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ }, "size-limit": [ { - "limit": "6.3 KiB", + "limit": "6.6 KiB", "path": "./dist/shareon.min.css" }, { diff --git a/src/icons/lobsters.svg b/src/icons/lobsters.svg new file mode 100644 index 0000000..87d1b72 --- /dev/null +++ b/src/icons/lobsters.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/shareon.css b/src/shareon.css index 1a1cd8a..0746ed5 100644 --- a/src/shareon.css +++ b/src/shareon.css @@ -123,6 +123,13 @@ background-image: url("icons/linkedin.svg"); } +.shareon > .lobsters { + background-color: #ac130d; +} +.shareon > .lobsters:before { + background-image: url("icons/lobsters.svg"); +} + .shareon > .mastodon { background-color: #6364ff; } diff --git a/src/shareon.js b/src/shareon.js index 15713d3..9421d44 100644 --- a/src/shareon.js +++ b/src/shareon.js @@ -19,11 +19,12 @@ import "./shareon.css"; */ const urlBuilderMap = { bluesky: (d) => `https://bsky.app/intent/compose?text=${d.text || d.title}%0A%0A${d.url}`, + email: (d) => `mailto:?subject=${d.title}&body=${d.url}`, facebook: (d) => `https://www.facebook.com/sharer/sharer.php?u=${d.url}${d.hashtags ? `&hashtag=%23${d.hashtags.split('%2C')[0]}` : ''}`, fediverse: (d) => `https://${d.s2fInstance}/?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}${d.via ? `%0D%0A%0D%0A${d.via}` : ''}`, - email: (d) => `mailto:?subject=${d.title}&body=${d.url}`, hackernews: (d) => `https://news.ycombinator.com/submitlink?u=${d.url}&t=${d.title}`, linkedin: (d) => `https://www.linkedin.com/sharing/share-offsite/?url=${d.url}`, + lobsters: (d) => `https://lobste.rs/stories/new?url=${d.url}&title=${d.title}`, 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}`, odnoklassniki: (d) => `https://connect.ok.ru/offer?url=${d.url}&title=${d.title}${d.media ? `&imageUrl=${d.media}` : ''}`,