Skip to content

Commit

Permalink
feat: add sharer bluesky
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Dec 11, 2024
1 parent 8aa38c6 commit 2b4a3e0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ntnyq.eslint-command",
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker"
]
}
10 changes: 6 additions & 4 deletions docs/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,23 @@ Some demos.
```vue
<social-share
:networks="[
'bluesky',
'douban',
'email',
'facebook',
'line',
'qq',
'telegram',
'twitter',
'line',
'reddit',
'skype',
'douban',
'whatsapp',
'telegram',
'weibo',
]"
/>
```

<social-share :networks="['facebook', 'qq', 'twitter', 'line', 'reddit', 'skype', 'douban', 'whatsapp', 'telegram', 'weibo']" />
<social-share :networks="['bluesky', 'douban', 'facebook', 'line', 'qq', 'telegram', 'twitter', 'reddit', 'skype', 'whatsapp', 'weibo']" />

## User-customed networks

Expand Down
11 changes: 6 additions & 5 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,20 @@ Default networks set for all your social share components, no matter it's in glo

Currently, networks below are built-in supported:

- bluesky <social-share class="list-demo-sns" :networks="['bluesky']" />
- douban <social-share class="list-demo-sns" :networks="['douban']"/>
- email <social-share class="list-demo-sns" :networks="['email']"/>
- facebook <social-share class="list-demo-sns" :networks="['facebook']"/>
- line <social-share class="list-demo-sns" :networks="['line']"/>
- qq <social-share class="list-demo-sns" :networks="['qq']"/>
- qrcode <social-share class="list-demo-sns" :networks="['qrcode']" />
- reddit <social-share class="list-demo-sns" :networks="['reddit']"/>
- email <social-share class="list-demo-sns" :networks="['email']"/>
- skype <social-share class="list-demo-sns" :networks="['skype']"/>
- telegram <social-share class="list-demo-sns" :networks="['telegram']"/>
- twitter <social-share class="list-demo-sns" :networks="['twitter']"/>
- wechat <social-share class="list-demo-sns" :networks="['wechat']" />
- weibo <social-share class="list-demo-sns" :networks="['weibo']"/>
- qq <social-share class="list-demo-sns" :networks="['qq']"/>
- douban <social-share class="list-demo-sns" :networks="['douban']"/>
- whatsapp <social-share class="list-demo-sns" :networks="['whatsapp']"/>
- wechat <social-share class="list-demo-sns" :networks="['wechat']" />
- qrcode <social-share class="list-demo-sns" :networks="['qrcode']" />

::: warning Note
There is no single, standard way in which browsers/email clients handle mailto links (e.g. subject and body fields may be discarded without a warning). Also there is a risk that popup and ad blockers, anti-virus software etc. may silently block forced opening of mailto links.
Expand Down
7 changes: 7 additions & 0 deletions src/node/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import type { SocialShareNetworkData, SocialSharePluginOptions } from '../shared

// @keep-sorted
export const BUILT_IN_NETWORKS: SocialShareNetworkData = {
bluesky: {
sharer: 'https://bsky.app/intent/compose?text=@title%20%0A@url',
type: 'popup',
color: '#0057a8',
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M407.8 294.7c-3.3-.4-6.7-.8-10-1.3c3.4.4 6.7.9 10 1.3M288 227.1c-26.1-50.7-97.1-145.2-163.1-191.8C61.6-9.4 37.5-1.7 21.6 5.5C3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7c3.3-.5 6.6-.9 10-1.4c-3.3.5-6.6 1-10 1.4c-93.9 14-177.3 48.2-67.9 169.9C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4c102.4-103.4 28.1-156-65.8-169.9c-3.3-.4-6.7-.8-10-1.3c3.4.4 6.7.9 10 1.3c64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1"/></svg>',
},

douban: {
sharer:
'https://shuo.douban.com/!service/share?href=@url&name=@title&text=@description&image=@media&starid=0&aid=0&style=11',
Expand Down

0 comments on commit 2b4a3e0

Please sign in to comment.