add basic profile info to profile; remove random console.logs [ci skip]

This commit is contained in:
danielgrippi 2012-04-26 14:52:48 -07:00
parent 2c9d84607a
commit d3b874b020
10 changed files with 85 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -32,8 +32,6 @@ app.views.SmallFrame = app.views.Post.extend({
initialize : function() {
this.$el.addClass([this.dimensionsClass(), this.colorClass(), this.frameClass()].join(' '))
console.log(this.model)
return this;
},

View file

@ -177,8 +177,6 @@ $(document).ready(function(){
container.hide();
parent.append(data);
console.log($(this).closest(".stream_element").find('textarea'));
MBP.autogrow(textarea($(this)));
}
});

View file

@ -47,6 +47,8 @@
background-position : center;
display : inline-block;
margin-bottom : 5px;
}
#profile-controls {
@ -96,4 +98,47 @@
@include opacity(0.75);
text-decoration : none;
}
}
#profile-stats {
i,
.cake {
@include opacity(0.7);
}
.divider {
color : #999;
}
.cake {
position : relative;
top : -3px;
}
.stat {
margin : 10px 5px;
&.services {
@include opacity(0.5);
.service {
position : relative;
margin-right : 2px;
top : -2px;
img {
height : 13px;
width : 13px;
}
&:hover {
text-decoration : none;
}
&:last-child {
margin-right : 0;
}
}
}
}
}

View file

@ -3,6 +3,39 @@
<h3>
{{name}}
</h3>
<div id="profile-stats">
{{#if location}}
<span class="stat">
<i class="icon-map-marker"></i>
{{location}}
</span>
{{/if}}
<span class="divider">•</span>
{{#if birthday}}
<span class="stat">
<img src='{{imageUrl "buttons/bday.png"}}' class="cake" />
{{birthday}}
</span>
{{/if}}
<span class="divider">•</span>
<span class="stat services">
<a href="https://facebook.com" class="service" target="_blank">
<img src='{{imageUrl "buttons/service-icons/fb.png"}}' />
</a>
<a href="https://twitter.com" class="service" target="_blank">
<img src='{{imageUrl "buttons/service-icons/twitter.png"}}' />
</a>
<a href="https://tumblr.com" class="service" target="_blank">
<img src='{{imageUrl "buttons/service-icons/tumblr.png"}}' />
</a>
</span>
</div>
</div>
<!--<dl>-->

View file

@ -19,14 +19,14 @@
<section id="profile-controls">
{{#if isOwnProfile}}
<a href="#composer" class="control" rel="facebox">
<a href="#composer" title="New Post" class="control" rel="facebox">
<img src='{{imageUrl "buttons/add_post.jpg"}}' />
</a>
<a href="#" id="edit-mode-toggle" class="control">
<a href="#" title="Edit Layout" id="edit-mode-toggle" class="control">
<img src='{{imageUrl "buttons/edit_canvas.png"}}' />
</a>
{{else}}
<a href="#" class="control">
<a href="#" class="control">
<img src='{{imageUrl "buttons/follow_hover.png"}}' />
</a>
{{/if}}

View file

@ -14,7 +14,10 @@ class ProfilesController < ApplicationController
@person = Person.find_by_guid!(params[:id])
respond_to do |format|
format.json { render :json => @person.as_api_response(:backbone) }
format.json { render :json => @person.as_api_response(:backbone).merge({
:location => @person.profile.location,
:birthday => @person.profile.birthday,
}) }
end
end