Merge pull request #617 from rizdaprasetya/patch-1
Add more Social Share links Addressing issue #608
This commit is contained in:
commit
12ca5b27e6
4 changed files with 42 additions and 3 deletions
|
@ -35,6 +35,7 @@
|
|||
@import '~row/_row';
|
||||
@import '~vertical-split/_vertical-split';
|
||||
@import '~tooltip/_tooltip';
|
||||
@import '~social-share-link/_social-share-link';
|
||||
|
||||
@import '~channel-claims-display/_channel-claims-display';
|
||||
@import '~dropzone/_dropzone';
|
||||
|
|
11
client/scss/social-share-link/_social-share-link.scss
Normal file
11
client/scss/social-share-link/_social-share-link.scss
Normal file
|
@ -0,0 +1,11 @@
|
|||
.social-share-link {
|
||||
flex-wrap: wrap;
|
||||
margin-right: -0.5em;
|
||||
margin-left: -0.5em;
|
||||
}
|
||||
|
||||
.social-share-link > a{
|
||||
padding-right:0.5em;
|
||||
padding-left:0.5em;
|
||||
padding-bottom:0.3em;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import SpaceBetween from '@components/SpaceBetween';
|
||||
import SocialShareLink from '@components/SocialShareLink';
|
||||
|
||||
const AssetShareButtons = ({ host, name, shortId }) => {
|
||||
return (
|
||||
<SpaceBetween >
|
||||
<SocialShareLink >
|
||||
<a
|
||||
className='link--primary'
|
||||
target='_blank'
|
||||
|
@ -32,7 +32,21 @@ const AssetShareButtons = ({ host, name, shortId }) => {
|
|||
>
|
||||
reddit
|
||||
</a>
|
||||
</SpaceBetween>
|
||||
<a
|
||||
className='link--primary'
|
||||
target='_blank'
|
||||
href={`https://sharetomastodon.github.io/?title=${name}&url=${host}/${shortId}/${name}`}
|
||||
>
|
||||
mastodon
|
||||
</a>
|
||||
<a
|
||||
className='link--primary'
|
||||
target='_blank'
|
||||
href={`https://share.diasporafoundation.org/?title=${name}&url=${host}/${shortId}/${name}}
|
||||
>
|
||||
diaspora
|
||||
</a>
|
||||
</SocialShareLink>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
13
client/src/components/SocialShareLink/index.jsx
Normal file
13
client/src/components/SocialShareLink/index.jsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from 'react';
|
||||
|
||||
class SocialShareLink extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<div className={'space-between social-share-link'}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SocialShareLink;
|
Loading…
Reference in a new issue