DG MS; cool header with background in new stream
This commit is contained in:
parent
0c7492b94d
commit
c6b8d75313
7 changed files with 99 additions and 28 deletions
|
|
@ -25,5 +25,9 @@ app.pages.Stream = app.views.Base.extend({
|
||||||
this.stream.on("frame:interacted", function(post){
|
this.stream.on("frame:interacted", function(post){
|
||||||
interactions.setInteractions(post)
|
interactions.setInteractions(post)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
postRenderTemplate : function() {
|
||||||
|
this.$("#header").css("background-image", "url(" + app.currentUser.get("wallpaper") + ")")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,17 @@ app.views.Post.StreamFrame = app.views.Base.extend({
|
||||||
'.stream-frame-feedback' : 'feedbackView'
|
'.stream-frame-feedback' : 'feedbackView'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
this.stream = options.stream
|
this.stream = options.stream
|
||||||
this.smallFrameView = new app.views.Post.SmallFrame({model : this.model})
|
this.smallFrameView = new app.views.Post.SmallFrame({model : this.model})
|
||||||
this.feedbackView = new app.views.FeedbackActions({ model: this.model })
|
this.feedbackView = new app.views.FeedbackActions({ model: this.model })
|
||||||
},
|
},
|
||||||
|
|
||||||
events : _.extend({
|
events : {
|
||||||
'click .content' : 'triggerInteracted'
|
'click .content' : 'triggerInteracted'
|
||||||
}, app.views.Post.SmallFrame.prototype.events),
|
},
|
||||||
|
|
||||||
|
|
||||||
triggerInteracted : function() {
|
triggerInteracted : function() {
|
||||||
this.stream.trigger("frame:interacted", this.model)
|
this.stream.trigger("frame:interacted", this.model)
|
||||||
},
|
}
|
||||||
|
|
||||||
goToPost : $.noop
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,30 @@ $bring-dark-accent-forward-color: #DDD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
position : fixed;
|
||||||
|
top : 0;
|
||||||
|
width : 100%;
|
||||||
|
padding : 15px;
|
||||||
|
z-index : 30;
|
||||||
|
|
||||||
|
-webkit-box-shadow : inset 0 -10px 10px -8px rgba(0,0,0,0.8);
|
||||||
|
-moz-box-shadow : inset 0 -10px 10px -8px rgba(0,0,0,0.8);
|
||||||
|
|
||||||
|
border-bottom : 1px solid #333;
|
||||||
|
|
||||||
|
color : #fff;
|
||||||
|
background : {
|
||||||
|
color : #333;
|
||||||
|
size : cover;
|
||||||
|
attachment : fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@include opacity(0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* bootstrap label fixes for Roboto */
|
/* bootstrap label fixes for Roboto */
|
||||||
.label {
|
.label {
|
||||||
padding : 2px 5px;
|
padding : 2px 5px;
|
||||||
|
|
|
||||||
|
|
@ -383,6 +383,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#stream-interactions,
|
||||||
|
#stream-content {
|
||||||
|
padding-top : 90px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#stream-content {
|
#stream-content {
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,6 @@
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="top-right-nav">
|
<div id="top-right-nav">
|
||||||
{{#if showFollowButton}}
|
|
||||||
<a href="#" onClick="alert('Not yet implemented!')" id="follow-button">
|
|
||||||
<span class="label label-inverse">
|
|
||||||
<i class="icon-plus icon-white"></i>
|
|
||||||
<span>
|
|
||||||
FOLLOW
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if current_user.guid}}
|
{{#if current_user.guid}}
|
||||||
<a href="/" id="home-button">
|
<a href="/" id="home-button">
|
||||||
<span class="label label-inverse">
|
<span class="label label-inverse">
|
||||||
|
|
@ -24,6 +13,12 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="/users/sign_out" title="Log out" id="logout-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
<i class="icon-off icon-white"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="/" id="home-button">
|
<a href="/" id="home-button">
|
||||||
<span class="label label-inverse">
|
<span class="label label-inverse">
|
||||||
|
|
@ -33,14 +28,6 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if is_own_profile}}
|
|
||||||
<a href="/users/sign_out" title="Log out" id="logout-button">
|
|
||||||
<span class="label label-inverse">
|
|
||||||
<i class="icon-off icon-white"></i>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section id="profile-info"/>
|
<section id="profile-info"/>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,56 @@
|
||||||
|
<div id="header">
|
||||||
|
<div class="container" style="position:relative;">
|
||||||
|
|
||||||
|
<div id="top-right-nav">
|
||||||
|
{{#if current_user.guid}}
|
||||||
|
<a href="/notifications" title="Notifications" id="notifications-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
{{current_user.notifications_count}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/people/{{current_user.guid}}?ex=true" id="profile-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
<i class="icon-user icon-white"></i>
|
||||||
|
<span>
|
||||||
|
PROFILE
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/" id="home-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
<i class="icon-home icon-white"></i>
|
||||||
|
<span>
|
||||||
|
HOME
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/users/sign_out" title="Log out" id="logout-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
<i class="icon-off icon-white"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
<a href="/" id="home-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
<span>
|
||||||
|
DIASPORA
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
DIASPORA
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="stream">
|
<div id="stream">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="background offset5"></div>
|
<div class="background offset5"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ class UserPresenter
|
||||||
:aspects => aspects,
|
:aspects => aspects,
|
||||||
:services => services,
|
:services => services,
|
||||||
:following_count => self.user.contacts.receiving.count,
|
:following_count => self.user.contacts.receiving.count,
|
||||||
:configured_services => self.configured_services
|
:configured_services => self.configured_services,
|
||||||
|
:wallpaper => self.wallpaper
|
||||||
}
|
}
|
||||||
).to_json(options)
|
).to_json(options)
|
||||||
end
|
end
|
||||||
|
|
@ -26,6 +27,10 @@ class UserPresenter
|
||||||
user.services.map{|service| service.provider }
|
user.services.map{|service| service.provider }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def wallpaper
|
||||||
|
user.person.profile.wallpaper.url
|
||||||
|
end
|
||||||
|
|
||||||
def aspects
|
def aspects
|
||||||
AspectPresenter.as_collection(user.aspects)
|
AspectPresenter.as_collection(user.aspects)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue