templates/vitrine/loader/index-page.html.twig line 1
<script type="text/javascript">
const UBMovies = function(){
const container = "#content-movies", title_movie = (k, d, i)=>{
// const active = k==0?'show active':'';
return `<div class="swiper-slide swiper-bg">
<div class="block-images position-relative ">
<div class="img-box">
<img src="`+("{{asset('_1_', 'covers')}}").replace("_1_", d.cover)+`" class="img-fluid" alt="`+d.title+`" loading="lazy">
<div class="block-description ps-3">
<h6 class="iq-title fw-500 mb-0">`+d.title+`</h6>
<span class="fs-12">`+minutesToHours(d.duration)+`</span>
</div>
</div>
</div>
</div>`;
}, genres_movies = (k, d, i)=>{
return `<li class="position-relative text-capitalize font-size-14 letter-spacing-1">
<a href="`+("{{path('web_view_all_movie', {'g':'_1_'})}}").replace('_1_',d.id)+`" class="text-decoration-none">`+d.text+`</a>
</li>`;
}, body_movie = (k, d)=>{
var gens = "";
$.each(d.genre, function(key, val){
gens += genres_movies(key, val, d.id);
});
return `<div class="swiper-slide p-0">
<div class="slider--image block-images">
<img src="`+("{{asset('_1_', 'covers')}}").replace("_1_", d.cover)+`" loading="lazy" alt="`+d.title+`" />
</div>
<div class="description">
<div class="row align-items-center h-100">
<div class="col-lg-6 col-md-12">
<div class="slider-content">
<div class="d-flex align-items-center RightAnimate mb-3">
<ul class="p-0 mb-0 list-inline d-flex flex-wrap align-items-center movie-tag">
`+gens+`
</ul>
</div>
<h1 class="texture-text big-font letter-spacing-1 line-count-1 text-capitalize RightAnimate-two"> `+d.title+` </h1>
<p class="line-count-3 RightAnimate-two">`+d.description+`</p>
<div class="d-flex flex-wrap align-items-center gap-3 RightAnimate-three">
<div class="slider-ratting d-flex align-items-center">
<ul class="ratting-start p-0 m-0 list-inline text-warning d-flex align-items-center justify-content-left">
<li>
<i class="fa fa-star" aria-hidden="true"></i>
</li>
</ul>
<span class="text-white ms-2 font-size-14 fw-500">`+d.rating+`</span>
</div>
<span class="font-size-14 fw-500">`+minutesToHours(d.duration)+`</span>
</div>
</div>
<div class="RightAnimate-four">
<div class="iq-button">
<a href="`+("{{path('web_movie_detail', {'m':'_1_'})}}").replace("_1_",d.id)+`" class="btn text-uppercase position-relative">
<span class="button-text">{{"Regarder"|trans}}</span>
<i class="fa-solid fa-play"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>`;
}, movies = (d)=>{
if(d.length == 0){
$.urban.load.clearContent(container);
return "";
}
var titles = "", tabs = "";
$.each(d, function(key, val){
titles += title_movie(key, val, d.id);
tabs += body_movie(key, val, d.id);
});
return `<div class="position-relative slider-bg d-flex justify-content-end">
<div class="position-relative my-auto">
<div class="horizontal_thumb_slider" data-swiper="slider-thumbs-ott">
<div class="banner-thumb-slider-nav">
<div class="swiper-container " data-swiper="slider-thumbs-inner-ott">
<div class="swiper-wrapper">
`+titles+`
</div>
</div>
<div class="slider-prev swiper-button">
<i class="iconly-Arrow-Left-2 icli"></i>
</div>
<div class="slider-next swiper-button">
<i class="iconly-Arrow-Right-2 icli"></i>
</div>
</div>
</div>
</div>
<div class="slider-images" data-swiper="slider-images-ott">
<div class="swiper-container" data-swiper="slider-images-inner-ott">
<div class="swiper-wrapper m-0">
`+tabs+`
</div>
</div>
</div>
</div>`;
};
return {
init: ()=>{
$.urban.load.ajax(container, "{{path('app_get_list_movie')}}", (r)=>{
return movies(r.aaData);
}, {start:0, length:5, order:[{column:'rating',dir:'-1'}]});
}
}
}(),
UBTopTen = function(){
const container = "#content-topten", body_topten = (k, d)=>{
const url = d.type ? ("{{path('web_movie_detail', {'m':'_1_'})}}").replace("_1_",d.id) : ("{{path('web_series_detail', {'s':'_1_'})}}").replace("_1_",d.id);
return `<li class="swiper-slide" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-original-title="`+d.title+`" title="`+d.title+`">
<div class="iq-top-ten-block">
<div class="block-image position-relative">
<div class="img-box">
<a class="overly-images" href="`+url+`">
<img src="`+("{{asset('_1_', 'covers')}}").replace("_1_",d.cover)+`" alt="`+d.title+`" class="img-fluid object-cover topimg">
</a>
<span class="top-ten-numbers texture-text">`+(k+1)+`</span>
</div>
</div>
</div>
</li>`;
}, topten = (d)=>{
if(d.length == 0){
$.urban.load.clearContent(container);
return "";
}
var tabs = "";
$.each(d, function(key, val){
tabs += body_topten(key, val, d.id);
});
return `<div class="container-fluid pt-4">
<section class="overflow-hidden">
<div class="d-flex align-items-center justify-content-between px-md-3 px-1 mb-4">
<h5 class="main-title text-capitalize mb-0">{{'Les dix meilleurs films à voir'|trans}}</h5>
{# <a href="?order=rate" class="text-primary iq-view-all text-decoration-none flex-none"></a> #}
</div>
<div class="position-relative swiper swiper-card iq-top-ten-block-slider" data-slide="6" data-laptop="6" data-tab="3" data-mobile="2" data-mobile-sm="2" data-autoplay="false" data-loop="false" data-navigation="true" data-pagination="true">
<ul class="p-0 swiper-wrapper mb-5 list-inline">
`+tabs+`
</ul>
<div class="swiper-button swiper-button-next"></div>
<div class="swiper-button swiper-button-prev"></div>
</div>
</section>
</div>`;
};
return {
init: ()=>{
$.urban.load.ajax(container, "{{path('app_get_list_movie')}}", (r)=>{
return topten(r.aaData);
}, {notype:true, start:0, length:10, order:[{column:'rating',dir:'-1'}]});
}
}
}(),
UBSeries = function(){
const container = "#content-series", title_season = (k, d, i)=>{
const active = k==0?'show active':'';
return `<li class="nav-item" role="presentation">
<button class="nav-link `+active+`" data-bs-toggle="pill" data-bs-target="#pills-`+i+`-`+d.id+`" type="button" role="tab" aria-selected="false">`+("{{'Saison _1_'|trans}}").replace("_1_", d.number)+`</button>
</li>`;
}, episode_season = (k, d)=>{
return `<li class="d-flex align-items-center gap-3">
<div class="image-box flex-shrink-0">
<img src="`+("{{asset('_1_', 'covers')}}").replace("_1_",d.cover)+`" alt="image-icon" class="img-fluid rounded">
</div>
<div class="image-details">
<a href="`+("{{path('web_movie_detail', {'e':'_1_'})}}").replace('_1_', d.id)+`">
<h6 class="mb-1 text-capitalize"><span class="text-primary">E`+d.number+`</span> - `+d.name+`</h6>
</a>
<small>`+d.duration+` minutes</small>
</div>
</li>`;
}, episodes_season = (d)=>{
var episodes = "";
$.each(d, function(key, val){
episodes += episode_season(key, val);
});
return episodes;
}, panel_season = (k, d, i)=>{
const active = k==0?'show active':'';
return `<div class="tab-pane fade `+active+`" id="pills-`+i+`-`+d.id+`" role="tabpanel" tabindex="0">
<ul class="list-inline m-0 p-0">
`+episodes_season(d.episodes)+`
</ul>
</div>`;
}, seasons_serie = (d)=>{
var titles = "", tabs = "";
$.each(d, function(key, val){
titles += title_season(key, val, d.id);
tabs += panel_season(key, val, d.id);
});
return `<div class="tab-bottom-bordered border-0">
<ul class="nav nav-tabs nav-pills mb-3 overflow-x-scroll" role="tablist">
`+titles+`
</ul>
</div>
<div class="tab-content iq-tab-fade-up">
`+tabs+`
</div>`;
}, one = (k, d)=>{
return `<li class="swiper-slide tab-slider-banner p-0">
<div class="tab-slider-banner-images">
<img src="`+("{{asset('_1_', 'covers')}}").replace("_1_", d.cover)+`" alt="tab-slider-background">
</div>
<div class="block-images position-relative w-100">
<div class="container-fluid">
<div class="row align-items-center min-vh-100 h-100 my-4">
<div class="col-md-5 col-lg-5 col-xxl-5">
<div class="tab-left-details">
<div class="d-flex align-items-center gap-3 mb-4">
</div>
<h1 class="mb-2 fw-500 text-capitalize texture-text">`+d.name+`</h1>
<p class="mb-0 font-size-14 line-count-2">`+d.description+`</p>
<ul class="d-flex align-items-center list-inline gap-2 movie-tag p-0 mt-3 mb-40">
<li class="font-size-18">`+d.release+`</li>
<li class="font-size-18">`+("{{'_1_ saison(s)'|trans}}").replace("_1_", d.seasons.length)+`</li>
</ul>
<div class="iq-button">
<a href="`+("{{path('web_series_detail', {'s':'_1_'})}}").replace('_1_', d.id)+`" class="btn text-uppercase position-relative">
<span class="button-text">{{"Voir plus"|trans}}</span>
<i class="fa-solid fa-play"></i>
</a>
</div>
</div>
</div>
<div class="col-md-1 col-lg-2 col-xxl-3">
</div>
<div class="col-md-6 col-lg-5 col-xxl-4 mt-5 mt-md-0">
<div class="tab-block">
`+seasons_serie(d.seasons)+`
</div>
</div>
</div>
</div>
</div>
</li>`;
}, list = (d)=>{
var series = ``;
$.each(d, function(key, val){
series += one(key, val);
});
return series;
}, series = (d)=>{
if(d.length == 0){
$.urban.load.clearContent(container);
return "";
}
return `<div class="position-relative swiper swiper-card" data-slide="1" data-laptop="1" data-tab="1" data-mobile="1" data-mobile-sm="1" data-autoplay="true" data-loop="false" data-navigation="true" data-pagination="true" data-effect="fade">
<ul class="p-0 swiper-wrapper m-0 list-inline">
`+list(d)+`
</ul>
<div class="joint-arrows">
<div class="swiper-button swiper-button-next"></div>
<div class="swiper-button swiper-button-prev"></div>
</div>
</div>`;
};
return {
init: ()=>{
$.urban.load.ajax(container, "{{path('app_series_index')}}", (r)=>{
return series(r.data);
}, {start:0, length:5, order:[{column:'rating',dir:'-1'}]});
}
}
}();
UBMovies.init();
UBTopTen.init();
UBSeries.init();
</script>