From f2c59e7108fa3e491651bfb522cf8df1248126e7 Mon Sep 17 00:00:00 2001 From: Rizda Dwi Prasetya Date: Wed, 3 Oct 2018 14:13:03 +0700 Subject: [PATCH 1/4] Add Share to Mastodon button --- client/src/components/AssetShareButtons/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/components/AssetShareButtons/index.js b/client/src/components/AssetShareButtons/index.js index dfb0c0b9..13002ab6 100644 --- a/client/src/components/AssetShareButtons/index.js +++ b/client/src/components/AssetShareButtons/index.js @@ -32,6 +32,13 @@ const AssetShareButtons = ({ host, name, shortId }) => { > reddit + + mastodon + ); }; From 2c82fb609a37b4e7de9b9014031164174c84a42d Mon Sep 17 00:00:00 2001 From: Rizda Dwi Prasetya Date: Thu, 4 Oct 2018 15:47:55 +0700 Subject: [PATCH 2/4] add new css class that auto wrap to allow more share links --- client/scss/all.scss | 1 + .../scss/social-share-link/_social-share-link.scss | 10 ++++++++++ client/src/components/AssetShareButtons/index.js | 6 +++--- client/src/components/SocialShareLink/index.jsx | 13 +++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 client/scss/social-share-link/_social-share-link.scss create mode 100644 client/src/components/SocialShareLink/index.jsx diff --git a/client/scss/all.scss b/client/scss/all.scss index 716e893b..2f1447f5 100644 --- a/client/scss/all.scss +++ b/client/scss/all.scss @@ -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'; diff --git a/client/scss/social-share-link/_social-share-link.scss b/client/scss/social-share-link/_social-share-link.scss new file mode 100644 index 00000000..c1fa2946 --- /dev/null +++ b/client/scss/social-share-link/_social-share-link.scss @@ -0,0 +1,10 @@ +.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; +} \ No newline at end of file diff --git a/client/src/components/AssetShareButtons/index.js b/client/src/components/AssetShareButtons/index.js index 13002ab6..a445fe3a 100644 --- a/client/src/components/AssetShareButtons/index.js +++ b/client/src/components/AssetShareButtons/index.js @@ -1,9 +1,9 @@ import React from 'react'; -import SpaceBetween from '@components/SpaceBetween'; +import SocialShareLink from '@components/SocialShareLink'; const AssetShareButtons = ({ host, name, shortId }) => { return ( - + { > mastodon - + ); }; diff --git a/client/src/components/SocialShareLink/index.jsx b/client/src/components/SocialShareLink/index.jsx new file mode 100644 index 00000000..5f382b2b --- /dev/null +++ b/client/src/components/SocialShareLink/index.jsx @@ -0,0 +1,13 @@ +import React from 'react'; + +class SocialShareLink extends React.Component { + render () { + return ( +
+ {this.props.children} +
+ ); + } +} + +export default SocialShareLink; From 2a920cfa4fa504edb144b6f102c2415293a79a70 Mon Sep 17 00:00:00 2001 From: Rizda Dwi Prasetya Date: Thu, 4 Oct 2018 15:51:01 +0700 Subject: [PATCH 3/4] add diaspora share link --- client/src/components/AssetShareButtons/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/components/AssetShareButtons/index.js b/client/src/components/AssetShareButtons/index.js index a445fe3a..a7d175e0 100644 --- a/client/src/components/AssetShareButtons/index.js +++ b/client/src/components/AssetShareButtons/index.js @@ -39,6 +39,13 @@ const AssetShareButtons = ({ host, name, shortId }) => { > mastodon + + diaspora + ); }; From 89cc458993734bfca6e4625a24d2856ecbe09e1f Mon Sep 17 00:00:00 2001 From: Rizda Dwi Prasetya Date: Thu, 4 Oct 2018 16:03:37 +0700 Subject: [PATCH 4/4] add bottom padding between share link --- client/scss/social-share-link/_social-share-link.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/client/scss/social-share-link/_social-share-link.scss b/client/scss/social-share-link/_social-share-link.scss index c1fa2946..58973667 100644 --- a/client/scss/social-share-link/_social-share-link.scss +++ b/client/scss/social-share-link/_social-share-link.scss @@ -7,4 +7,5 @@ .social-share-link > a{ padding-right:0.5em; padding-left:0.5em; + padding-bottom:0.3em; } \ No newline at end of file