Skip to content

Commit

Permalink
feat: add new network pinterest
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Jan 5, 2025
1 parent 7fcd50c commit 291444e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
40 changes: 19 additions & 21 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,41 +44,39 @@ export default defineUserConfig({

plugins: [
shikiPlugin({
// @keep-sorted
langs: [
'bash',
'css',
'html',
'js',
'ts',
'md',
'json',
'jsonc',
'jsx',
'md',
'scss',
'shell',
'ts',
'tsx',
'html',
'vue',
'css',
'scss',
'json',
'jsonc',
'yml',
'yaml',
'bash',
'shell',
'yml',
],
theme: 'one-dark-pro',
}),
socialSharePlugin({
// @keep-sorted
networks: [
'email',
'facebook',
'linkedin',
'pinterest',
'qq',
'reddit',
'twitter',
'weibo',
'email',
'wechat',
'linkedin',
{
name: 'pinterest',
type: 'popup',
icon: '/pinterest.png',
default: true,
sharer:
'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title',
},
'weibo',
'x',
],
twitterUser: 'ntnyq',
fallbackImage: '/hero.png',
Expand Down
7 changes: 7 additions & 0 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export const BUILT_IN_NETWORKS = {
sharer: 'https://www.linkedin.com/sharing/share-offsite/?url=@url',
type: 'popup',
},
pinterest: {
color: '#bd081c',
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M496 256c0 137-111 248-248 248c-25.6 0-50.2-3.9-73.4-11.1c10.1-16.5 25.2-43.5 30.8-65c3-11.6 15.4-59 15.4-59c8.1 15.4 31.7 28.5 56.8 28.5c74.8 0 128.7-68.8 128.7-154.3c0-81.9-66.9-143.2-152.9-143.2c-107 0-163.9 71.8-163.9 150.1c0 36.4 19.4 81.7 50.3 96.1c4.7 2.2 7.2 1.2 8.3-3.3c.8-3.4 5-20.3 6.9-28.1c.6-2.5.3-4.7-1.7-7.1c-10.1-12.5-18.3-35.3-18.3-56.6c0-54.7 41.4-107.6 112-107.6c60.9 0 103.6 41.5 103.6 100.9c0 67.1-33.9 113.6-78 113.6c-24.3 0-42.6-20.1-36.7-44.8c7-29.5 20.5-61.3 20.5-82.6c0-19-10.2-34.9-31.4-34.9c-24.9 0-44.9 25.7-44.9 60.2c0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256C0 119 111 8 248 8s248 111 248 248"/></svg>',
type: 'popup',
sharer:
'https://pinterest.com/pin/create/button/?url=@url&title=@title&media=@media&description=@description',
},
qq: {
color: '#e9201f',
icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M927.742 687.747c-6.87-94.604-70.349-173.86-107.044-214.854 5.094-11.926 17.49-80.957-30.374-128.058.077-1.13.077-2.25.077-3.347 0-185.805-132.253-319.547-298.196-320.155-165.971.61-298.218 134.35-298.218 320.155 0 1.097-.015 2.217.064 3.347-47.864 47.101-35.445 116.132-30.375 128.058-36.67 40.993-100.157 120.25-107.041 214.854-1.24 24.868 2.605 61.095 14.754 77.194 14.802 19.634 55.433-3.94 84.49-66.667 8.084 29.06 26.743 73.421 68.966 129.728-70.66 16.126-90.814 85.817-67.044 123.912 16.765 26.845 55.149 48.924 121.298 48.924 117.69 0 169.667-31.63 192.863-53.657 4.726-4.804 11.547-7.12 20.243-7.139 8.668.018 15.503 2.335 20.215 7.14 23.198 22.025 75.184 53.656 192.848 53.656 66.172 0 104.53-22.08 121.295-48.924 23.778-38.093 3.627-107.787-67.013-123.912 42.222-56.309 60.884-100.669 68.965-129.729 29.064 62.726 69.687 86.3 84.504 66.667 12.136-16.1 15.986-52.326 14.723-77.194"/></svg>',
Expand Down

0 comments on commit 291444e

Please sign in to comment.