diff --git a/config/env/torrents.js b/config/env/torrents.js index d8e9e955..6d2098a0 100644 --- a/config/env/torrents.js +++ b/config/env/torrents.js @@ -94,6 +94,7 @@ module.exports = { //please change it to your api key from themoviedb.org key: '7888f0042a366f63289ff571b68b7ce0', backdrop_img_base_url: 'http://image.tmdb.org/t/p/w1280', + backdrop_img_base_url_300: 'http://image.tmdb.org/t/p/w300', poster_img_base_url: 'http://image.tmdb.org/t/p/w500', poster_list_base_url: 'http://image.tmdb.org/t/p/w92', cast_img_base_url: 'http://image.tmdb.org/t/p/w132_and_h132_bestv2' diff --git a/modules/core/client/controllers/home.client.controller.js b/modules/core/client/controllers/home.client.controller.js index 2562e7f4..30797bdc 100644 --- a/modules/core/client/controllers/home.client.controller.js +++ b/modules/core/client/controllers/home.client.controller.js @@ -10,7 +10,9 @@ function HomeController($scope, $state, $translate, Authentication, TorrentsService, Notification, MeanTorrentConfig, getStorageLangService) { var vm = this; vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig; + vm.movieTopList = undefined; + vm.movieNewList = undefined; vm.info_is_ready = false; @@ -57,7 +59,9 @@ */ vm.getMovieTopInfo = function () { vm.moviesInfo = TorrentsService.get({ - limit: 16 + torrent_status: 'reviewed', + torrent_type: 'movie', + limit: 8 }, function (items) { vm.movieTopList = items.rows; }, function (err) { @@ -65,6 +69,20 @@ message: ' ' + $translate.instant('TOP_MOVIE_INFO_ERROR') }); }); + + vm.moviesInfo = TorrentsService.get({ + torrent_status: 'reviewed', + torrent_type: 'movie', + newest: true, + limit: 10 + }, function (items) { + vm.movieNewList = items.rows; + console.log(vm.movieNewList); + }, function (err) { + Notification.error({ + message: ' ' + $translate.instant('TOP_MOVIE_INFO_ERROR') + }); + }); }; /** diff --git a/modules/core/client/less/mt.less b/modules/core/client/less/mt.less index f3aa5d23..990d70c8 100644 --- a/modules/core/client/less/mt.less +++ b/modules/core/client/less/mt.less @@ -88,26 +88,27 @@ body { &:hover { background-color: #efefef; background-color: rgba(224, 224, 224, .3); + .torrent-user-info { + opacity: 1; + color: #fff; + } + .torrent-tmdb-info { + opacity: 1; + color: #fff; + } + > img { + opacity: 1; + } } > img { opacity: 0.8; - &:hover { - opacity: 1; - + .torrent-user-info { - opacity: 1; - color: #fff; - } - } } .caption { - padding: 5px 3px; + padding: 5px 3px 2px; ul { margin-bottom: 0; } } - .release-date { - color: #000; - } } .torrent-votes { @@ -125,26 +126,56 @@ body { } } -.torrent-user-info { +.col-small-padding { + padding: 0 5px; +} + +.col-no-padding { + padding: 0; +} + +.torrent-tmdb-info { display: table-cell; position: absolute; - top: 4px; - left: 20px; - right: 20px; - padding: 8px 0; + bottom: 52px; + left: 10px; + right: 10px; + padding: 6px 5px; background-color: @mt-body-background-color; background-color: rgba(0, 0, 0, .7); color: #ddd; opacity: 0.8; - &:hover { - opacity: 1; - color: #fff; - } > ul { margin-left: 0; margin-bottom: 0; } + .release-date { + color: #ccc; + } +} + +.torrent-user-info { + font-size: 12px; + display: table-cell; + position: absolute; + top: 5px; + left: 10px; + right: 10px; + padding: 6px 5px; + + background-color: @mt-body-background-color; + background-color: rgba(0, 0, 0, .7); + color: #ddd; + opacity: 0.8; + table { + width: 100%; + tr { + td { + width: auto; + } + } + } .torrent-up { color: #33CC00; } @@ -152,18 +183,7 @@ body { color: #FF3300; } .torrent-finished { - color: #33FFFF; - } - - &.small-info { - @media (min-width: @screen-md-min) { - padding: 5px 0; - font-size: 12px; - .list-inline > li { - padding-left: 1px; - padding-right: 1px; - } - } + color: #0366d6; } } @@ -179,6 +199,98 @@ body { } } +.panel-newest-list { + @media (max-width: @screen-md-min) { + display: none; + } + .h5, + h5 { + margin-top: 0; + margin-bottom: 0; + } + table { + width: 100%; + tr { + &.show-big { + .newest-item-big { + display: block; + } + .newest-item-small { + display: none; + } + } + &.hide-big { + .newest-item-big { + display: none; + } + .newest-item-small { + display: block; + } + } + td { + cursor: pointer; + max-width: 0; + &:hover { + .newest-info { + color: #fff; + opacity: 1; + } + .newest-user-info { + color: #fff; + opacity: 1; + } + } + } + } + } + .newest-item-small { + padding: 0 5px; + } + .newest-item-big { + position: relative; + img { + width: 100%; + } + .newest-info { + position: absolute; + bottom: 32px; + left: 0; + right: 0; + margin-bottom: -32px; + padding: 6px 5px; + + background-color: @mt-body-background-color; + background-color: rgba(0, 0, 0, .7); + color: #ddd; + opacity: 0.8; + } + .newest-user-info { + font-size: 12px; + position: absolute; + top: 0; + left: 0; + right: 0; + margin-bottom: -32px; + padding: 6px 5px; + + background-color: @mt-body-background-color; + background-color: rgba(0, 0, 0, .7); + color: #ddd; + opacity: 0.8; + + .torrent-up { + color: #33CC00; + } + .torrent-down { + color: #FF3300; + } + .torrent-finished { + color: #0366d6; + } + } + } +} + .btn-tag { width: 100px; &, diff --git a/modules/core/client/views/home.client.view.html b/modules/core/client/views/home.client.view.html index 4f4c7394..ec66e782 100644 --- a/modules/core/client/views/home.client.view.html +++ b/modules/core/client/views/home.client.view.html @@ -111,45 +111,102 @@

-
- -
+
+
+
+
+
+
+
+ -
-
-
-
-
-
-
+ +
+ +
+
+
Newest Movie Torrents
+ + + + +
+
+ + + + +
+
+ {{$index + 1}}. {{nt.torrent_title}} +
+
+
+ +
+ {{$index + 1}}. {{nt.torrent_title}} +
+
+
diff --git a/modules/torrents/client/img/default_backdrop_300.jpg b/modules/torrents/client/img/default_backdrop_300.jpg new file mode 100644 index 00000000..2237bc75 Binary files /dev/null and b/modules/torrents/client/img/default_backdrop_300.jpg differ diff --git a/modules/torrents/client/views/movie-list.client.view.html b/modules/torrents/client/views/movie-list.client.view.html index 699ca284..8a9a28ab 100644 --- a/modules/torrents/client/views/movie-list.client.view.html +++ b/modules/torrents/client/views/movie-list.client.view.html @@ -1,21 +1,40 @@
-
+
+
-
+