add film details

This commit is contained in:
2019-02-24 22:06:40 +01:00
parent 2b8a9118b8
commit e3b59d1580
5 changed files with 156 additions and 87 deletions

View File

@@ -140,16 +140,45 @@ function Film(oSettings)
.append($('<a>', {'target':'_blank', 'href':this.trailer()}) .append($('<a>', {'target':'_blank', 'href':this.trailer()})
.append($('<i>', {'class':'fa fa-fw inline fa-trailer'})) .append($('<i>', {'class':'fa fa-fw inline fa-trailer'}))
.append('Trailer')))*/ .append('Trailer')))*/
.append($('<p>', {'class':'director'}) .append($('<div>', {'class':'film-info'})
.append($('<i>', {'class':'fa fa-fw inline fa-director'})) .append($('<p>', {'class':'director'})
.append(this.director())) .append('By '+this.director())
.append($('<div>', {'class':'timetable'}))) .append($('<i>', {'class':'more-info fa fa-more'}).data('loaded', false).click(this.toggleFilmDetails)))
.append($('<div>', {'class':'film-details'}).hide())
.append($('<div>', {'class':'timetable'}))))
//.append($('<div>', {'class':'timetable fa fa-fw fa-spinner fa-spin'}))) //.append($('<div>', {'class':'timetable fa fa-fw fa-spinner fa-spin'})))
.hide() .hide()
.appendTo(this.$Main); .appendTo(this.$Main);
} }
}; };
this.toggleFilmDetails = function() {
var $This = $(this);
var show = function(hDom){
$This.data('loaded', true);
var $Dom = $(hDom);
$Dom.find('.movie-infos li').add($Dom.find('.movie-infos').next('ul').find('li')).each(function(iKey, oElem){
self.anchor().find('.film-details').append($('<p>').text($(oElem).text()));
});
self.anchor().find('.film-details, .timetable').toggle();
self.anchor().find('.more-info').removeClass('fa-spinner fa-spin').addClass('fa-close');
};
var hide = function() {
self.anchor().find('.film-details, .timetable').toggle();
self.anchor().find('.more-info').removeClass('fa-close').addClass('fa-more');
}
if(self.anchor().find('.more-info').hasClass('fa-close')) hide();
else if(!$This.data('loaded')) self.getFilmDetails(show);
else show();
};
this.getFilmDetails = function(fCallBack) {
self.anchor().find('.more-info').removeClass('fa-more').addClass('fa-spinner fa-spin');
getUgcPage('film.html', {id: self.id()}, fCallBack, function(){}, 'html');
};
this.timetable = function(iCinemaId, sLang, oTimetable) this.timetable = function(iCinemaId, sLang, oTimetable)
{ {
if(!iCinemaId) return this._timetable || {}; if(!iCinemaId) return this._timetable || {};

View File

@@ -77,7 +77,11 @@
padding:0 0 0 0.5em; padding:0 0 0 0.5em;
width: calc(100% - 0.5em - #{$poster_size}); width: calc(100% - 0.5em - #{$poster_size});
} }
main .film .info .fa-more {
display: none;
}
#buffer { #buffer {
width: 6em; width: 6em;
height: 6em; height: 6em;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -91,16 +91,23 @@ select {
.fa-director:before { .fa-director:before {
content: "\f007"; content: "\f007";
} }
.fa-more:before {
content: "\f05a";
}
.fa-spinner { .fa-spinner {
color: $ugc_color; color: $ugc_color;
font-size:2em; font-size:2em;
}
.fa-spinner:before { &:before {
content: "\f110"; content: "\f110";
}
} }
.fa-cinema:before { .fa-cinema:before {
content: "\f017"; content: "\f017";
} }
.fa-close:before {
content: "\f057";
}
.fa-date:before { .fa-date:before {
content: "\f133"; content: "\f133";
} }
@@ -219,84 +226,113 @@ main {
-webkit-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.5); -webkit-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.5);
-moz-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.5); -moz-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.5);
box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.5); box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.5);
}
* {
transform: translate(0px, 0px);
}
img.bg {
position:absolute;
top:50%;
margin-top:-25%;
left:$poster_size;
right:0;
bottom:0;
opacity:0.2;
width:calc(100% - #{$poster_size});
}
.poster-container {
display: inline-block;
img.poster {
width: $poster_size;
z-index: 2;
vertical-align: top;
}
}
.film * { p {
transform: translate(0px, 0px); margin: 0.5em 0;
} }
.film img.bg { .info {
position:absolute; z-index:2;
top:50%; display: inline-block;
margin-top:-25%; vertical-align:top;
left:$poster_size; padding:1em;
right:0; width: calc(100% - 2em - #{$poster_size});
bottom:0;
opacity:0.2; .title {
width:calc(100% - #{$poster_size}); margin: 0;
}
a.name {
.film .poster-container { font-weight: bold;
display: inline-block; text-transform: uppercase;
} }
}
.film img.poster {
width:$poster_size; .edito {
z-index:2; font-style: italic;
vertical-align: top; color:#777;
} }
.film .info { .film-info {
z-index:2; padding-left: calc((1.28571429em + 0.5em)/0.9);
display: inline-block; font-size: 0.9em;
vertical-align:top; color: #555;
padding:1em;
width: calc(100% - 2em - #{$poster_size}); .director {
} font-style: italic;
.film p { .more-info {
margin:0.5em 0; font-size: calc(1em/0.9);
} margin-left: 0.5em;
vertical-align: -0.05em;
.film .title {
margin-top:0; &:not(.fa-spin) {
} cursor: pointer;
.film .title a.name { &:hover {
font-weight: bold; color: $ugc_color;
text-transform: uppercase; }
} }
}
.film .edito { }
font-style: italic;
color:#777; .film-details {
} border-left: 2px solid #CCC;
padding-left: 0.5em;
.film .director {
color: #555; p {
} font-size: 0.8em;
color: #555;
.film .timetable { }
margin-top:1em; }
font-size: 0.8em; }
}
.timetable {
.film .timetable p { margin-top:1em;
line-height: 2.0; font-size: 0.8em;
margin: 0;
} p {
line-height: 2.0;
.film .timetable .cinema { margin: 0;
margin-right:0.5em; }
}
.cinema {
.film .timetable .cinema .fa { margin-right:0.5em;
font-size: 1.25em;
line-height: 0.7656249414em; .fa {
vertical-align: -14.06250352%; font-size: 1.25em;
} line-height: 0.7656249414em;
vertical-align: -14.06250352%;
.film .timetable .lang { }
margin-right:0.5em; }
.lang {
margin-right:0.5em;
}
}
}
} }
/* Section - Feeback */ /* Section - Feeback */