templates/vitrine/loader/streamit-swiper.html.twig line 1
<style>
.iq-card:hover .block-social-info {
opacity: 1;
}
.iq-card .block-social-info{
left: auto;
}
</style>
<script type="text/javascript">
const UBStreamitSwiper = function(){
var program;
const container = "#content-streamit", content = (d)=>{
if(d.length == 0){
$.urban.load.clearContent(container);
return "";
}
var streamits = "";
const startTitle = `{{"Commence"|trans }}`, endTitle = `{{"Jusqu'au"|trans }}`;
d.forEach(el => {
const type = el.type ? 'm' : 'e';
const web_movie_detail = ("{{path('web_movie_detail', {'_1_':'_2_'})}}").replace('_1_',type).replace('_2_',el.media.id);
streamits += `<li class="swiper-slide">
<div class="iq-card card-hover">
<div class="block-images position-relative w-100">
<div class="img-box w-100">
<a href="javascript:void(0);" class="position-absolute top-0 bottom-0 start-0 end-0 row px-2 pb-5">
<span class="col-12 mt-2"><small class="badge bg-`+el.status.label+`">`+el.status.name+`</small></span>
</a>
<img src="{{asset('`+el.media.cover+`', 'covers')}}" alt="movie-card" class="img-fluid object-cover w-100 d-block border-0">
</div>
<div class="card-description with-transition">
<div class="cart-content">
<div class="content-left w-100">
<h5 class="iq-title text-capitalize mb-0">
<a href="`+web_movie_detail+`">`+el.media.serie+`</a>
</h5>
<small>`+composeEpisodeName(el.media.nseason, el.media.nepisode)+` `+el.media.episode+`</small>
<!--div class="movie-time d-flex align-items-center my-2">
<span class="movie-time-text font-normal">`+minutesToHours(el.duration)+`</span>
</div-->
<div class="small text-end w-100">`+(el.status.code == program.code ? startTitle : endTitle)+`</div>
<div class="small text-end text-primary fw-bold w-100">`+(el.status.code == program.code ? viewTime(el.startAt) : viewTime(el.endAt))+`</div>
</div>
{# <div class="watchlist">
<a class="watch-list-not" href="playlist.html">
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="icon-10">
<path d="M12 4V20M20 12H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<span class="watchlist-label"> Watchlist </span>
</a>
</div> #}
</div>
</div>
<div class="block-social-info align-items-center">
<!--ul class="p-0 m-0 d-flex gap-2 music-play-lists">
<li class="share position-relative d-flex align-items-center text-center mb-0">
<span class="w-100 h-100 d-inline-block bg-transparent">
<i class="fas fa-share-alt"></i>
</span>
<div class="share-wrapper">
<div class="share-boxs d-inline-block">
<svg width="15" height="40" class="share-shape" viewBox="0 0 15 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8842 40C6.82983 37.2868 1 29.3582 1 20C1 10.6418 6.82983 2.71323 14.8842 0H0V40H14.8842Z" fill="#191919"></path>
</svg>
<div class=" overflow-hidden">
<a href="" target="_blank">
<i class="fab fa-facebook-f"></i>
</a>
<a href="" target="_blank">
<i class="fab fa-twitter"></i>
</a>
<a href="#">
<i class="fas fa-link"></i>
</a>
</div>
</div>
</div>
</li>
<li class="share position-relative d-flex align-items-center text-center mb-0">
<span class="w-100 h-100 d-inline-block bg-transparent">
<i class="fa-regular fa-heart"></i>
</span>
<div class="share-wrapper">
<div class="share-boxs d-inline-block">
<svg width="15" height="40" class="share-shape" viewBox="0 0 15 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8842 40C6.82983 37.2868 1 29.3582 1 20C1 10.6418 6.82983 2.71323 14.8842 0H0V40H14.8842Z" fill="#191919"></path>
</svg>
<div class=" overflow-hidden">
<span>+51</span>
</div>
</div>
</div>
</li>
</ul-->
<div class="iq-button">
<a href="`+web_movie_detail+`" class="btn text-uppercase position-relative rounded-circle">
<i class="fa-solid fa-play ms-0"></i>
</a>
</div>
</div>
</div>
</div>
</li>`;
});
return `<div class="container-fluid">
<div class="overflow-hidden">
<div class="d-flex align-items-center justify-content-between px-md-3 px-1 my-4">
<h5 class="main-title text-capitalize mb-0">{{"Films et séries en diffusion"|trans}}</h5>
<a href="{{path('web_live')}}" class="text-primary iq-view-all text-decoration-none flex-none">{{"Voir plus"|trans}}</a>
</div>
<div class="card-style-slider">
<div class="position-relative swiper swiper-card" data-slide="5" data-laptop="5" data-tab="4" data-mobile="2" data-mobile-sm="1" data-autoplay="false" data-loop="true" data-navigation="true" data-pagination="true">
<ul class="p-0 swiper-wrapper m-0 list-inline">
`+streamits+`
</ul>
<div class="swiper-button swiper-button-next"></div>
<div class="swiper-button swiper-button-prev"></div>
</div>
</div>
</div>
</div>`;
}
return {
init: ()=>{
$.urban.load.ajax(container, "{{path('app_broadcast_index')}}", (r)=>{
program = r.program;
return content(r.data);
}, {start:0, length:10, order:[{column:'startAt',dir:'1'}]});
}
}
}();
UBStreamitSwiper.init();
</script>