Skip to content

Commit

Permalink
feat(components): add more share services & redraw icons (#3709)
Browse files Browse the repository at this point in the history
  • Loading branch information
CN-ycx authored Dec 8, 2023
1 parent 8096b9d commit 1da2887
Show file tree
Hide file tree
Showing 25 changed files with 161 additions and 49 deletions.
22 changes: 20 additions & 2 deletions docs/components/src/guide/utilities/share.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,23 @@ The following built-in keywords are supported:
- facebook
- flipboard
- line
- linkedin
- messenger
- pinterest
- qq
- qzone
- qrcode
- reddit
- skype
- sms
- snapchat
- telegram
- tumblr
- twitter
- whatsapp
- vk
- weibo
- whatsapp
- wordpress

Besides the built-in keyword, you can add your own service config to `componentOptions.share.services`. Each of the config should be an object with the following properties:

Expand Down Expand Up @@ -84,14 +93,23 @@ If you are using twitter, you can set `componentOptions.share.twitterUserName` w
| "facebook"
| "flipboard"
| "line"
| "linkedin"
| "messenger"
| "pinterest"
| "qq"
| "qzone"
| "qrcode"
| "reddit"
| "skype"
| "sms"
| "snapchat"
| "telegram"
| "tumblr"
| "twitter"
| "vk"
| "weibo"
| "whatsapp"
| "weibo";
| "wordpress";

interface ShareServiceConfig {
/**
Expand Down
22 changes: 20 additions & 2 deletions docs/components/src/zh/guide/utilities/share.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,23 @@ description: 分享组件,将页面内容分享到社交媒体。
- facebook
- flipboard
- line
- linkedin
- messenger
- pinterest
- qq
- qzone
- qrcode
- reddit
- skype
- sms
- snapchat
- telegram
- tumblr
- twitter
- whatsapp
- vk
- weibo
- whatsapp
- wordpress

除了内置关键字外,你还可以将自己的服务配置添加到 `componentOptions.share.services` 中。 每个配置都应该是一个具有以下属性的对象:

Expand Down Expand Up @@ -84,14 +93,23 @@ description: 分享组件,将页面内容分享到社交媒体。
| "facebook"
| "flipboard"
| "line"
| "linkedin"
| "messenger"
| "pinterest"
| "qq"
| "qzone"
| "qrcode"
| "reddit"
| "skype"
| "sms"
| "snapchat"
| "telegram"
| "tumblr"
| "twitter"
| "vk"
| "weibo"
| "whatsapp"
| "weibo";
| "wordpress";

interface ShareServiceConfig {
/**
Expand Down
5 changes: 2 additions & 3 deletions packages/components/src/node/components/share/baidu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import type { ShareServiceConfig } from "../../../shared/index.js";

export const baidu: ShareServiceConfig = {
link: "http://cang.baidu.com/do/add?it=[title]&iu=[url]",
color: "#1d2fe3",
color: "#2319DC",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M226.522 536.053c96.993-20.839 83.792-136.761 80.878-162.089-4.758-39.065-50.691-107.346-113.075-101.952-78.499 7.036-89.957 120.445-89.957 120.445-10.62 52.4 25.396 164.4 122.154 143.596zm102.99 201.557c-2.848 8.175-9.18 29.014-3.686 47.173 10.822 40.707 46.168 42.55 46.168 42.55h50.792V703.169H368.41c-24.458 7.304-36.251 26.299-38.898 34.441zm77.025-395.944c53.572 0 96.859-61.646 96.859-137.9 0-76.12-43.287-137.767-96.859-137.767-53.472 0-96.892 61.646-96.892 137.767 0 76.253 43.42 137.9 96.892 137.9zm230.704 9.113c71.598 9.281 117.632-67.141 126.777-125.035 9.349-57.827-36.854-125.036-87.544-136.561-50.791-11.659-114.213 69.688-119.976 122.757-6.901 64.863 9.281 129.626 80.743 138.839zm175.425 340.395s-110.761-85.701-175.425-178.305c-87.645-136.593-212.177-81.011-253.822-11.558-41.478 69.452-106.106 113.375-115.286 125-9.314 11.458-133.813 78.666-106.173 201.423 27.64 122.69 124.7 120.345 124.7 120.345s71.53 7.036 154.519-11.524c83.021-18.428 154.484 4.59 154.484 4.59s193.919 64.929 246.988-60.072c53.004-125.036-29.985-189.899-29.985-189.899zM480.881 877.253H354.807c-54.443-10.855-76.12-48.044-78.867-54.343-2.68-6.433-18.125-36.317-9.951-87.109 23.52-76.12 90.627-81.614 90.627-81.614h67.107v-82.485l57.157.871v304.68zm234.793-.871h-145.07c-56.219-14.508-58.866-54.444-58.866-54.444V661.49l58.866-.938v144.199c3.586 15.345 22.682 18.159 22.682 18.159h59.771V661.49h62.618v214.892zm205.377-428.376c0-27.708-23.018-111.13-108.385-111.13-85.501 0-96.925 78.732-96.925 134.382 0 53.136 4.489 127.313 110.695 124.935 106.241-2.347 94.615-120.312 94.615-148.187z"/></svg>',
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><circle cx="512" cy="512" r="512" fill="#1D2FE3"/><path d="M239.022 704.978c.098-4.865-.314-9.772.162-14.591 5.178-52.464 197.571-253.377 249.641-259.233 42.996-4.833 75.768 16.545 99.824 49.144 37.893 51.351 82.81 95.455 131.292 136.237 52.903 44.503 56.525 99.801 32.6 158.592-23.425 57.56-75.34 69.833-127.771 58.804-84.971-17.874-168.158-13.744-253.37-4.536-86.35 9.333-133.788-39.4-132.378-124.417zM352.464 412.86c-3.58 50.707-17.93 96.128-75.9 98.12-58.053 1.995-80.093-41.432-79.275-91.71.81-49.705 13.416-104.053 76.851-102.136 53.84 1.625 74.74 45.8 78.324 95.726zm386.053 142.168c-68.494-1.735-84.188-43.331-82.635-93.812 1.46-47.519 10.082-97.628 73.299-96.65 61.395.95 81.6 43.207 81.553 98.668-.047 53.156-19.818 89.398-72.217 91.794zm-45.235-278.345c-10.464 42.665-24.513 91.761-85.919 94.502-52.74 2.354-71.705-34.482-72.805-81.242-1.233-52.42 48.08-112.965 87.582-110.373 33.943 2.226 71.146 49.541 71.142 97.113zm-195.147-14.097c-7.005 46.274-13.63 100.025-71.562 101.351-57.077 1.306-73.567-47.922-73.638-97.109-.068-48.054 12.128-99.024 69.345-101.426 59.45-2.493 67.11 51.093 75.855 97.184z" fill="#fff"/><path d="M479.52 663.165c.006 12.194 1.498 24.61-.284 36.537-4.707 31.503 18.862 78.749-45.326 77.534-54.226-1.027-103.338-3.31-113.231-73.536-7.164-50.852 7.78-85.674 57.687-102.668 17.67-6.016 39.618 5.058 54.096-14.548 10.84-14.679-2.901-54.592 33.418-41.47 24.075 8.7 11.477 38.922 13.278 59.652 1.68 19.366.359 38.99.363 58.5zm175.45 41.902c4.291 39.657 5.093 78.047-64.709 73.503-60.097-3.912-95.56-20.794-86.293-85.624 4.287-29.991-21.148-83.238 22.19-84.867 42.71-1.606 13.57 50.41 20.825 77.622 5.276 19.794-3.984 46.774 29.753 48.193 41.337 1.738 28.383-30.022 31.099-51.604 1.209-9.61-.85-19.65.528-29.215 2.516-17.474-8.928-44.716 19.554-47.191 36.044-3.133 24.155 28.376 26.678 47.523 1.896 14.387.375 29.225.375 51.66z" fill="#1D2FE3"/><path d="M435.669 685.038c-2.255 24.07 5.605 53.68-33.623 52.136-34.594-1.362-35.274-31.818-38.513-53.078-4.028-26.448 11.38-48.18 40.785-50.023 40.967-2.564 27.097 30.764 31.35 50.965z" fill="#fff"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M224 536c98-21 84-138 81-164-4-39-51-108-114-102-78 6-90 122-90 122-10 52 26 165 123 144m182-197c53 0 97-61 97-138S459 62 406 62s-98 62-98 139 44 138 98 138m-78 401c-3 7-9 28-3 46 10 42 46 44 46 44h51V705h-55c-24 6-36 26-39 35m310-390c72 9 118-69 129-128 9-57-38-125-89-136-52-12-115 69-121 123-8 66 9 130 81 141m286 97c0-28-22-112-109-112-86 0-98 79-98 136 0 53 5 128 113 126 106-3 94-121 94-150"/><path d="M815 692s-111-86-177-179c-89-138-213-82-255-12-42 71-108 114-117 126s-135 80-106 203c27 124 124 121 124 121s74 8 156-10c84-20 156 4 156 4s196 65 249-61c54-126-30-192-30-192M480 881H353c-54-12-76-50-79-56s-18-36-9-88c22-77 91-81 91-81h67v-84l57 1zm237-2H570c-55-15-58-55-58-55V663l58-1v145c5 15 24 18 24 18h60V663h63z"/></svg>',
};
48 changes: 27 additions & 21 deletions packages/components/src/node/components/share/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,63 @@ import { evernote } from "./evernote.js";
import { facebook } from "./facebook.js";
import { flipboard } from "./flipboard.js";
import { line } from "./line.js";
import { linkedin } from "./linkedin.js";
import { messenger } from "./messenger.js";
import { pinterest } from "./pinterest.js";
import { qq } from "./qq.js";
import { qrcode } from "./qrcode.js";
import { qzone } from "./qzone.js";
import { reddit } from "./reddit.js";
import { skype } from "./skype.js";
import { sms } from "./sms.js";
import { snapchat } from "./snapchat.js";
import { telegram } from "./telegram.js";
import { tumblr } from "./tumblr.js";
import { twitter } from "./twitter.js";
import { vk } from "./vk.js";
import { weibo } from "./weibo.js";
import { whatsapp } from "./whatsapp.js";
import { wordpress } from "./wordpress.js";
import type {
BuiltInShareService,
ShareServiceConfig,
} from "../../../shared/index.js";

export const SHARE_CONFIG: Record<BuiltInShareService, ShareServiceConfig> = {
qq,
weibo,
facebook,
twitter,
buffer,
wordpress,
qzone,
douban,
email,
evernote,
facebook,
flipboard,
line,
qq,
qrcode,
whatsapp,
telegram,
vk,
pinterest,
tumblr,
messenger,
reddit,
skype,
telegram,
twitter,
weibo,
whatsapp,
snapchat,
flipboard,
linkedin,
email,
qrcode,
sms,

// hackernews: "https://news.ycombinator.com/submitlink?u=[url]&t=[title]",
// instapaper:
// "http://www.instapaper.com/edit?url=[url]&title=[title]&description=[description]",
// linkedin: "https://www.linkedin.com/sharing/share-offsite/?url=[url]",
// messenger: "fb-messenger://share/?link=[url]",
// odnoklassniki:
// "https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=[url]&st.comments=[title]",
// pinterest:
// "https://pinterest.com/pin/create/button/?url=[url]&media=[cover|image]&description=[title]",
// pocket: "https://getpocket.com/save?url=[url]&title=[title]",
// quora: "https://www.quora.com/share?url=[url]&title=[title]",
// sms: "sms:?body=[title]%0D%0A[url]%0D%0A[description]",
// stumbleupon: "https://www.stumbleupon.com/submit?url=[url]&title=[title]",
// tumblr:
// "https://www.tumblr.com/share/link?url=[url]&name=[title]&description=[description]",

// viber: "viber://forward?text=[title]%0D%0A[url]%0D%0A[description]",
// vk: "https://vk.com/share.php?url=[url]&title=[title]&description=[description]&image=[cover|image]&noparse=true",

// wordpress:
// "https://wordpress.com/press-this.php?u=[url]&t=[title]&s=[description]&i=[cover|image]",
// xing: "https://www.xing.com/social/share/spi?op=share&url=[url]&title=[title]",
// yammer:
// "https://www.yammer.com/messages/new?login=true&status=[title]%0D%0A[url]%0D%0A[description]",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/node/components/share/douban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ShareServiceConfig } from "../../../shared/index.js";

export const douban: ShareServiceConfig = {
link: "https://shuo.douban.com/!service/share?href=[url]&name=[title]&text=[description|summary]&image=[cover|image]&starid=0&aid=0&style=11",
color: "#00b51d",
color: "#30c171",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M943.4 65.7H81.6c-8.8 0-16 7.1-16 16v63.8c0 8.8 7.1 16 16 16h861.7c8.8 0 16-7.1 16-16V81.6c0-8.8-7.1-15.9-15.9-15.9zm0 797.9h-233l83-207.5h70.2c8.8 0 16-7.1 16-16v-367c0-8.8-7.1-16-16-16H161.4c-8.8 0-16 7.1-16 16v367c0 8.8 7.1 16 16 16h504.3l-83 207.5H426.3L368.9 720c0-8.8-7.1-16-16-16h-95.7c-8.8 0-16 7.1-16 16l57.4 143.6h-217c-8.8 0-16 7.1-16 16v63.8c0 8.8 7.1 16 16 16h861.7c8.8 0 16-7.1 16-16v-63.8c0-8.9-7.1-16-15.9-16zM289.1 560.4V352.9h446.8v207.5H289.1z"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M897 113H126c-8 0-14 7-14 13v58c0 7 6 13 14 13h771c6 0 13-6 13-13v-58a13 13 0 0 0-14-14zm0 715H689l74-186h63c7 0 13-7 13-15V299c0-8-5-15-13-15H197c-7 0-14 6-14 13v329c0 7 7 15 14 15h452l-75 186H434l-51-129c0-7-8-13-14-13h-85c-8 0-14 6-14 13l51 129H127c-6 0-13 6-13 14v58c0 7 7 13 13 13h771c8 0 14-6 14-13v-58c0-8-6-14-14-14zM311 556V370h400v186z"/></svg>',
};
2 changes: 1 addition & 1 deletion packages/components/src/node/components/share/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export const email: ShareServiceConfig = {
color: "#1384FF",
action: "open",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M146.375 174.5C99.793 174.5 62 212.293 62 258.875c0 26.543 12.48 51.504 33.75 67.5l382.5 286.875c20.04 14.941 47.46 14.941 67.5 0l382.5-286.875c21.27-15.996 33.75-40.957 33.75-67.5 0-46.582-37.793-84.375-84.375-84.375h-731.25zM62 371.375V737c0 62.05 50.45 112.5 112.5 112.5h675c62.05 0 112.5-50.45 112.5-112.5V371.375L579.5 658.25a112.324 112.324 0 0 1-135 0L62 371.375z"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M152 177h720c49 0 89 37 90 83L512 494 63 260c0-46 40-83 89-83M62 349v414c0 46 41 84 90 84h720c49 0 90-38 90-84V349L523 572a24 24 0 0 1-22 0z"/></svg>',
};
5 changes: 2 additions & 3 deletions packages/components/src/node/components/share/evernote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import type { ShareServiceConfig } from "../../../shared/index.js";

export const evernote: ShareServiceConfig = {
link: "https://www.evernote.com/clip.action?url=[url]&title=[title]",
color: "#3c599b",
color: "#14cc45",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M369.64 264.42c3.2 44.62-35.1 43.18-43.22 43.18-137.86 0-147.28-2-167.16 6.68-1.12.44-1.48 0-.74-.74L375.58 92.9c.76-.74 1.2-.44.76.74-8.7 19.98-6.7 30.18-6.7 170.78zm158 616c-29.36-74.16 26-153.86 105.04-153.24 34.98 0 45.2 46.42 15.9 62.84-12.38 6.6-49.9 3.48-50.28 38.4-.1 34.18 39.34 50 62.4 49.78a91.28 91.28 0 0 0 91.3-91.3v-.16c0-23.26-15.58-94.44-95.08-110.68-15.44-3.08-130-12.7-136.7-101.04C512.74 608.88 485.42 702 434 713.2c-17.48 3.88-139.36 15.28-225.84-73.54 0 0-37.14-30.46-56.46-115.9-6.76-31.5-18.56-79.4-22.28-124 0-36 22.28-60.9 50.14-64.4 162 0 180 4.64 202-15.6 19.64-18.48 15.6-31 15.6-205.56 2-16.6 15.58-61.62 106.82-48.28 12 1.72 63.82 8.36 74.96 61.28l128.52 22.3c40.86 7.42 141.88 14 161.2 115.88 45.32 242.18 17.82 476.92 15.6 476.92C852.3 971.06 662.12 960 662.12 960c-37.9-.46-108.5-18.8-134.54-79.66zm161.88-409.68c-2 3.84-4.4 12 1.7 14 28.18 9.86 79.5 13.68 91.76 11.06 6.22-.5 6.1-8.86 4.96-13.3-7.06-43.7-81.66-53-98.48-11.84z"/></svg>',
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><circle cx="512" cy="512" r="512" fill="#14cc45"/><path fill="#595757" d="M347.671 193.259v87.51h-87.51z"/><path fill="#595757" d="M788.047 323.645s3.65-77.491-73.84-103.02c0 0-89.479-12.867-151.41-11.91 0 0-8.595-53.23-103.33-53.23 0 0-89.556-1.244-89.892 70.526v61.671s2.848 14.991-27.833 14.991h-81.581s-34.28 5.282-34.28 72.934c0 0 3.133 120.082 41.322 200.24 0 0 9.398 34.667 58.228 46.577 0 0 95.822 25.477 123.991 21.722 0 0 58.228 22.137 62.008-111.874 0 0 3.755-19.935 6.266 11.392 0 0-1.89 68.948 57.607 72.702 0 0 45.723 12.557 73.892 10.045 0 0 37.568 2.15 37.568 64.158 0 0 13.152 71.665-34.435 71.665h-65.763s-18.149 4.428-18.149-21.877c0 0-4.997-21.878 26.305-21.878h15.534v-43.756h-43.082s-66.332-6.317-66.332 50.047v75.135s9.347 49.866 66.332 49.866h121.273s48.441.44 76.61-90.359c0-.078 48.52-182.323 22.991-435.767zM625.272 486.523c0-21.877 18.02-51.16 39.432-51.16s36.48 36.118 36.48 58.022c-28.79-7.897-45.827-9.606-75.912-6.862z"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M300 111v113H187z"/><path d="M872 280s5-100-96-134c0 0-116-16-196-15 0 0-11-69-135-69 0 0-116-2-116 91v80s3 20-36 20H187s-45 7-45 94c0 0 4 156 54 260 0 0 12 45 75 60 0 0 125 33 161 28 0 0 76 29 81-145 0 0 5-25 8 15 0 0-2 90 75 94 0 0 59 17 96 13 0 0 49 3 49 84 0 0 17 93-45 93h-85s-24 5-24-29c0 0-6-28 34-28h20v-57h-56s-86-8-86 65v97s12 65 86 65h158s63 1 99-117c0 0 64-236 30-565M661 491c0-28 23-66 51-66s48 47 48 75c-38-10-60-12-99-9"/></svg>',
};
3 changes: 1 addition & 2 deletions packages/components/src/node/components/share/facebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export const facebook: ShareServiceConfig = {
link: "https://www.facebook.com/sharer/sharer.php?u=[url]&title=[title]&description=[description]&quote=[summary]&hashtag=[tags]",
color: "#3c599b",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M960 113.4v797c0 27.4-22.2 49.4-49.4 49.4H682.2V613h116.4L816 477.8H682v-86.4c0-39.2 10.8-65.8 67-65.8h71.6v-121c-12.4-1.6-54.8-5.4-104.4-5.4-103.2 0-174 63-174 178.8v99.8H425.4V613h116.8v347H113.4C86.2 960 64 937.8 64 910.6V113.4C64 86.2 86.2 64 113.4 64h797c27.4 0 49.6 22.2 49.6 49.4z"/></svg>',
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="#537bbc" d="M512.298 1021.22c281.23 0 509.235-227.973 509.235-509.22 0-281.218-228.005-509.22-509.235-509.22C231.066 2.78 3.078 230.782 3.078 512c0 281.247 227.986 509.22 509.22 509.22"/><path fill="#fff" d="M353.357 400.378h68.151v-66.235c0-29.206.737-74.247 21.952-102.142 22.348-29.542 53.026-49.622 105.794-49.622 85.976 0 122.18 12.263 122.18 12.263L654.4 295.61s-28.407-8.213-54.903-8.213c-26.512 0-50.243 9.5-50.243 35.995v76.988h108.687L650.352 499H549.254v342.602H421.508V499h-68.15v-98.622z"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M295 360h93v-91c0-40 1-101 30-139 30-41 72-68 144-68 118 0 168 17 168 17l-24 138s-39-12-75-12-69 13-69 50v105h149l-10 134H562v468H388V494h-93z"/></svg>',
};
3 changes: 1 addition & 2 deletions packages/components/src/node/components/share/flipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export const flipboard: ShareServiceConfig = {
link: "https://share.flipboard.com/bookmarklet/popout?v=2&url=[url]&title=[title]",
color: "#e12828",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M90.125 90.125h270.703v843.75H90.125V90.125zm298.828 298.828h274.219v274.219H388.953V388.953zm0-298.828h544.922v270.703H388.953V90.125z"/></svg>',
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><circle cx="512" cy="512" r="512" fill="#e12828"/><path fill="#fff" d="M263.487 261.893H445.92V809.17H263.487V261.893z"/><path fill="#fce9e9" d="M445.92 261.893h364.842v182.435H445.92V261.893z"/><path fill="#f6bebe" d="M445.92 444.328h182.435v182.435H445.92V444.328z"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M122 122h257v800H122zm284 284h259v259H406zm0-284h516v257H406z"/></svg>',
};
4 changes: 2 additions & 2 deletions packages/components/src/node/components/share/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ShareServiceConfig } from "../../../shared/index.js";

export const line: ShareServiceConfig = {
link: "https://line.me/R/msg/text/?[title]%0D%0A[url]%0D%0A[description|summary]",
color: "#00b902",
color: "#00C300",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M806.6 426.52a25.24 25.24 0 0 1 0 50.44h-70.2v45h70.2a25.2 25.2 0 1 1 0 50.36h-95.44a25.24 25.24 0 0 1-25.08-25.16V356.32c0-13.8 11.28-25.2 25.2-25.2h95.44a25.2 25.2 0 0 1-.12 50.4h-70.2v45h70.2zM652.4 547.16a25.2 25.2 0 0 1-25.24 25.08 24.72 24.72 0 0 1-20.4-10l-97.72-132.68v117.6a25.2 25.2 0 0 1-50.28 0V356.32a25.08 25.08 0 0 1 24.96-25.12c7.8 0 15 4.16 19.8 10.16L602 474.56V356.32c0-13.8 11.28-25.2 25.2-25.2 13.8 0 25.2 11.4 25.2 25.2v190.84zm-229.64 0a25.28 25.28 0 0 1-25.24 25.16 25.24 25.24 0 0 1-25.08-25.16V356.32c0-13.8 11.28-25.2 25.2-25.2 13.84 0 25.12 11.4 25.12 25.2v190.84zm-98.64 25.16h-95.44a25.36 25.36 0 0 1-25.2-25.16V356.32c0-13.8 11.4-25.2 25.2-25.2 13.92 0 25.2 11.4 25.2 25.2v165.64h70.24a25.2 25.2 0 0 1 0 50.36M992 444.56c0-214.84-215.4-389.68-480-389.68S32 229.72 32 444.56C32 637 202.8 798.24 433.4 828.88c15.64 3.28 36.92 10.32 42.32 23.6 4.8 12.04 3.16 30.64 1.52 43.2l-6.56 40.8c-1.8 12.04-9.6 47.44 41.96 25.8 51.64-21.56 276.64-163.12 377.44-279C959.04 607.72 992 530.32 992 444.56"/></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M962 447c0-201-203-365-450-365S62 246 62 447c0 178 160 332 377 363 14 3 34 10 39 22a91 91 0 0 1 0 41l-7 38c0 11-9 45 39 25a1422 1422 0 0 0 354-261c60-59 95-140 96-225zM336 567h-89c-13 0-23-10-23-23V365a23 23 0 0 1 23-24c13 0 23 11 23 24v154h66c13 1 23 12 23 25s-11 23-23 23m93-23a23 23 0 0 1-47 0V365a23 23 0 0 1 47 0zm215 0c0 10-7 19-16 22h-8a23 23 0 0 1-18-9l-90-124v111a23 23 0 0 1-47 0V365c0-11 6-20 16-23h8a23 23 0 0 1 18 9l92 124V364a23 23 0 0 1 47 0zm144-113a23 23 0 1 1 0 46h-65v42h65c13 1 24 11 23 24 0 13-10 23-23 23h-91c-12 0-23-10-23-23V364c0-13 10-23 23-23h89c13 0 24 10 24 23a23 23 0 0 1-24 24h-63v42z"/></svg>',
};
8 changes: 8 additions & 0 deletions packages/components/src/node/components/share/linkedin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { ShareServiceConfig } from "../../../shared/index.js";

export const linkedin: ShareServiceConfig = {
link: "https://www.linkedin.com/sharing/share-offsite/?url=[url]",
color: "#4376B1",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M912 598v297H740V618c0-69-24-117-86-117-48 0-76 32-89 63-4 11-5 27-5 42v289H388s3-469 0-517h172v72l-1 3h1v-3c23-35 63-84 155-84 113 0 197 74 197 232M209 130c-59 0-97 37-97 88 0 50 37 90 95 90h1c60 0 97-40 97-90-1-51-37-88-96-88m-87 765h171V378H122z"/></svg>',
};
9 changes: 9 additions & 0 deletions packages/components/src/node/components/share/messenger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { ShareServiceConfig } from "../../../shared/index.js";

export const messenger: ShareServiceConfig = {
link: "fb-messenger://share/?link=[url]",
color: "#0183FF",
action: "open",
shape:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M512 62C266 62 68 248 68 478c0 121 56 235 155 315v169l165-87c42 12 82 15 124 15 246 0 444-184 444-414 0-228-198-414-444-414m45 552L445 494 236 613l231-246 114 114 204-114z"/></svg>',
};
Loading

0 comments on commit 1da2887

Please sign in to comment.