add home topone backdrop info

This commit is contained in:
OldHawk
2017-04-01 14:22:11 +08:00
parent 2f4e91c9de
commit bf01cb37a3
9 changed files with 176 additions and 21 deletions

View File

@@ -10,13 +10,11 @@ module.exports = {
'public/lib/angular-ui-notification/dist/angular-ui-notification.min.css',
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
'public/lib/Ionicons/css/ionicons.min.css'
'public/lib/Ionicons/css/ionicons.min.css',
// endbower
],
js: [
// bower:js
'public/lib/jquery/dist/jquery.min.js',
'public/lib/bootstrap/dist/js/bootstrap.min.js',
'public/lib/angular/angular.min.js',
'public/lib/angular-animate/angular-animate.min.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',
@@ -28,7 +26,7 @@ module.exports = {
'public/lib/ng-file-upload/ng-file-upload.min.js',
'public/lib/owasp-password-strength-test/owasp-password-strength-test.js',
'public/lib/angular-translate/angular-translate.min.js',
'public/lib/bootstrap-filestyle/src/bootstrap-filestyle.min.js'
'public/lib/bootstrap-filestyle/src/bootstrap-filestyle.min.js',
// endbower
]
},

View File

@@ -74,6 +74,7 @@
TORRENTS_SUBMIT_UPLOADS: '同意上传协议,并提交',
SUBMIT_BUTTON: '已备妥,现在提交',
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="#">协议条款</a>',
DOWNLOAD_TORRENT: '下载种子',
//footer view
MIT_PROTOCOL: '本项目源码受 <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> 开源协议保护',

View File

@@ -74,6 +74,7 @@
TORRENTS_SUBMIT_UPLOADS: 'Agree the rules and submit your resources',
SUBMIT_BUTTON: 'OK, SUBMIT NOW',
AGREE_RULES: 'I agree and already read all the rules, <a href="#">read here</a>',
DOWNLOAD_TORRENT: 'Download Torrent',
//footer view
MIT_PROTOCOL: 'The source of this project is protected by <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> open source protocol',

View File

@@ -5,13 +5,31 @@
.module('core')
.controller('HomeController', HomeController);
HomeController.$inject = ['$scope', '$translate'];
HomeController.$inject = ['$scope', '$translate', 'TorrentsService', 'Notification'];
function HomeController($scope, $translate) {
function HomeController($scope, $translate, TorrentsService, Notification) {
var vm = this;
//$translate.use('en');
vm.COMING = 'coming soon...';
vm.initInfo = function () {
TorrentsService.getTMDBInfo({
tmdbid: '329865',
language: 'en'
}, function (res) {
Notification.success({
message: '<i class="glyphicon glyphicon-ok"></i> ' + $translate.instant('TMDB_ID_OK')
});
vm.movieinfo = res;
$('.backdrop').css('backgroundImage', 'url(http://image.tmdb.org/t/p/w500' + res.backdrop_path + ')');
}, function (err) {
Notification.error({
message: '<i class="glyphicon glyphicon-remove"></i> ' + $translate.instant('TMDB_ID_ERROR')
});
});
};
}
}());

View File

@@ -95,4 +95,5 @@ a:hover .header-profile-image {
.view-footer .icon {
font-size: 20px;
margin-right: 15px;
}
}

View File

@@ -0,0 +1,29 @@
.backdrop {
background-image: url("http://image.tmdb.org/t/p/w1280/5pAGnkFYSsFJ99ZxDIYnhQbQFXs.jpg");
background-position: center;
background-attachment: fixed;
background-size: cover;
margin-bottom: 20px;
//filter: blur(1px);
.filter {
background-color: #2a2730;
background-color: rgba(0, 0, 0, .55);
//opacity: 0.5;
padding-top: 30px;
padding-bottom: 30px;
}
.topone {
color: #ccc;
img {
max-height: 400px;
}
legend {
color: #ccc;
}
.down-torrent {
margin-top: 10px;
margin-left: 40px;
margin-right: 40px;
}
}
}

View File

@@ -1,9 +1,116 @@
<section>
<div class="jumbotron text-center">
<div class="row">
<div class="col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3 col-xs-12">
<h1 translate="COMINGSOON"></h1>
</div>
<section ng-controller="HomeController as vm" ng-init="vm.initInfo();">
<div class="backdrop">
<div class="filter">
<div class="container">
<div class="topone">
<div class="col-md-4">
<img src="http://image.tmdb.org/t/p/w500{{vm.movieinfo.poster_path}}" class=" img-thumbnail center-block">
<div class="down-torrent">
<button class="btn btn-success btn-block" translate="DOWNLOAD_TORRENT"></button>
</div>
</div>
<div class="col-md-8">
<dl class="dl-horizontal">
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_TITLE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.original_title}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.TITLE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.title}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_LANGUAGE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.original_language}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.GENRES' | translate}}</dt>
<dd class="h-line">
<span ng-repeat="item in vm.movieinfo.genres">{{item.name}} <span
ng-show="$index < vm.movieinfo.genres.length - 1">|</span> </span>
</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.PRODUCTION_COUNTRIES' | translate}}</dt>
<dd class="h-line">
<span ng-repeat="item in vm.movieinfo.production_countries">{{item.iso_3166_1}} <span
ng-show="$index < vm.movieinfo.production_countries.length - 1">|</span> </span>
</dd>
<!--<dt class="h-line">{{ 'TMDB_FIELDS.RELEASE_DATE' | translate}}</dt>-->
<!--<dd class="h-line">{{vm.movieinfo.release_date}}</dd>-->
<!--<dt class="h-line">{{ 'TMDB_FIELDS.RUNTIME' | translate}}</dt>-->
<!--<dd class="h-line">{{vm.movieinfo.runtime}}</dd>-->
<!--<dt class="h-line">{{ 'TMDB_FIELDS.BUDGET' | translate}}</dt>-->
<!--<dd class="h-line">${{vm.movieinfo.budget}}</dd>-->
<!--<dt class="h-line">{{ 'TMDB_FIELDS.REVENUE' | translate}}</dt>-->
<!--<dd class="h-line">${{vm.movieinfo.revenue}}</dd>-->
<dt class="h-line">{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.vote_average}} / {{vm.movieinfo.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}</dd>
<!--<dt class="h-line">{{ 'TMDB_FIELDS.IMDB_LINK' | translate}}</dt>-->
<!--<dd class="h-line"><a href="https://www.themoviedb.org/movie/{{vm.movieinfo.imdb_id}}"-->
<!--target="_blank">https://www.themoviedb.org/movie/{{vm.movieinfo.imdb_id}}</a></dd>-->
<!--<dt class="h-line">{{ 'TMDB_FIELDS.TMDB_LINK' | translate}}</dt>-->
<!--<dd class="h-line"><a href="https://www.themoviedb.org/movie/{{vm.movieinfo.id}}"-->
<!--target="_blank">https://www.themoviedb.org/movie/{{vm.movieinfo.id}}</a></dd>-->
<dt class="h-line">{{ 'TMDB_FIELDS.OVERVIEW' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.overview}}</dd>
</dl>
<legend class="xsmall-legend strong-legend" translate="TMDB_FIELDS.CAST"></legend>
<div class="row">
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[0].profile_path}}"
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[0].name}}</strong></span>
<!--<p class="cast-xs-info">{{vm.movieinfo.credits.cast[0].character}}</p>-->
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[1].profile_path}}"
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[1].name}}</strong></span>
<!--<p class="cast-xs-info">{{vm.movieinfo.credits.cast[1].character}}</p>-->
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[2].profile_path}}"
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[2].name}}</strong></span>
<!--<p class="cast-xs-info">{{vm.movieinfo.credits.cast[2].character}}</p>-->
</div>
<div class="clearfix visible-xs-block visible-sm-block"></div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[3].profile_path}}"
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[3].name}}</strong></span>
<!--<p class="cast-xs-info">{{vm.movieinfo.credits.cast[3].character}}</p>-->
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[4].profile_path}}"
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[4].name}}</strong></span>
<!--<p class="cast-xs-info">{{vm.movieinfo.credits.cast[4].character}}</p>-->
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[5].profile_path}}"
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[5].name}}</strong></span>
<!--<p class="cast-xs-info">{{vm.movieinfo.credits.cast[5].character}}</p>-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container" style="background-color: #efefef;">
</div>
</div>
</section>

View File

@@ -38,7 +38,7 @@
<body class="ng-cloak">
<header ng-include="'/modules/core/client/views/header.client.view.html'" class="navbar navbar-fixed-top navbar-inverse"></header>
<section class="content">
<section class="container">
<section>
{{{block "content"}}}
</section>
</section>

View File

@@ -131,21 +131,21 @@
<div class="row">
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[0].profile_path}}"
class="img-circle img-responsive">
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[0].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[0].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[1].profile_path}}"
class="img-circle img-responsive">
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[1].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[1].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[2].profile_path}}"
class="img-circle img-responsive">
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[2].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[2].character}}</p>
@@ -153,21 +153,21 @@
<div class="clearfix visible-xs-block visible-sm-block"></div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[3].profile_path}}"
class="img-circle img-responsive">
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[3].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[3].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[4].profile_path}}"
class="img-circle img-responsive">
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[4].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[4].character}}</p>
</div>
<div class="col-xs-4 col-md-2 text-center">
<img src="http://image.tmdb.org/t/p/w132_and_h132_bestv2/{{vm.movieinfo.credits.cast[5].profile_path}}"
class="img-circle img-responsive">
class="img-circle img-responsive center-block">
<span class="cast-xs-info"><strong>{{vm.movieinfo.credits.cast[5].name}}</strong></span>
<p class="cast-xs-info">{{vm.movieinfo.credits.cast[5].character}}</p>