diff --git a/modules/core/client/controllers/home.client.controller.js b/modules/core/client/controllers/home.client.controller.js index 30797bdc..f9c46614 100644 --- a/modules/core/client/controllers/home.client.controller.js +++ b/modules/core/client/controllers/home.client.controller.js @@ -11,12 +11,10 @@ var vm = this; vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig; + vm.movieTopOne = undefined; vm.movieTopList = undefined; vm.movieNewList = undefined; - - vm.info_is_ready = false; - - vm.COMING = 'coming soon...'; + vm.movieTopInfo = undefined; /** * If user is not signed in then redirect back signin @@ -26,24 +24,16 @@ } /** - * initInfo + * initTopOneInfo */ - vm.initInfo = function () { + vm.initTopOneInfo = function () { + $('.backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdrop_img_base_url + vm.movieTopOne.torrent_backdrop_img + ')'); + TorrentsService.getTMDBInfo({ - tmdbid: '329865', + tmdbid: vm.movieTopOne.torrent_tmdb_id, language: getStorageLangService.getLang() }, function (res) { - Notification.success({ - message: ' ' + $translate.instant('TMDB_ID_OK') - }); - - vm.movieinfo = res; - vm.info_is_ready = true; - $('.backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdrop_img_base_url + res.backdrop_path + ')'); - }, function (err) { - Notification.error({ - message: ' ' + $translate.instant('TMDB_ID_ERROR') - }); + vm.movieTopInfo = res; }); }; @@ -61,9 +51,13 @@ vm.moviesInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'movie', - limit: 8 + limit: 9 }, function (items) { + vm.movieTopOne = items.rows[0]; + items.rows.splice(0, 1); vm.movieTopList = items.rows; + + vm.initTopOneInfo(); }, function (err) { Notification.error({ message: ' ' + $translate.instant('TOP_MOVIE_INFO_ERROR') @@ -74,7 +68,7 @@ torrent_status: 'reviewed', torrent_type: 'movie', newest: true, - limit: 10 + limit: 14 }, function (items) { vm.movieNewList = items.rows; console.log(vm.movieNewList); diff --git a/modules/core/client/less/mt.less b/modules/core/client/less/mt.less index 990d70c8..3287618f 100644 --- a/modules/core/client/less/mt.less +++ b/modules/core/client/less/mt.less @@ -200,9 +200,15 @@ body { } .panel-newest-list { + height: ~"calc(100% - 20px)"; @media (max-width: @screen-md-min) { display: none; } + .hide-more { + @media (max-width: @screen-lg-min) { + display: none; + } + } .h5, h5 { margin-top: 0; @@ -693,4 +699,4 @@ body { .upload-by { color: #888; font-size: 12px; -} \ No newline at end of file +} diff --git a/modules/core/client/less/table-row-col.less b/modules/core/client/less/table-row-col.less new file mode 100644 index 00000000..e1d1af34 --- /dev/null +++ b/modules/core/client/less/table-row-col.less @@ -0,0 +1,130 @@ +@import (reference) "mt-var.less"; + +/** +the example url: http://www.minimit.com/demos/bootstrap-3-responsive-columns-of-same-height +**/ + +.row-height { + display: table; + table-layout: fixed; + height: 100%; + width: 100%; +} +.col-height { + display: table-cell; + float: none; + height: 100%; +} +.col-top { + vertical-align: top; +} +.col-middle { + vertical-align: middle; +} +.col-bottom { + vertical-align: bottom; +} + +@media (min-width: @screen-xs) { + .row-xs-height { + display: table; + table-layout: fixed; + height: 100%; + width: 100%; + } + .col-xs-height { + display: table-cell; + float: none; + height: 100%; + } + .col-xs-top { + vertical-align: top; + } + .col-xs-middle { + vertical-align: middle; + } + .col-xs-bottom { + vertical-align: bottom; + } +} + +@media (min-width: @screen-sm) { + .row-sm-height { + display: table; + table-layout: fixed; + height: 100%; + width: 100%; + } + .col-sm-height { + display: table-cell; + float: none; + height: 100%; + } + .col-sm-top { + vertical-align: top; + } + .col-sm-middle { + vertical-align: middle; + } + .col-sm-bottom { + vertical-align: bottom; + } +} + +@media (min-width: @screen-md) { + .row-md-height { + display: table; + table-layout: fixed; + height: 100%; + width: 100%; + } + .col-md-height { + display: table-cell; + float: none; + height: 100%; + } + .col-md-top { + vertical-align: top; + } + .col-md-middle { + vertical-align: middle; + } + .col-md-bottom { + vertical-align: bottom; + } +} + +@media (min-width: @screen-lg) { + .row-lg-height { + display: table; + table-layout: fixed; + height: 100%; + width: 100%; + } + .col-lg-height { + display: table-cell; + float: none; + height: 100%; + } + .col-lg-top { + vertical-align: top; + } + .col-lg-middle { + vertical-align: middle; + } + .col-lg-bottom { + vertical-align: bottom; + } +} + +.fill-height-table { + display: table; + table-layout: fixed; + width: 100%; + height: 100%; +} + +.fill-height-row { + display: table-row; + height: auto; +} diff --git a/modules/core/client/views/home.client.view.html b/modules/core/client/views/home.client.view.html index ec66e782..ba0b04e4 100644 --- a/modules/core/client/views/home.client.view.html +++ b/modules/core/client/views/home.client.view.html @@ -1,13 +1,10 @@ -
+
-
-

-
-
+
-
@@ -17,30 +14,30 @@
{{ 'TMDB_FIELDS.ORIGINAL_TITLE' | translate}}:
-
{{vm.movieinfo.original_title}}
+
{{vm.movieTopOne.torrent_original_title}}
{{ 'TMDB_FIELDS.TITLE' | translate}}:
-
{{vm.movieinfo.title}}
+
{{vm.movieTopOne.torrent_title}}
-
{{ 'TMDB_FIELDS.ORIGINAL_LANGUAGE' | translate}}:
-
{{vm.movieinfo.original_language}}
+ +
{{ 'TMDB_FIELDS.GENRES' | translate}}:
- {{item.name}} + {{item}}
-
{{ 'TMDB_FIELDS.PRODUCTION_COUNTRIES' | translate}}:
-
- {{item.iso_3166_1}} - - -
+ + + + + - - +
{{ 'TMDB_FIELDS.RELEASE_DATE' | translate}}:
+
{{vm.movieTopOne.torrent_release}}
- - +
{{ 'TMDB_FIELDS.RUNTIME' | translate}}:
+
{{vm.movieTopOne.runtime}}
@@ -50,58 +47,64 @@
{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}:
IMDB {{vm.movieinfo.vote_average}} / {{vm.movieinfo.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}} + class="torrent-votes">IMDB {{vm.movieTopOne.torrent_imdb_votes}} / {{vm.movieTopOne.torrent_imdb_votes_users}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}
{{ 'TMDB_FIELDS.OVERVIEW' | translate}}:
-
{{vm.movieinfo.overview}}
+
{{vm.movieTopOne.torrent_overview}}
- - {{vm.movieinfo.credits.cast[0].name}} + {{vm.movieTopInfo.credits.cast[0].name}} +

{{vm.movieTopInfo.credits.cast[0].character}}

- - {{vm.movieinfo.credits.cast[1].name}} + {{vm.movieTopInfo.credits.cast[1].name}} +

{{vm.movieTopInfo.credits.cast[1].character}}

- - {{vm.movieinfo.credits.cast[2].name}} + {{vm.movieTopInfo.credits.cast[2].name}} +

{{vm.movieTopInfo.credits.cast[2].character}}

- - {{vm.movieinfo.credits.cast[3].name}} + {{vm.movieTopInfo.credits.cast[3].name}} +

{{vm.movieTopInfo.credits.cast[3].character}}

- - {{vm.movieinfo.credits.cast[4].name}} + {{vm.movieTopInfo.credits.cast[4].name}} +

{{vm.movieTopInfo.credits.cast[4].character}}

- - {{vm.movieinfo.credits.cast[5].name}} + {{vm.movieTopInfo.credits.cast[5].name}} +

{{vm.movieTopInfo.credits.cast[5].character}}

@@ -112,101 +115,107 @@
-
-
-
-
-
-
-