templates/bundles/SyliusShopBundle/Product/Index/colorbar.html.twig line 1

Open in your IDE?
  1. {% set colors = ['red','orange','yellow','green','blue','indigo','violet'] %}
  2. <div>
  3.     <div class="title-state-div"><h4>Couleurs</h4><span class="toggle-btn-3" id="button-div" onclick="toggleDiv('div-color-bar', 'toggle-btn-3')">-</span></div>
  4.     <div class="div-color-bar">
  5.         <div class="" id="sylius_product_color">
  6.             {% for color in colors %}
  7.                 <div class="div-color">
  8.                     <input type="checkbox" name="color-product[]" value="{{ color}}" id="{{ color}}" class="product_color">
  9.                     <div class="big-point" style="border: 0.15rem solid {{ color }}">
  10.                     </div>
  11.                     <div class="litle-point" style="background-color: {{ color }}" >
  12.                         <svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
  13.                             <path d="M4 9.4L0 5.4L1.4 4L4 6.6L10.6 0L12 1.4L4 9.4Z" fill="white"/>
  14.                         </svg>
  15.                     </div>
  16.                 </div>
  17.             {% endfor %}
  18.         </div>
  19.     </div>
  20. </div>
  21. <style>
  22.     /*.div-color{*/
  23.     /*    margin: 0 1rem;*/
  24.     /*    position: relative;*/
  25.     /*    height: 4rem;*/
  26.     /*}*/
  27.     /*.big-point {*/
  28.     /*    display: none;*/
  29.     /*    width: 4rem;*/
  30.     /*    height: 4rem;*/
  31.     /*    border-radius: 50%;*/
  32.     /*    background-color: transparent;*/
  33.     /*    z-index: 1;*/
  34.     /*    position: absolute;*/
  35.     /*    top: 0;*/
  36.     /*}*/
  37.     /*.div-color .litle-point {*/
  38.     /*    width: 3rem;*/
  39.     /*    height: 3rem;*/
  40.     /*    z-index: 2;*/
  41.     /*    position: absolute;*/
  42.     /*    top: 0.5rem;*/
  43.     /*    left: 0.5rem;*/
  44.     /*    border-radius: 50%;*/
  45.     /*    display: flex;*/
  46.     /*    align-items: center;*/
  47.     /*    justify-content: center;*/
  48.     /*}*/
  49.     /*.div-color .litle-point > svg {*/
  50.     /*    width: 1.5rem;*/
  51.     /*    height: 1.5rem;*/
  52.     /*    display: none;*/
  53.     /*}*/
  54.     /*.div-color input[type=checkbox]:checked ~ .litle-point > svg {*/
  55.     /*    display: block;*/
  56.     /*}*/
  57.     /*.div-color input[type=checkbox]:checked ~ .big-point {*/
  58.     /*    display: block;*/
  59.     /*}*/
  60.     /*.div-color input[type=checkbox] {*/
  61.     /*    z-index: 3;*/
  62.     /*    cursor: pointer;*/
  63.     /*    position: absolute;*/
  64.     /*    top: 0.5rem;*/
  65.     /*    left: 0.5rem;*/
  66.     /*}*/
  67.     /*.product_color{*/
  68.     /*    -webkit-appearance: none;*/
  69.     /*    !*padding: 10px;*!*/
  70.     /*    border-radius: 2rem;*/
  71.     /*    display: inline-block;*/
  72.     /*    position: relative;*/
  73.     /*    height: 3rem;*/
  74.     /*    width: 3rem;*/
  75.     /*    !*border: 5px solid transparent;*!*/
  76.     /*}*/
  77.     /*#sylius_product_color{*/
  78.     /*    display: flex;*/
  79.     /*    flex-direction: row;*/
  80.     /*    gap: 1rem 2.5rem;*/
  81.     /*    flex-wrap: wrap;*/
  82.     /*}*/
  83. </style>