templates/cdrom/projo900bif/index.html.twig line 1

Open in your IDE?
  1. {% extends 'cdrom/base2.html.twig' %}
  2. {% set newZindex = ( zindex + 1) %}
  3. {% block title %}CD-ROM IMMEMORY{% endblock %}
  4. {% block stylesheets %}
  5.   {% if app.user is not null %}
  6.     {% for role in app.user.roles  %}
  7.       {% if role == "ROLE_ADMIN" %}
  8.       {% endif %}
  9.     {% endfor %}
  10.   {% else %}
  11.     <SCRIPT LANGUAGE="JavaScript">
  12.       <!-- Disable
  13.       function disableselect(e){
  14.         return false
  15.       }
  16.       function reEnable(){
  17.         return true
  18.       }
  19.       //if IE4+
  20.       document.onselectstart=new Function ("return false")
  21.       document.oncontextmenu=new Function ("return false")
  22.       //if NS6
  23.       if (window.sidebar){
  24.         document.onmousedown=disableselect
  25.         document.onclick=reEnable
  26.       }
  27.       //-->
  28.     </script>
  29.   {% endif %}
  30.   <style media="screen">
  31.     body, html {
  32.       width:100%;
  33.       height: 100%;
  34.       min-width:100%;
  35.       min-height: 100%;
  36.       margin: 0;
  37.       padding: 0;
  38.     }
  39.     .ecranStack {
  40.       width: 100%;
  41.       height: 100%;
  42.       overflow: hidden;
  43.     
  44.       {% if app.user is not null %}
  45.         {% for role in app.user.roles  %}
  46.           {% if role == "ROLE_ADMIN" %}
  47.           cursor: url({{ pathLocal }}/images/curseurs/classicCursor60.png) 20 20, auto;
  48.           {% endif %}
  49.         {% endfor %}
  50.       {% else %}
  51.         cursor: url({{ pathLocal }}/images/curseurs/classicCursor60.png) 20 20, auto;
  52.       {% endif %}
  53.       position: relative;
  54.       display: flex;
  55.       justify-content: center;
  56.       align-items: center;
  57.       margin: auto;
  58.     }
  59.     .bureau{
  60.       max-width: 903px;
  61.       max-height: 677px;
  62.       margin: 15px;
  63.       min-height: 200px;
  64.       position: relative;
  65.       {% if app.user is not null %}
  66.         {% for role in app.user.roles  %}
  67.           {% if role == "ROLE_ADMIN" %}
  68.           border: 1px solid white;
  69.           {% endif %}
  70.         {% endfor %}
  71.       {% else %}
  72.       border: none;
  73.       {% endif %}
  74.     }
  75.     .Vpair{
  76.       top:0;
  77.     }
  78.     .Vimpair{
  79.       bottom:0;
  80.     }
  81.     .Vimpair .zonesImgBV{
  82.       bottom:0;
  83.     }
  84.     .Vpair .zonesImgBV{
  85.       top:0;
  86.     }
  87.     .zonesImg{
  88.       max-width: 900px;
  89.       max-height: 675px;
  90.       width: 100%;
  91.       height: 100%;
  92.       background-color: orange;
  93.     }
  94.     .zonesFilm{
  95.       max-width: 900px;
  96.       max-height: 675px;
  97.       width: 100%;
  98.       height: 100%;
  99.       top: 0;
  100.       left: 0;
  101.       display: block;
  102.       position: absolute;
  103.     }
  104.     .zonesNav{
  105.       max-width: 900px;
  106.       max-height: 675px;
  107.       width: 100%;
  108.       height: 100%;
  109.       top: 0;
  110.       left: 0;
  111.       display: block;
  112.       position: absolute;
  113.     }
  114.     .zonesX{
  115.       max-width: 900px;
  116.       max-height: 675px;
  117.       width: 100%;
  118.       height: 100%;
  119.       top: 0;
  120.       left: 0;
  121.       display: block;
  122.       position: absolute;
  123.     }
  124.     #v_film3{
  125.       top: {{ (0 / 675) * 100 }}%;
  126.       left: {{ (659 / 900) * 100 }}%;
  127.       display: block;
  128.       position: absolute;
  129.       width: {{ (210 / 900) * 100 }}%;
  130.       height: {{ (685 / 675) * 100 }}%;
  131.     }
  132.     .zoneAdd{
  133.       background-color: white;
  134.       position:absolute;
  135.       left: {{ (710 / 900) * 100 }}%;
  136.       top: {{ (195 / 675) * 100 }}%;
  137.       width: {{ (188 / 900) * 100 }}%;
  138.       height: {{ (210 / 675) * 100 }}%;
  139.       cursor: url("{{ pathLocal }}/images/curseurs/curseur-jaune.png") 20 20, auto;
  140.     }
  141.     .navH2{
  142.       position: absolute;
  143.       top: 0;
  144.       left: 0;
  145.       background-color: chartreuse;
  146.       width: {{ (900 / 900) * 100 }}%;
  147.       height: {{ (40 / 675) * 100 }}%;
  148.     }
  149.     .navG2{
  150.       position: absolute;
  151.       top: {{ (40 / 675) * 100 }}%;
  152.       left: 0;
  153.       background-color: chartreuse;
  154.       width: {{ (40 / 900) * 100 }}%;
  155.       height: {{ (595 / 675) * 100 }}%;
  156.     }
  157.     .navD2{
  158.       position: absolute;
  159.       top: {{ (40 / 675) * 100 }}%;
  160.       right: 0;
  161.       background-color: chartreuse;
  162.       width: {{ (40 / 900) * 100 }}%;
  163.       height: {{ (595 / 675) * 100 }}%;
  164.     }
  165.     .navBG2{
  166.       position: absolute;
  167.       top: {{ (635 / 675) * 100 }}%;
  168.       left: 0;
  169.       background-color: chartreuse;
  170.       width: {{ (450 / 900) * 100 }}%;
  171.       height: {{ (40 / 675) * 100 }}%;
  172.     }
  173.     .navBD2{
  174.       position: absolute;
  175.       top: {{ (635 / 675) * 100 }}%;
  176.       right: 0;
  177.       background-color: chartreuse;
  178.       width: {{ (450 / 900) * 100 }}%;
  179.       height: {{ (40 / 675) * 100 }}%;
  180.     }
  181.     .zoneActive{
  182.       {% if app.user is not null %}
  183.         {% for role in app.user.roles  %}
  184.           {% if role == "ROLE_USER" %}
  185.           opacity: 0.4;
  186.           {% endif %}
  187.         {% endfor %}
  188.       {% else %}
  189.       opacity: 0;
  190.       {% endif %}
  191.     }
  192.     .zoneActive:hover{
  193.       opacity: 0;
  194.     }
  195.     .rolloverAdd{
  196.       background-color: White;
  197.       position:absolute;
  198.       cursor: pointer;
  199.     }
  200.     .stack0{
  201.       max-width: 900px;
  202.       max-height: 675px;
  203.       width: 100%;
  204.       cursor: url('{{ pathLocal }}/images/curseurs/curseur_blanc.png') 20 20, auto;
  205.       /* background-color: orange; */
  206.     }
  207.     @media screen and (max-height: 360px) {
  208.       .bureau{
  209.         max-width: 480px;
  210.         max-height: 360px;
  211.         margin: 15px;
  212.         min-height: 125px;
  213.         position: relative;
  214.         {% if app.user is not null %}
  215.           {% for role in app.user.roles  %}
  216.             {% if role == "ROLE_ADMIN" %}
  217.             border: 1px solid white;
  218.             {% endif %}
  219.           {% endfor %}
  220.         {% else %}
  221.         border: none;
  222.         {% endif %}
  223.       }
  224.     }
  225.     @media screen and (max-width: 640px) {
  226.       .bureau{
  227.         max-width: 480px;
  228.         max-height: 360px;
  229.         margin: 15px;
  230.         min-height: 125px;
  231.         position: relative;
  232.         {% if app.user is not null %}
  233.           {% for role in app.user.roles  %}
  234.             {% if role == "ROLE_ADMIN" %}
  235.             border: 1px solid white;
  236.             {% endif %}
  237.           {% endfor %}
  238.         {% else %}
  239.         border: none;
  240.         {% endif %}
  241.       }
  242.     }
  243.     @media screen and (max-width: 568px) {
  244.       .bureau{
  245.         max-width: 426px; 900
  246.         max-height: 320px; 675
  247.         margin: 15px;
  248.         min-height: 125px;
  249.         position: relative;
  250.         {% if app.user is not null %}
  251.           {% for role in app.user.roles  %}
  252.             {% if role == "ROLE_ADMIN" %}
  253.             border: 1px solid white;
  254.             {% endif %}
  255.           {% endfor %}
  256.         {% else %}
  257.         border: none;
  258.         {% endif %}
  259.       }
  260.     }
  261.     @media screen and (max-height: 500px) {
  262.       .bureau{
  263.         max-width: 426px;
  264.         max-height: 320px;
  265.         margin: 15px;
  266.         min-height: 125px;
  267.         position: relative;
  268.         {% if app.user is not null %}
  269.           {% for role in app.user.roles  %}
  270.             {% if role == "ROLE_ADMIN" %}
  271.             border: 1px solid white;
  272.             {% endif %}
  273.           {% endfor %}
  274.         {% else %}
  275.         border: none;
  276.         {% endif %}
  277.       }
  278.     }
  279.   </style>
  280. {% endblock %}
  281. {% block body %}
  282.   <!-- Structure -->
  283.   <div class="ecranStack">
  284.     <div class="bureau">
  285.       <div class="enterStack text-center" style="position:absolute;">
  286.         <img
  287.         id="enterStackx"
  288.         src="{{ pathLocal }}/images/cdrom/ChatVertissementIntro.jpg"
  289.         alt=""
  290.         width="80%"
  291.         >
  292.         <div class="col-12">
  293.           <h2>Choisissez votre format</h2>
  294.           <a class="btn btn-sm btn-secondary" id="enterStackNatif" style="border-radius:0;">Natif</a>
  295.           &nbsp;&nbsp; - &nbsp;&nbsp;
  296.           <a class="btn btn-lg btn-success" id="enterStack" style="border-radius:0;">Upscalé</a>
  297.         </div>
  298.       </div>
  299.       <!-- Conteneur -->
  300.       <div class="stack0">
  301.         <!-- Stack -->
  302.         <div class="zonesImg">
  303.           <img
  304.           src="{{ pathLocal }}/images/cdrom/HOME-STACK001.jpeg"
  305.           alt=""
  306.           width="100%"
  307.           >
  308.         </div>
  309.         <div class="zoneTampon">
  310.         </div>
  311.       </div>
  312.     </div>
  313.   </div>
  314. {% endblock %}
  315. {% block javascripts %}
  316.   <script type="text/javascript">
  317.     $(function(){
  318.         console.log("polop"); 
  319.       // init
  320.       var oldStack = 0;
  321.       var oldRetourBiff = 0;
  322.       //$(".bureau").empty();
  323.       // init Stack // recupStackInitProjo (id_Stack, zindex, largeur, id_oldStack)
  324.       $("#enterStack").click(function(){
  325.         console.log("enterstack"); 
  326.         recupStackInitProjo( {{ stack.id }} , {{ zindex }}, 900, oldStack, oldRetourBiff );
  327.         $("#enterStack").remove();
  328.       });
  329.       // btn natif
  330.       $("#enterStackNatif").click(function(){
  331.         //recupStackInitProjo( {{ stack.id }} , {{ zindex }}, 640, oldStack, oldRetourBiff );
  332.         window.location.href = "{{ path("front_cdrom_640_ciblebif", {id: stack.id}) }}"; //Redirection similaire à un clic sur un lien
  333.         $("#enterStack").remove();
  334.       });
  335.       // load stacks functions
  336.       function recupStackInitProjo(id, zindex, size, oldStack, oldRetourBiff)
  337.       {
  338.         //alert("demo recupStack");
  339.         // AJAX recup code css, html et js
  340.         $.ajax({
  341.           type: "POST",
  342.           url: "{{ path('projo_stacks_recupStack2bif') }}",
  343.           data: {
  344.             id: id,
  345.             zindex: zindex,
  346.             size: size,
  347.             oldStack: oldStack,
  348.             oldRetourBiff: oldRetourBiff,
  349.           },
  350.           success: function(msg)
  351.           {
  352.             // affiche le code de la stack
  353.             $( ".bureau" ).prepend( msg );
  354.           }
  355.         });
  356.       }
  357.   });
  358. </script>
  359. {% endblock %}