timeline update: ES6, components, refactoring, other

This commit is contained in:
tmshv committed 2016-02-22 16:15:42 +03:00
1 parent 761938b17a
commit 73a3361376
20 files changed
+315 -238

No files matched your search

@@ -0,0 +1,16 @@
<div class="timeline-record-instagram">
<div class="timeline-record-instagram__head">
<p class="date">{{$ctrl.post.date | date : "dd.MM.yyyy"}}</p>
<div class="timeline-record-instagram__user">
<img ng-src="{{$ctrl.post.userpic}}" alt=""/>
<span>{{$ctrl.post.username}}</span>
</div>
</div>
<div class="timeline-record-instagram__body">
<a href="{{$ctrl.post.url}}" target="_blank" class="invisible">
<img ng-src="{{$ctrl.post.image}}" alt="">
</a>
<p>{{$ctrl.post.text | removeHashtags | strip}}</p>
</div>
</div>
@@ -0,0 +1,10 @@
<div class="timeline-record-post">
<div class="timeline-record-post__head">
<div>
<p class="date">{{$ctrl.post.date | date : "dd.MM.yyyy"}}</p>
<!--<a href="#{{$ctrl.post.uri}}">{{$ctrl.post.date | date : "dd.MM.yyyy"}}</a>-->
</div>
</div>
<div class="timeline-record-post__body" ng-bind-html="$ctrl.message"></div>
</div>
@@ -0,0 +1,10 @@
<div class="timeline__record"
ng-switch="$ctrl.type"
>
<timeline-record-instagram post="$ctrl.post"
ng-switch-when="instagram"
></timeline-record-instagram>
<timeline-record-post post="$ctrl.post"
ng-switch-default
></timeline-record-post>
</div>
+13
View File
@@ -0,0 +1,13 @@
<div class="timeline">
<timeline-record type="{{post.type}}" post="post"
ng-repeat="post in $ctrl.feed track by $index"
></timeline-record>
<div class="timeline__footer" ng-show="showFooter()">
<button class="more"
ng-click="$ctrl.loadNext()"
ng-disabled="$ctrl.timelineUpdating">
<span us-spinner="{radius:5, width:2, length: 4}" spinner-key="timelineMore"></span>
<span ng-hide="$ctrl.timelineUpdating">Ещё</span>
</button>
</div>
</div>