Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 557d876

Browse files
authored
Merge pull request #954 from OpenBazaar/addSocialButtons
Add social buttons
2 parents f5d7f63 + 0c4928a commit 557d876

File tree

4 files changed

+61
-3
lines changed

4 files changed

+61
-3
lines changed

js/languages/en-US.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,16 @@
11381138
"vendorMessagePlaceholder": "Provide additional details, ask a question, provide feedback…",
11391139
"vendorMessageLink": "discussion section of the order details",
11401140
"vendorMessageSent": "Your message has been sent to %{name}, you can continue the conversation in the %{orderLink}.",
1141-
"send": "Send"
1141+
"send": "Send",
1142+
"share": {
1143+
"title": "Share with friends",
1144+
"body": "I just made a purchase on OpenBazaar, the free marketplace without fees or restrictions. Learn more at %{link}.",
1145+
"shareMsg": "I just made a purchase on @OpenBazaar, the free marketplace without fees or restrictions.",
1146+
"postToTwitter": "Post to Twitter",
1147+
"postToFacebook": "Post to Facebook",
1148+
"postToPinterest": "Post to Pinterest",
1149+
"postToTumblr": "Post to Tumblr"
1150+
}
11421151
},
11431152
"receipt": {
11441153
"summary": "Order Summary",

js/templates/modals/purchase/complete.html

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="flexColRows">
1+
<div class="flexColRows gutterV">
22
<div class="flexRow pad rowMd txCtr">
33
<div class="col2"></div>
44
<div class="col8">
@@ -18,7 +18,33 @@ <h4><%= ob.polyT('purchase.completeSection.paymentSent') %></h4>
1818
</div>
1919
<div class="col2"></div>
2020
</div>
21-
<hr class="clrBr rowHg">
21+
<div class="contentBox clrP clrBr padMd socialBtns">
22+
<h5><%= ob.polyT('purchase.completeSection.share.title') %></h5>
23+
<p><%= ob.polyT('purchase.completeSection.share.body', { link: "<a class='clrTEm' href='https://openbazaar.org'>https://openbazaar.org</a>" }) %></p>
24+
<div class="flexRow flexKidsExpand gutterH">
25+
<% var shareURL = "https://openbazaar.org" %>
26+
<a class="btn btnThin clrP clrBr" href="https://twitter.com/intent/tweet/?text=<%= ob.polyT('purchase.completeSection.share.shareMsg') %>&url=<%= shareURL %>&hashtags=TradeFree,bitcoin&related=openbazaar">
27+
<span class="flexInline gutterHSm">
28+
<i class="ion-social-twitter twitterColor"></i><span><%= ob.polyT('purchase.completeSection.share.postToTwitter') %></span>
29+
</span>
30+
</a>
31+
<a class="btn btnThin clrP clrBr" href="https://www.facebook.com/sharer/sharer.php?u=<%= shareURL %>">
32+
<span class="flexInline gutterHSm">
33+
<i class="ion-social-facebook facebookColor"></i><span><%= ob.polyT('purchase.completeSection.share.postToFacebook') %></span>
34+
</span>
35+
</a>
36+
<a class="btn btnThin clrP clrBr" href="https://pinterest.com/pin/create/button/?url=<%= shareURL %>">
37+
<span class="flexInline gutterHSm">
38+
<i class="ion-social-pinterest pinterestColor"></i><span><%= ob.polyT('purchase.completeSection.share.postToPinterest') %></span>
39+
</span>
40+
</a>
41+
<a class="btn btnThin clrP clrBr" href="https://www.tumblr.com/share/link?url=<%= shareURL %>&name=OpenBazaar">
42+
<span class="flexInline gutterHSm">
43+
<i class="ion-social-tumblr tumblrColor"></i><span><%= ob.polyT('purchase.completeSection.share.postToTumblr') %></span>
44+
</span>
45+
</a>
46+
</div>
47+
</div>
2248
<h5><%= ob.polyT('purchase.completeSection.vendorMessage') %></h5>
2349
<div class="clrBr clrP flex gutterHSm message js-message">
2450
<div class="avatar clrBr2 clrSh1 disc" style="<%= ob.getAvatarBgImage(ob.ownProfile.avatarHashes) %>"></div>

styles/_base.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,23 @@ svg {
352352
.pointer {
353353
cursor: pointer;
354354
}
355+
356+
// external brand colors. They should not be overwritten by theme colors.
357+
.twitterColor {
358+
color: #00aced;
359+
}
360+
361+
.facebookColor {
362+
color: #3b5998;
363+
}
364+
365+
.pinterestColor {
366+
color: #bd081c;
367+
}
368+
369+
.tumblrColor {
370+
color: #35465c;
371+
}
355372
}
356373

357374
// Sometimes, I just like floats.

styles/modules/modals/_purchase.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@
6868
border: none;
6969
}
7070
}
71+
72+
.socialBtns .btn {
73+
height: auto;
74+
padding-top: 8px;
75+
padding-bottom: 8px;
76+
}
7177
}
7278

7379
.actionBtn {

0 commit comments

Comments
 (0)