feat(core): list music top list and newest in home page

This commit is contained in:
OldHawk
2017-10-03 17:25:05 +08:00
parent 768a89154d
commit 54a0735e99
7 changed files with 158 additions and 4 deletions

View File

@@ -65,6 +65,7 @@
TOP_MOVIE_INFO_ERROR: 'Get movie top info failed',
NEWEST_MOVIE_LIST: 'Newest Movie Torrents',
NEWEST_TV_LIST: 'Newest TV Serial Torrents',
NEWEST_MUSIC_LIST: 'Newest Music Torrents',
//element title/alt
TITLE_ALT: {

View File

@@ -65,6 +65,7 @@
TOP_MOVIE_INFO_ERROR: '获取电影Top列表失败',
NEWEST_MOVIE_LIST: '最新电影种子',
NEWEST_TV_LIST: '最新电视剧种子',
NEWEST_MUSIC_LIST: '最新音乐种子',
//element title/alt
TITLE_ALT: {

View File

@@ -222,7 +222,7 @@
torrent_status: 'reviewed',
torrent_type: 'music',
newest: true,
limit: 14
limit: 13
}, function (items) {
if (items.rows.length > 0) {
vm.musicNewList = items.rows;

View File

@@ -31,7 +31,9 @@
if (attrs.src) {
cir2.css('background-image', 'url(' + attrs.src + ')');
}
cir2.css('background-size', '100% 100%');
cir2.css('background-size', 'cover');
cir2.css('background-position', 'center');
cir2.css('background-repeat', 'no-repeat');
cir2.css('height', '100%');
cir2.css('width', '100%');
cir2.css('padding', '36%');

View File

@@ -207,7 +207,7 @@ body {
}
}
.music {
margin: 35px 0;
margin: 38px 0 42px 0;
overflow: hidden;
opacity: 0.8;
&::before {
@@ -438,6 +438,9 @@ body {
}
.newest-item-big {
position: relative;
&.music-margin {
padding: 30px 0 33px 0 !important;
}
img {
width: 100%;
}
@@ -481,6 +484,36 @@ body {
.se-info {
right: 5px;
}
.music {
max-width: 80px;
overflow: hidden;
&::before {
content: ' ';
padding-top: 100%; /* vertical value as 100% equals width */
float: left;
}
div {
overflow: hidden;
&::before {
content: ' ';
padding-top: 100%; /* vertical value as 100% equals width */
float: left;
}
}
}
.music-info {
position: absolute;
top: 0;
right: 0;
left: 90px;
height: 100%;
font-size: 12px;
>div {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
}
}
.se-info {
position: absolute;

View File

@@ -473,6 +473,123 @@
</div>
</div>
</div>
<div class="container">
<div class="row" style="padding: 0 10px;">
<div class="row-md-height">
<div class="col-md-9 col-md-height col-no-padding">
<div ng-repeat="item in vm.musicTopList">
<div data-ng-if="$index != 0 && $index % 2 == 0" class="clearfix visible-xs-block"></div>
<div data-ng-if="$index != 0 && $index % 4 == 0" class="clearfix visible-md-block visible-lg-block"></div>
<div class="col-xs-6 col-sm-3 col-md-3 col-small-padding">
<div class="thumbnail torrent-post-info" ng-click="vm.openTorrentInfo(item._id);">
<img class="img-responsive" music-disk="item.torrent_type=='music'"
ng-src="{{vm.TGI.getTorrentListTopImage(item)}}"
alt="{{vm.TGI.getTorrentTitle(item)}}">
<div class="torrent-user-info">
<table>
<tr>
<td class="text-left">
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
<span>{{item.torrent_seeds}}</span>
</td>
<td class="text-center">
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
<span>{{item.torrent_leechers}}</span>
</td>
<td class="text-right">
<span class="glyphicon glyphicon-ok torrent-finished"></span>
<span>{{item.torrent_finished}}</span>
</td>
</tr>
</table>
</div>
<div class="torrent-tmdb-info">
<ul class="list-unstyled">
<li>
<span class="release-date"
ng-if="item.resource_detail_info.artist">{{item.resource_detail_info.artist}}</span>
<span title="{{ 'TITLE_ALT.IMDB_VOTES' | translate}}"
class="pull-right torrent-votes"><kbd>{{vm.TGI.getVoteTitle(item)}}</kbd> {{item.resource_detail_info.vote_average}}</span>
</li>
</ul>
</div>
<div class="caption">
<ul class="list-unstyled">
<li class="text-long">
<strong>{{vm.TGI.getTorrentTitle(item)}}</strong>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3 col-md-height col-small-padding" style="padding-left: 15px;">
<div class="fill-height-table">
<div class="fill-height-row" style="overflow-y: auto;">
<div class="panel panel-default panel-newest-list" ng-show="vm.musicNewList">
<div class="panel-heading"><h5>{{'NEWEST_MUSIC_LIST' | translate}}</h5></div>
<table class="table">
<tr ng-repeat="nm in vm.musicNewList" mouse-enter-toggle-class="show-big" base-class="hide-big"
ng-class="[$index > 0 ? 'hide-big' : 'show-big', $index >= 12 ? 'hide-more' : '']">
<td>
<div class="newest-item-big music-margin" ng-click="vm.openTorrentInfo(nm._id);">
<img class="img-responsive" music-disk="nm.torrent_type=='music'"
ng-src="{{vm.TGI.getTorrentListTopImage(nm)}}"
alt="{{vm.TGI.getTorrentTitle(nm)}}">
<div class="music-info">
<div>
<div><strong>{{nm.resource_detail_info.artist}}</strong></div>
<div>{{nm.resource_detail_info.subtitle}}</div>
</div>
</div>
<div class="newest-user-info">
<table>
<tr>
<td class="text-left">
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
<span>{{nm.torrent_seeds}}</span>
</td>
<td class="text-center">
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
<span>{{nm.torrent_leechers}}</span>
</td>
<td class="text-right">
<span class="glyphicon glyphicon-ok torrent-finished"></span>
<span>{{nm.torrent_finished}}</span>
</td>
</tr>
</table>
</div>
<div class="newest-info">
<div class="text-long">
{{$index + 1}}. {{nm.resource_detail_info.title}}
</div>
</div>
</div>
<div class="newest-item-small text-long">
{{$index + 1}}. {{nm.resource_detail_info.title}}
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="warning_popup" style="display: none;">

View File

@@ -130,7 +130,7 @@
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.revenue | dollar:2}}</dd>
</div>
<div ng-if="vm.torrentLocalInfo.resource_detail_info.vote_average && vm.torrentLocalInfo.resource_detail_info.vote_average>0">
<div>
<dt class="h-line">{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}</dt>
<dd class="h-line">
<span ng-if="vm.torrentLocalInfo">