timeline update;
This commit is contained in:
1 parent
38e0a4dadd
commit
e7c77e18c6
5 files changed
+21
-13
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
.timeline {
|
.timeline {
|
||||||
.post {
|
.timeline-record {
|
||||||
.user{
|
.user{
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post{
|
.timeline-record{
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post {
|
.timeline-record {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|||||||
+12
-7
@@ -39,20 +39,25 @@ module.exports = function(app) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
controller: function($scope, api){
|
controller: function($scope, api){
|
||||||
|
$scope.recordClass = function (i) {
|
||||||
|
return i['type'];
|
||||||
|
};
|
||||||
|
|
||||||
api.news.feed()
|
api.news.feed()
|
||||||
.success(function (list) {
|
.success(function (list) {
|
||||||
var feed = list.map(function (post) {
|
var feed = list.map(function (post) {
|
||||||
if(post.type == "instagram"){
|
if(post.type == "instagram"){
|
||||||
var author_id = personByInstagram(team.team, post.data.user.username);
|
var author_id = personByInstagram(team.team, post.data.author);
|
||||||
var name = author_id ? team.short(author_id) : post.data.user.username;
|
var name = author_id ? team.short(author_id) : post.data.author;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
date: post.publishDate,
|
date: post.date,
|
||||||
image: post.data.images.standard_resolution.url,
|
image: post.data.image.standard_resolution.url,
|
||||||
url: post.data.link,
|
url: post.data.url,
|
||||||
username: name,
|
username: name,
|
||||||
userpic: post.data.user.profile_picture,
|
//userpic: post.data.user.profile_picture,
|
||||||
text: postText(post),
|
text: post.body,
|
||||||
|
//text: postText(post),
|
||||||
type: post.type
|
type: post.type
|
||||||
};
|
};
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<div class="head">
|
<div class="head">
|
||||||
<a name="{{post.uri}}"></a>
|
<a name="{{post.uri}}"></a>
|
||||||
<p class="date"><a href="#{{post.uri}}">{{post.date | date : "dd.MM.yyyy"}}</a></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="body" ng-bind-html="message"></div>
|
<div class="body">
|
||||||
|
<div><p class="date"><a href="#{{post.uri}}">{{post.date | date : "dd.MM.yyyy"}}</a></p></div>
|
||||||
|
<div class="message" ng-bind-html="message"></div>
|
||||||
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="timeline">
|
<div class="timeline">
|
||||||
<timeline-record class="post"
|
<timeline-record class="timeline-record {{recordClass(post)}}"
|
||||||
content="post"
|
content="post"
|
||||||
ng-repeat="post in feed"
|
ng-repeat="post in feed"
|
||||||
ng-class="{left: isEven($index), right: !isEven($index)}">
|
ng-class="{left: isEven($index), right: !isEven($index)}">
|
||||||
|
|||||||
Reference in new issue
Block a user