Visual changes to the spv.

This commit is contained in:
Roger Braun 2013-08-17 20:35:15 +02:00
parent d7aaaea86e
commit b8fb70d44e
5 changed files with 71 additions and 38 deletions

View file

@ -5,7 +5,8 @@ app.views.SinglePostContent = app.views.Base.extend({
"#single-post-actions" : "singlePostActionsView", "#single-post-actions" : "singlePostActionsView",
'#real-post-content' : 'postContentView', '#real-post-content' : 'postContentView',
".oembed" : "oEmbedView", ".oembed" : "oEmbedView",
".opengraph" : "openGraphView" ".opengraph" : "openGraphView",
".status-message-location" : "postLocationStreamView"
}, },
initialize : function() { initialize : function() {
@ -15,6 +16,10 @@ app.views.SinglePostContent = app.views.Base.extend({
this.postContentView = new app.views.StatusMessage({model: this.model}); this.postContentView = new app.views.StatusMessage({model: this.model});
}, },
postLocationStreamView : function(){
return new app.views.LocationStream({ model : this.model});
},
presenter : function() { presenter : function() {
return _.extend(this.defaultPresenter(), { return _.extend(this.defaultPresenter(), {
authorIsCurrentUser : this.authorIsCurrentUser(), authorIsCurrentUser : this.authorIsCurrentUser(),

View file

@ -1,11 +1,26 @@
#single-post-container #single-post-container
padding-top: 20px padding-top: 20px
#single-post-content #single-post-content
#head
color: #aaa
font-size: 12px
#author #author
.bd .bd
padding-left: 10px padding-left: 10px
border-right: solid 1px #ccc border-right: solid 1px #ccc
padding-right: 10px padding-right: 10px
#body
margin-left: 20px
padding-top: 20px
.photo_attachments
padding-bottom: 10px
img
display: block
margin-left: auto
margin-right: auto
padding-bottom: 5px
max-width: 90%
#single-post-interactions #single-post-interactions
#likes, #reshares, #comments-meta #likes, #reshares, #comments-meta
padding-bottom: 5px padding-bottom: 5px
@ -13,4 +28,14 @@
border-bottom: solid 1px #ccc border-bottom: solid 1px #ccc
padding-top: 10px padding-top: 10px
padding-bottom: 10px padding-bottom: 10px
p
margin: 0
textarea
width: 95%
a
color: #3f8fba
.timeago
color: #aaaaaa
text-decoration: none
font-size: smaller

View file

@ -3,20 +3,20 @@
<time datetime="{{created_at}}" /> <time datetime="{{created_at}}" />
</div> </div>
<div class='pull-right'> <div class='pull-right'>
<a href="#" rel="auth-required" class="label like" title="{{#if userLike}} {{t "viewer.unlike"}} {{else}} {{t "viewer.like"}} {{/if}}"> <a href="#" rel="auth-required" class="like" title="{{#if userLike}} {{t "viewer.unlike"}} {{else}} {{t "viewer.like"}} {{/if}}">
{{#if userLike}} {{#if userLike}}
<i class="icon-heart icon-red"></i> <i class="icon-heart icon-red"></i>
{{else}} {{else}}
<i class="icon-heart icon-white"></i> <i class="icon-heart icon-grey"></i>
{{/if}} {{/if}}
</a> </a>
{{#if userCanReshare}} {{#if userCanReshare}}
<a href="#" rel="auth-required" class="label reshare" title="{{#if userReshare}} {{t "viewer.reshared"}} {{else}} {{t "viewer.reshare"}} {{/if}}"> <a href="#" rel="auth-required" class="reshare" title="{{#if userReshare}} {{t "viewer.reshared"}} {{else}} {{t "viewer.reshare"}} {{/if}}">
{{#if userReshare}} {{#if userReshare}}
<i class="icon-retweet icon-blue"></i> <i class="icon-retweet icon-blue"></i>
{{else}} {{else}}
<i class="icon-retweet icon-white"></i> <i class="icon-retweet icon-grey"></i>
{{/if}} {{/if}}
</a> </a>
{{/if}} {{/if}}

View file

@ -1,9 +1,7 @@
<div id='head' class='row-fluid'> <div id='head' class='row-fluid'>
<div id='author' class='span6'> <div id='author' class='span8'>
<div class="img pull-left"> <div class="img pull-left">
{{#linkToPerson author}} {{{personImage author 'medium'}}}
<div class="profile-image-container small" style="background-image : url('{{avatar.small}}');" data-placement="right"></div>
{{/linkToPerson}}
</div> </div>
<div class="bd"> <div class="bd">
@ -22,12 +20,14 @@
<div class='public-info'> <div class='public-info'>
{{#unless public}} {{#unless public}}
<i class="icon-lock"> </i> <i class="icon-lock icon-grey"> </i>
{{/unless}} {{/unless}}
</div> </div>
<div class='status-message-location' />
</div> </div>
</div> </div>
<div id='single-post-actions' class='span6'> <div id='single-post-actions' class='span4'>
</div> </div>
</div> </div>
<div id='body' class='row-fluid'> <div id='body' class='row-fluid'>

View file

@ -1,4 +1,5 @@
<div id='reshares'> {{#if reshareCount}}
<div id='reshares'>
<span class='label reshare'> <span class='label reshare'>
<i class='icon-retweet icon-white'></i> <i class='icon-retweet icon-white'></i>
{{resharesCount}} {{resharesCount}}
@ -6,8 +7,10 @@
{{#each reshares}} {{#each reshares}}
{{{personImage author 'small' "micro"}}} {{{personImage author 'small' "micro"}}}
{{/each}} {{/each}}
</div> </div>
<div id='likes'> {{/if}}
{{#if likesCount}}
<div id='likes'>
<span class='label like'> <span class='label like'>
<i class='icon-heart icon-white'></i> <i class='icon-heart icon-white'></i>
{{likesCount}} {{likesCount}}
@ -15,15 +18,15 @@
{{#each likes}} {{#each likes}}
{{{personImage author 'small' "micro"}}} {{{personImage author 'small' "micro"}}}
{{/each}} {{/each}}
</div> </div>
<div id='comments-meta'> {{/if}}
{{#if commentsCount}}
<div id='comments-meta'>
<span class='label comments'> <span class='label comments'>
<i class='icon-comment icon-white'></i> <i class='icon-comment icon-white'></i>
{{commentsCount}} {{commentsCount}}
</span> </span>
{{#each comments}} </div>
{{{personImage author 'small' "micro"}}} {{/if}}
{{/each}}
</div>
<div id='comments'> <div id='comments'>
</div> </div>