Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #398 from Pomax/social-development-391

moved the social media elements to the left [closes #391]
  • Loading branch information...
commit 67c84394dfb37c451fc72778c2ce61407878d70a 2 parents 49f0c7d + 5e0c8cc
@brianloveswords brianloveswords authored
View
16 controllers/share.js
@@ -94,7 +94,7 @@ function makeLinkUrl(path, configuration) {
}
exports.show = function (request, response, next) {
- var user, group, portfolio, owner, message;
+ var user, group, portfolio, owner, message, socialcode;
user = request.user;
group = request.group;
@@ -114,15 +114,14 @@ exports.show = function (request, response, next) {
}
// if this is the user's page, show SocialShare button
- if (owner)
- message = '<p style="float: left;">This is what your portfolio page looks like to the public.</p>'
- + '<div class="socialshare" style="float: right;" tabindex="0" onclick="injectSocialMedia(this)">'
- + '<span>Share this on twitter, google+ or facebook</span>'
+ if (owner) {
+ message = '<p class="shareMessage">This is what your portfolio page looks like to the public.</p>';
+ socialcode = '<div class="socialshare" style="float: left;" tabindex="0" onclick="injectSocialMedia(this)">'
+ + '<span class="msg">Share this on twitter, google+ or facebook</span>'
+ '<div class="social-medium twitter"></div>'
+ '<div class="social-medium google"></div>'
- + '<div class="social-medium facebook"></div>'
- + '</div>';
-
+ + '<div class="social-medium facebook"></div>';
+ }
request.group.getBadgeObjects(function (err, badges) {
var badgesWithStories = _.map(badges, badgeModifierFactory(portfolio));
@@ -137,6 +136,7 @@ exports.show = function (request, response, next) {
],
portfolio: portfolio,
message: message || null,
+ socialcode: socialcode || null,
owner: owner
});
});
View
12 static/css/socialmedia.css
@@ -1,15 +1,25 @@
+.shareMessage {
+ float: right;
+ margin-right: 25%;
+ font-size: 110%;
+ font-weight: bold;
+}
+
.socialshare {
+ float: left;
text-shadow: 2px 2px 4px rgba(0, 200, 160, 0.2);
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+ margin-right: -2em;
}
.socialshare:focus {
outline: 0;
}
-.socialshare span {
+.socialshare span.msg {
cursor: pointer;
display: table-cell;
+ border-bottom: 1px dotted #00A5DA;
}
.social-medium {
View
1  views/portfolio.hogan.js
@@ -7,6 +7,7 @@
<div class="alert alert-info">
<a class="close" data-dismiss="alert">×</a>
{{{message}}}
+ {{{socialcode}}}
</div>
</div>
{{/message}}
Please sign in to comment.
Something went wrong with that request. Please try again.