templates/basic/menu_ppal.html.twig line 1

Open in your IDE?
  1.   <nav id="nav" class="header only-desk">
  2.     <div class="bg-blanco">
  3.       <div class="container">
  4.          
  5.         <div class="row">
  6.           
  7.           <div class="col-2 d-flex align-items-center justify-content-center">
  8.               <a href="{{ path('homepage') }}" class="py-4">
  9.                 <img class="logo" src="{{ asset('img/SVG/logo.svg') }}" alt="">
  10.               </a> 
  11.           </div>
  12.           <div class="col-10">
  13.             
  14.             <div class="py-2 d-flex justify-content-end align-items-center nav-1">
  15.                 <div class="nav-item"> 
  16.                   <div class="search-box">
  17.                     <form action="{{ path('buscador') }}">
  18.                     {# buscador desktop #}
  19.                       <input class="search" type="text" placeholder="Buscar" name="search" value="{{ app.request.get('search',"") }}" required>
  20.                       <button><i class="icon-search color-naranja"></i></button>
  21.                     </form>
  22.                   </div> 
  23.                 </div>
  24.                 <div class="nav-item">
  25.                   <button class="btn border"><a href="{{ path('blog') }}">Blog </a></button>
  26.                 </div>
  27.                 <div class="nav-item">
  28.                   <button class="btn btn-naranja"><a href="{{ path('tiendas') }}">Tiendas</a></button>
  29.                 </div>
  30.                 <div class="nav-item">
  31.                   <a class="icon-nav openCar"><i class="icon-carrito"></i></a>
  32.                   <span class="badge_carrito">{{ qi.carritoLength }}</span>
  33.                 </div>
  34.                 {# perfill desktop #}
  35.                 {% if not app.user %}
  36.                 <div class="nav-item">
  37.                   <a class="icon-nav login-display"><i class="icon-person"></i></a>
  38.                 </div>
  39.                 {% else %}
  40.                   <div class="nav-item">
  41.                     <a class="icon-nav login-display"><i class="icon-person"></i></a>
  42.                     <ul class="opciones-usuario">
  43.                       <li>
  44.                         <a href="{{path('mis-datos')}}" class="btn x-grande color-negro border-0 px-2">{{ qi.texto('mis-datos') }}</a>
  45.                       </li>
  46.                       <li>
  47.                           <a href="{{path('mis-compras')}}" class="btn x-grande color- border-0 px-2">{{ qi.texto('mis-pedidos') }}</a>
  48.                       </li>
  49.                       <li>
  50.                           <a href="{{path('mis-direcciones')}}" class="btn x-grande color-negro border-0 px-2">{{ qi.texto('mis-direcciones') }}</a>
  51.                       </li>
  52.                       {# <li>
  53.                         <a href="{{path('mis-compras')}}" class="btn x-grande color-negro border-0 px-2">{{ qi.texto('mis-compras') }}</a>
  54.                       </li> #}
  55.                       <li>
  56.                         <a href="{{path('mis-favoritos')}}" class="btn x-grande color-negro border-0 px-2">{{ qi.texto('mis-favoritos') }}</a>
  57.                       </li>
  58.                       <li>
  59.                         <a  href="javascript:void(0)" class="btn py-1 px-3 mb-1 px-1" id="cerrar_sesion">{{ qi.texto('cerrar-sesion') }}</a>
  60.                       </li>
  61.                     </ul>
  62.                   </div>
  63.                 {% endif %} 
  64.             </div>
  65.             {# desplegable/menuu desktop #}
  66.             <div class="py-2 d-flex justify-content-end align-items-start" > 
  67.               <ul class="items">                                  
  68.                   {% for cat in qi.CategoriasConProductos() %} 
  69.                     <li class="it-busqueda" 
  70.                     {% set clasif = null %} 
  71.                     {# {% if qi.getSubCategoriasConProductos(cat.id) %}data-firmeza="1"{% else %}data-firmeza="0"{% endif %} {% if qi.medidasProducto(cat.id) %}data-medida="1"{% else %}data-medida="0"{% endif %} {% if qi.materialProducto(cat.id) %}data-material="1"{% else %}data-material="0"{% endif %}#} data-id="{{ cat.id }}" data-name="{{cat.nombre}}" data-slug="{{cat.slug}}" {% if qi.getSubCategoriasConProductos(cat.id) and qi.clasificacionespercategoria(cat.id)  %}data-desplegable="1"{% else %}data-desplegable="0"{% endif %} 
  72.                     >
  73.                       <a>
  74.                         <span class="img">
  75.                           <img src="{{ cat.imagen }}" alt=""/>
  76.                         </span>                        
  77.                         <span class="sm {% if idprincipal is defined and idprincipal == cat.id %} active {% endif %}">{{ cat.nombre | raw }}</span> 
  78.                       </a>
  79.                     </li>
  80.                 {% endfor %}
  81.               </ul>
  82.             </div>
  83.           </div>
  84.         </div>
  85.       </div>
  86.     </div>
  87.     
  88.     <!-- AQUƍ ANTES ESTABA basic/busqueda.html.twig -->
  89.   </nav>
  90. <div class="only-mobile">
  91.   <nav class="bg-gris2 pt-2">
  92.     <div class="text-center">
  93.       <a href="/"><img class="logo-menu" src="{{ asset('img/SVG/logo.svg') }}" alt=""></a>
  94.     </div>
  95.     <div class="d-flex justify-content-between align-items-center">
  96.       <a class="icon-nav menu" id="menu-collapse"><img src="{{ asset('img/SVG/menu.svg') }}" alt=""></a>
  97.       <a href="{{ path('blog') }}" class="border rounded border-naranja-1 color-naranja py-1 px-2 font-weight-bold mr-2">Blog</a>
  98.       {# buscador mobile #}
  99.       <a class="icon-nav openSearch"><i class="icon-search"></i><br>
  100.       </a>
  101.       <a class="icon-nav openCar" id="cart" href="#"><i class="icon-carrito"></i><br>
  102.       </a>
  103.       <span class="badge_carrito">{{ qi.carritoLength }}</span>
  104.       {# perfill mobile #}
  105.       {% if not app.user %}
  106.       <a class="icon-nav login-display"><i class="icon-person"></i> <br>
  107.       </a>
  108.       {% endif %}
  109.       {% if app.user %}
  110.         <div class="nav-item">
  111.           <a class="icon-nav login-display" >
  112.             <i class="icon-person"></i>
  113.           </a>
  114.           <ul class="opciones-usuario">
  115.             <li>
  116.               <a href="{{path('mis-datos')}}" class="btn py-1 px-3">{{ qi.texto('mis-datos') }}</a>
  117.             </li>
  118.             <li>
  119.                 <a href="{{path('mis-compras')}}" class="btn py-1 px-3">{{ qi.texto('mis-pedidos') }}</a>
  120.             </li>
  121.             <li>
  122.                 <a href="{{path('mis-direcciones')}}" class="btn py-1 px-3">{{ qi.texto('mis-direcciones') }}</a>
  123.             </li>
  124.             {# <li>
  125.               <a href="{{path('mis-compras')}}" class="btn x-grande color-negro border-0 px-2">{{ qi.texto('mis-compras') }}</a>
  126.             </li> #}
  127.             <li>
  128.               <a href="{{path('mis-favoritos')}}" class="btn py-1 px-3">{{ qi.texto('mis-favoritos') }}</a>
  129.             </li>
  130.             <li>
  131.               <a   href="javascript:void(0)" class="btn py-1 px-3" id="cerrar_sesion">{{ qi.texto('cerrar-sesion') }}</a>
  132.             </li>
  133.           </ul>
  134.         </div>
  135.       {% endif %}
  136.       <!-- <a class="icon-nav menu" id="menu-collapse"><img src="{{ asset('img/SVG/menu.svg') }}" alt=""></a> -->
  137.     </div>
  138.     <div class="buscador-mobile position-absolute">
  139.       <form action="{{ path('buscador') }}" class="d-flex justify-content-center align-items-strech p-2">
  140.         <input type="search" placeholder="Buscar..." name="search" value="{{ app.request.get('search',"") }}" required/>
  141.         <button type="submit" class="p-1">
  142.           <i class="icon-search color-naranja"></i>     
  143.         </button>
  144.       </form>
  145.     </div>
  146.   </nav>
  147.   <div class="menu-mobile bg-gris2">
  148.     {# menuu de mobile #}
  149.     <ul class="pt-3">
  150.       {% for cat in qi.CategoriasConProductos() %}
  151.         {% set medidas = qi.medidasProducto(cat.id)|length %}
  152.         {% set materiales = qi.materialProducto(cat.id)|length %}
  153.         <li class="d-flex justify-content-between align-items-center flex-wrap"> 
  154.         {% set catslug = cat.slug %}
  155.           <a class="item-link" href="{{ path('categoria_slug', {categoria: catslug }) }}">
  156.             <img class="img-iconos" src="{{cat.imagen}}" alt="{{cat.nombre}}"/>
  157.             <span class="medium mb-0">{{ cat.nombre }}</span>
  158.           </a>
  159.           {% if qi.clasificacionespercategoria(cat.id)|length > 0 %}
  160.           <a class="control"><i class="icon-right"></i></a>
  161.           <ul class="submenu bg-naranja">
  162.               {% for div in qi.clasificacionespercategoria(cat.id) %}
  163.                 <li class="d-flex justify-content-between align-items-center flex-wrap">
  164.                   <a class="color-blanco">{{div.nombre|capitalize}}</a>
  165.                   <a class="control">
  166.                     <i class="icon-right"></i>
  167.                   </a>
  168.                   {% set clasif = div.clasificacion.id %}
  169.                   <ul class="submenu bg-naranja px-3">
  170.                   {% for sub in qi.getProductosdesplegable(clasif,cat.id) %}
  171.                     <div class="d-flex align-items-center">
  172.                       <img src="{{sub.icono}}" alt="Icon" class="icono mr-2"> 
  173.                       <a href="{{ sub.enlace }}" class="color-blanco"> {{ sub.nombre|capitalize }} </a>
  174.                     </div>
  175.                   {% endfor %}
  176.                   </ul>
  177.                 </li>
  178.               {% endfor %}
  179.           </ul>
  180.           {% endif %}
  181.         </li>
  182.       {% endfor %}
  183.     </ul>
  184.   </div>
  185. </div>
  186. {{ include('basic/car.html.twig') }}
  187. {% if not app.user %}
  188. {{ include('basic/login-panel.html.twig') }}
  189. {% endif %}