{% extends 'cdrom/base2.html.twig' %}
{% set newZindex = ( zindex + 1) %}
{% block title %}CD-ROM IMMEMORY{% endblock %}
{% block stylesheets %}
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
{% endif %}
{% endfor %}
{% else %}
<SCRIPT LANGUAGE="JavaScript">
<!-- Disable
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
document.oncontextmenu=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//-->
</script>
{% endif %}
<style media="screen">
body, html {
width:100%;
height: 100%;
min-width:100%;
min-height: 100%;
margin: 0;
padding: 0;
}
.ecranStack {
width: 100%;
height: 100%;
overflow: hidden;
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
cursor: url({{ pathLocal }}/images/curseurs/classicCursor60.png) 20 20, auto;
{% endif %}
{% endfor %}
{% else %}
cursor: url({{ pathLocal }}/images/curseurs/classicCursor60.png) 20 20, auto;
{% endif %}
position: relative;
display: flex;
justify-content: center;
align-items: center;
margin: auto;
}
.bureau{
max-width: 903px;
max-height: 677px;
margin: 15px;
min-height: 200px;
position: relative;
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
border: 1px solid white;
{% endif %}
{% endfor %}
{% else %}
border: none;
{% endif %}
}
.Vpair{
top:0;
}
.Vimpair{
bottom:0;
}
.Vimpair .zonesImgBV{
bottom:0;
}
.Vpair .zonesImgBV{
top:0;
}
.zonesImg{
max-width: 900px;
max-height: 675px;
width: 100%;
height: 100%;
background-color: orange;
}
.zonesFilm{
max-width: 900px;
max-height: 675px;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: block;
position: absolute;
}
.zonesNav{
max-width: 900px;
max-height: 675px;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: block;
position: absolute;
}
.zonesX{
max-width: 900px;
max-height: 675px;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: block;
position: absolute;
}
#v_film3{
top: {{ (0 / 675) * 100 }}%;
left: {{ (659 / 900) * 100 }}%;
display: block;
position: absolute;
width: {{ (210 / 900) * 100 }}%;
height: {{ (685 / 675) * 100 }}%;
}
.zoneAdd{
background-color: white;
position:absolute;
left: {{ (710 / 900) * 100 }}%;
top: {{ (195 / 675) * 100 }}%;
width: {{ (188 / 900) * 100 }}%;
height: {{ (210 / 675) * 100 }}%;
cursor: url("{{ pathLocal }}/images/curseurs/curseur-jaune.png") 20 20, auto;
}
.navH2{
position: absolute;
top: 0;
left: 0;
background-color: chartreuse;
width: {{ (900 / 900) * 100 }}%;
height: {{ (40 / 675) * 100 }}%;
}
.navG2{
position: absolute;
top: {{ (40 / 675) * 100 }}%;
left: 0;
background-color: chartreuse;
width: {{ (40 / 900) * 100 }}%;
height: {{ (595 / 675) * 100 }}%;
}
.navD2{
position: absolute;
top: {{ (40 / 675) * 100 }}%;
right: 0;
background-color: chartreuse;
width: {{ (40 / 900) * 100 }}%;
height: {{ (595 / 675) * 100 }}%;
}
.navBG2{
position: absolute;
top: {{ (635 / 675) * 100 }}%;
left: 0;
background-color: chartreuse;
width: {{ (450 / 900) * 100 }}%;
height: {{ (40 / 675) * 100 }}%;
}
.navBD2{
position: absolute;
top: {{ (635 / 675) * 100 }}%;
right: 0;
background-color: chartreuse;
width: {{ (450 / 900) * 100 }}%;
height: {{ (40 / 675) * 100 }}%;
}
.zoneActive{
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_USER" %}
opacity: 0.4;
{% endif %}
{% endfor %}
{% else %}
opacity: 0;
{% endif %}
}
.zoneActive:hover{
opacity: 0;
}
.rolloverAdd{
background-color: White;
position:absolute;
cursor: pointer;
}
.stack0{
max-width: 900px;
max-height: 675px;
width: 100%;
cursor: url('{{ pathLocal }}/images/curseurs/curseur_blanc.png') 20 20, auto;
/* background-color: orange; */
}
@media screen and (max-height: 360px) {
.bureau{
max-width: 480px;
max-height: 360px;
margin: 15px;
min-height: 125px;
position: relative;
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
border: 1px solid white;
{% endif %}
{% endfor %}
{% else %}
border: none;
{% endif %}
}
}
@media screen and (max-width: 640px) {
.bureau{
max-width: 480px;
max-height: 360px;
margin: 15px;
min-height: 125px;
position: relative;
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
border: 1px solid white;
{% endif %}
{% endfor %}
{% else %}
border: none;
{% endif %}
}
}
@media screen and (max-width: 568px) {
.bureau{
max-width: 426px; 900
max-height: 320px; 675
margin: 15px;
min-height: 125px;
position: relative;
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
border: 1px solid white;
{% endif %}
{% endfor %}
{% else %}
border: none;
{% endif %}
}
}
@media screen and (max-height: 500px) {
.bureau{
max-width: 426px;
max-height: 320px;
margin: 15px;
min-height: 125px;
position: relative;
{% if app.user is not null %}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
border: 1px solid white;
{% endif %}
{% endfor %}
{% else %}
border: none;
{% endif %}
}
}
</style>
{% endblock %}
{% block body %}
<!-- Structure -->
<div class="ecranStack">
<div class="bureau">
<div class="enterStack text-center" style="position:absolute;">
<img
id="enterStackx"
src="{{ pathLocal }}/images/cdrom/ChatVertissementIntro.jpg"
alt=""
width="80%"
>
<div class="col-12">
<h2>Choisissez votre format</h2>
<a class="btn btn-sm btn-secondary" id="enterStackNatif" style="border-radius:0;">Natif</a>
-
<a class="btn btn-lg btn-success" id="enterStack" style="border-radius:0;">Upscalé</a>
</div>
</div>
<!-- Conteneur -->
<div class="stack0">
<!-- Stack -->
<div class="zonesImg">
<img
src="{{ pathLocal }}/images/cdrom/HOME-STACK001.jpeg"
alt=""
width="100%"
>
</div>
<div class="zoneTampon">
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
<script type="text/javascript">
$(function(){
console.log("polop");
// init
var oldStack = 0;
var oldRetourBiff = 0;
//$(".bureau").empty();
// init Stack // recupStackInitProjo (id_Stack, zindex, largeur, id_oldStack)
$("#enterStack").click(function(){
console.log("enterstack");
recupStackInitProjo( {{ stack.id }} , {{ zindex }}, 900, oldStack, oldRetourBiff );
$("#enterStack").remove();
});
// btn natif
$("#enterStackNatif").click(function(){
//recupStackInitProjo( {{ stack.id }} , {{ zindex }}, 640, oldStack, oldRetourBiff );
window.location.href = "{{ path("front_cdrom_640_ciblebif", {id: stack.id}) }}"; //Redirection similaire à un clic sur un lien
$("#enterStack").remove();
});
// load stacks functions
function recupStackInitProjo(id, zindex, size, oldStack, oldRetourBiff)
{
//alert("demo recupStack");
// AJAX recup code css, html et js
$.ajax({
type: "POST",
url: "{{ path('projo_stacks_recupStack2bif') }}",
data: {
id: id,
zindex: zindex,
size: size,
oldStack: oldStack,
oldRetourBiff: oldRetourBiff,
},
success: function(msg)
{
// affiche le code de la stack
$( ".bureau" ).prepend( msg );
}
});
}
});
</script>
{% endblock %}