removed some old assets; added a link to profile edit next to quick stats on a profile page

This commit is contained in:
danielgrippi 2012-04-27 17:41:47 -07:00
parent 6b115a7d22
commit 05683de16b
11 changed files with 59 additions and 35 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -16,7 +16,6 @@ app.pages.Composer = app.views.Base.extend({
"input.service:checked" : "services"
},
initialize : function(){
app.frame = this.model = new app.models.StatusMessage();
this.postForm = new app.forms.Post({model : this.model});

View file

@ -20,6 +20,9 @@ app.pages.Profile = app.views.Base.extend({
presenter : function(){
var bio = this.model.get("bio") || ''
console.log(this.isOwnProfile())
return _.extend(this.defaultPresenter(),
{text : this.model && app.helpers.textFormatter(bio, this.model),
isOwnProfile : this.isOwnProfile() })
@ -33,7 +36,9 @@ app.pages.Profile = app.views.Base.extend({
this.stream.preloadOrFetch();
this.canvasView = new app.views.Canvas({ model : this.stream })
this.profileInfo = new app.views.ProfileInfo({ model : this.model })
// send in isOwnProfile data
this.profileInfo = new app.views.ProfileInfo({ model : this.model.set({isOwnProfile : this.isOwnProfile()}) })
},
toggleEdit : function(evt) {

View file

@ -1,4 +1,5 @@
@import 'mixins';
@import 'new_styles/variables';
/* mainly for the post viewer & composer */
@import 'new_styles/base';

View file

@ -1,25 +1,3 @@
$container-width : 1170;
$margin-between-columns : 30;
$column-width : 295 - $margin-between-columns;
$raw-two-column-width : ($column-width * 2) + ($margin-between-columns * 2) ;
$two-column-width : $raw-two-column-width - 30; //simply subtract an arbitrary ammount :)
$margin-between-rows : 20;
$row-height : $column-width;
$two-row-height : $raw-two-column-width - 20;
/* colors : http://www.colourlovers.com/palette/2134203/Awezome_in_argyle */
$cyan : rgb(8,204,249);
$yellow : rgb(242,244,9);
$green : rgb(29,235,134);
$purple : rgb(220,23,166);
$lime-green : rgb(143, 199,10);
$orange : rgb(237, 165, 13);
$red : rgb(246, 68, 60);
$turquoise : rgb(8, 224, 173);
$sand : rgb(245, 239, 237);
@mixin wide() {
width : $two-column-width + px;

View file

@ -37,6 +37,7 @@
#profile-header {
text-align : center;
padding : 50px;
padding-bottom : 0;
}
.profile-image-container {
@ -59,7 +60,7 @@
padding : 10px 12px;
/* when our buttons aren't there, we still want to maintain a persistent height */
min-height : 35px;
min-height : 40px;
.control {
@include transition(opacity);
@ -171,4 +172,18 @@
}
}
}
}
#profile-bio {
display : none;
margin-top : 20px;
text-align : center;
p {
color : #777;
display : inline-block;
width : $two-column-width + px;
text-align : center;
}
}

View file

@ -0,0 +1,22 @@
$container-width : 1170;
$margin-between-columns : 30;
$column-width : 295 - $margin-between-columns;
$raw-two-column-width : ($column-width * 2) + ($margin-between-columns * 2) ;
$two-column-width : $raw-two-column-width - 30; //simply subtract an arbitrary ammount :)
$margin-between-rows : 20;
$row-height : $column-width;
$two-row-height : $raw-two-column-width - 20;
/* colors : http://www.colourlovers.com/palette/2134203/Awezome_in_argyle */
$cyan : rgb(8,204,249);
$yellow : rgb(242,244,9);
$green : rgb(29,235,134);
$purple : rgb(220,23,166);
$lime-green : rgb(143, 199,10);
$orange : rgb(237, 165, 13);
$red : rgb(246, 68, 60);
$turquoise : rgb(8, 224, 173);
$sand : rgb(245, 239, 237);

View file

@ -34,12 +34,19 @@
<img src='{{imageUrl "buttons/service-icons/tumblr@2x.png"}}' />
</a>
</span>
{{#if isOwnProfile}}
<span class="divider">•</span>
<a href="/profile/edit" title="Edit Profile" style="margin-left:2px;">
<i class="icon-cog"></i>
</a>
{{/if}}
</div>
<div id="profile-bio">
<p>
{{bio}}
</p>
</div>
</div>
<!--<dl>-->
<!--<dt>Location:</dt><dd>{{location}}</dd>-->
<!--<dt>Bio:</dt><dd>{{bio}}</dd>-->
<!--<dt>Birthday:</dt><dd>{{birthday}}</dd>-->
<!--<dt>Gender:</dt><dd>{{gender}}</dd>-->
<!--</dl>-->

View file

@ -25,10 +25,6 @@
<a href="#" title="Edit Layout" id="edit-mode-toggle" class="control small">
<img src='{{imageUrl "buttons/edit@2x.png"}}' />
</a>
{{else}}
<a href="#" class="control">
<img src='{{imageUrl "buttons/follow_hover.png"}}' />
</a>
{{/if}}
</section>

View file

@ -17,6 +17,7 @@ class ProfilesController < ApplicationController
format.json { render :json => @person.as_api_response(:backbone).merge({
:location => @person.profile.location,
:birthday => @person.profile.formatted_birthday,
:bio => @person.profile.bio
}) }
end
end