{% extends 'frontend.html.twig' %}
{% block article %}
<div class="grid-x grid-padding-x">
<div class="large-12 medium-12 cell">
<div class="callout">
<div class="grid-x grid-padding-x toptitle">
<div class="large-12 cell">
<h1 class="main-heading">Webcams</h1>
</div>
</div>
{% if enGeneral[0].getWebcam360CapBoscVisible() %}
<!-- afegit per Oriol -->
<div class="grid-x grid-padding-x">
<div class="large-12 medium-12 cell text-center">
<h3 class="main-heading">LiveCam 360°</h3>
<h5 class="main-heading">{{"Jumbo Tosa" | trans }}</h5>
</div>
<div class="large-12 medium-12 text-center no-movil" style="overflow: hidden!important;">
<div id="roundshot-thumbnail-54e8157b35bf33b39791639580461ee7" class="cam360" style="border: 1px solid rgba(10, 10, 10, 0.25);"></div><script src="https://backend.roundshot.com/js/roundshot_animated_thumbnail.js" type="text/javascript"></script><script type="text/javascript"> roundshot.animate({id: "54e8157b35bf33b39791639580461ee7", picture: "https://backend.roundshot.com/cams/54e8157b35bf33b39791639580461ee7/thumbnail", link: "https://masella.roundshot.com/", angle: 360, width: 1174, height: 260, bounce: false, open_in_new_tab: true, speed: 20});</script>
</div>
<div class="large-12 medium-12 cell si-movil" style="overflow: hidden!important;">
<!--vertical--> <div id="roundshot-thumbnail-54e8157b35bf33b39791639580461ee72" class="cam360 si-movil" style="border: 1px solid rgba(10, 10, 10, 0.25); overflow:hidden;"></div><script src="https://backend.roundshot.com/js/roundshot_animated_thumbnail.js" type="text/javascript"></script><script type="text/javascript"> roundshot.animate({id: "54e8157b35bf33b39791639580461ee72", picture: "https://backend.roundshot.com/cams/54e8157b35bf33b39791639580461ee7/thumbnail", link: "https://masella.roundshot.com/", angle: 360, width: 600, height: 220, bounce: false, open_in_new_tab: true, speed: 20});</script>
</div>
<p style="text-align: center; margin-bottom: 2rem;">{{"Clicar la imatge" | trans }}</p>
</div>
<!-- fi per Oriol -->
{% endif %}
<div class="grid-x grid-padding-x">
{% for webcam in enWebcams %}
<div class="large-6 medium-6 cell">
<div class="callout webcam" style="background-image:url(https://www.masella.com/cam1/mini/{{webcam.getUrl()}}?int={{ random() }})">
<a id="a{{webcam.getId()}}" class="aClick" data-open="modalWebcam" href="#" title="{{webcam.getNom()}}"><img id="img{{webcam.getId()}}" src="{{asset('/frontoffice/images/box-webcam.png')}}">
<div class="large-12 medium-12 small-12 cell">
<h6><i class="fas fa-video"></i> {{webcam.getNom()}}</h6>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
<div id="modalWebcam" class="reveal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<div class="large-12 cell">
<div class="imagecams">
<div id="mi-slider" class="mi-slider" style="position:relative;">
{% for webcam in enWebcams %}
<ul>
<!--<li><img src="https://www.masella.com/cam1/mini/{{webcam.getUrl()}}?int={{ random() }}"><h4>{{webcam.getNom()}}</h4></li>-->
<li><img src="/webcam/view/{{webcam.getId()}}?int={{ random() }}"><h4>{{webcam.getNom()}}</h4></li>
</ul>
{% endfor %}
<img src="{{asset('/frontoffice/images/bg-slider.png')}}" class="bg-slider" />
<nav>
{% for webcam in enWebcams %}
<a id="a{{webcam.getId()}}Aux" href="#">{{webcam.getNom()}}</a>
{% endfor %}
</nav>
</div>
</div>
</div>
<a class="close-button" data-close aria-label="Close reveal"><span aria-hidden="true">×</span></a>
</div>
<div id="my-popup" class="mfp-hide white-popup">
Inline popup
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
<style>
.callout.trans{text-align:center; }
img.foto{ max-height:160px; display:inline-block; margin:0 auto;}
</style>
{{parent()}}
<script src="{{asset('/frontoffice/js/jquery.mixitup.js')}}"></script>
<script src="{{asset('/frontoffice/js/smooth-scroll.js')}}" ></script>
<script src="{{asset('/frontoffice/js/owl.carousel.js')}}" ></script>
<!--POP UP-->
<script>
$(function () {
$('#mi-slider').catslider();
$('.aClick').on('click', function () {
name = $(this).attr('id');
//alert (name);
$(".mi-slider img").each(function (index) {
scr = $(this).attr('src');
//alert (scr);
//scr.replace('cam1/mini/', 'cam1/');
$(this).attr('src', scr.replace('cam1/mini/', 'cam1/'));
//alert (name + 'Aux');
$('#' + name + 'Aux').trigger('click');
});
});
});
</script>
{% endblock%}