templates/header/index.html.twig line 1

Open in your IDE?
  1. <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.5/font/bootstrap-icons.css" rel="stylesheet">
  2. <style>
  3. /* Ajusta el badge del carrito para que se posicione correctamente */
  4. .cart-icon {
  5.     position: relative;
  6.     display: inline-block;
  7. }
  8. .cart-icon .badge {
  9.     position: absolute;
  10.     top: -5px;
  11.     right: -10px;
  12.     font-size: 0.75rem;
  13. }
  14. </style>
  15. <style>
  16. /* Ajusta el badge del carrito para que se posicione correctamente */
  17. .cart-icon {
  18.     position: relative;
  19.     display: inline-block;
  20. }
  21. .cart-icon .badge {
  22.     position: absolute;
  23.     top: -5px;
  24.     right: -10px;
  25.     font-size: 0.75rem;
  26. }
  27. .header .logo{
  28.     height: 46px;
  29.     width: 46px;
  30. }
  31. .header .btn-category{
  32.     border-start-start-radius: 30px;
  33.     border-end-start-radius: 30px;
  34.     background: white;
  35.     border: 0px;
  36. }
  37. .header .btn-category:hover{
  38.     border-start-start-radius: 30px;
  39.     border-end-start-radius: 30px;
  40.     background: white;
  41.     border: 0px;
  42.     color: #E63946;
  43. }
  44. .header .btn-search{
  45.     border-start-end-radius: 30px;
  46.     border-end-end-radius: 30px;
  47.     background: white;
  48.     border: 0px;
  49. }
  50. .header .btn-search:hover{
  51.     border-start-end-radius: 30px;
  52.     border-end-end-radius: 30px;
  53.     background: white;
  54.     border: 0px;
  55.     color: #E63946;
  56. }
  57. .header .customer-service-icon{
  58.     background: white;
  59.     border: 0px;
  60. }
  61. .header .customer-service-icon:hover{
  62.     background: white;
  63.     border: 0px;
  64.     color: #E63946;
  65. }
  66. .header .bar-search-mobile{
  67.     border-start-start-radius: 30px;
  68.     border-end-start-radius: 30px;
  69. }
  70. .header .btn-buy{
  71.     border-radius:30px;
  72. }
  73. .header .bar-search{
  74.     height: 46px;
  75. }
  76. .header{
  77.     background-color: #333333;
  78.     color: white;
  79. }
  80. .header .btn.show{
  81.     color: #E63946;
  82. }
  83. .offcanvas .list-group-item a {
  84.     color: inherit;       /* Toma el color heredado (puedes definir otro, por ejemplo, #333) */
  85.     text-decoration: none; /* Elimina el subrayado */
  86. }
  87. .offcanvas .list-group-item a:hover,
  88. .offcanvas .list-group-item a:focus {
  89.     color: inherit;       /* Mantiene el color al pasar el mouse */
  90.     text-decoration: none; /* Sin subrayado en hover o foco */
  91. }
  92. .w-150px{
  93.     width: 150px;
  94. }
  95. </style>
  96. <header class="header border-bottom sticky-top">
  97.     <!-- desktop -->
  98.     <div class="container container-custom d-lg-flex d-none justify-content-between align-items-center py-4">
  99.         <h5 class="text-white pointer me-4 mb-0" onclick="window.location.href='/'">TcgBunker</h5> 
  100.         <form class="d-flex w-75" role="search" action="/order">
  101.             <div class="input-group input-group-lg">
  102.                 <!-- Botón de categorías -->
  103.                 <button class="btn btn-outline-primary dropdown-toggle btn-category fs-6" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
  104.                     Categorías
  105.                 </button>
  106.                 <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  107.                     {% for category in categories %}
  108.                         <li><a class="dropdown-item" href="/order?category={{category.id}}">{{ category.name }}</a></li>
  109.                     {% endfor %}
  110.                 </ul>
  111.                 <!-- Input de búsqueda -->
  112.                 <input type="search" name="search" class="form-control fs-6 bar-search" placeholder="Buscar..." aria-label="Buscar">
  113.                 <button class="btn btn-outline-primary btn-search fs-5" type="submit">
  114.                     <i class="bi bi-search"></i>
  115.                 </button>
  116.             </div>
  117.         </form>
  118.         <!-- Icono de Atención al Cliente -->
  119.         <a class="customer-service-icon ms-3 me-3 btn btn-outline-primary rounded-pill" href="/customer-service">
  120.             <i class="bi bi-headset fs-4"></i>
  121.         </a>
  122.         <div class="d-flex justify-content-between align-items-center w-150px ms-auto cartIconView">
  123.             {{ render(controller('App\\Controller\\HeaderController::cartIconView')) }}
  124.         </div>    
  125.     </div>
  126.     <!-- mobile -->
  127.     <div class="container container-custom d-lg-none d-block justify-content-between align-items-center">
  128.         <div class="py-3 d-flex w-100 alight-items-center justify-content-between">
  129.                 <button class="navbar-toggler fs-1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasCategories" aria-controls="offcanvasCategories">
  130.                     <i class="bi bi-list"></i>
  131.                 </button>
  132.                 <h5 class="text-white pointer mt-2 mb-0" onclick="window.location.href='/'">TcgBunker</h6> 
  133.                 <div class="cartIconView" width="27px">
  134.                     {{ render(controller('App\\Controller\\HeaderController::cartIconView')) }}
  135.                 </div>
  136.         </div>
  137.         
  138.         <div class="row pb-3">
  139.             <div class="col-12">
  140.                 <form class="d-flex w-100" role="search" action="/order">
  141.                     <div class="input-group">
  142.                         <!-- Input de búsqueda -->
  143.                         <input type="search" name="search" class="form-control fs-6 bar-search bar-search-mobile" placeholder="Buscar..." aria-label="Buscar">
  144.                         <button class="btn btn-outline-primary btn-search fs-5" type="submit">
  145.                             <i class="bi bi-search"></i>
  146.                         </button>
  147.                     </div>
  148.                 </form>
  149.             </div>
  150.         </div>
  151.     </div>
  152. </header>
  153. <!-- Offcanvas para Categorías -->
  154. <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasCategories" aria-labelledby="offcanvasCategoriesLabel">
  155.   <div class="offcanvas-header">
  156.     <h5 class="offcanvas-title" id="offcanvasCategoriesLabel">Categorías</h5>
  157.     <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Cerrar"></button>
  158.   </div>
  159.   <div class="offcanvas-body">
  160.     <!-- Lista de categorías -->
  161.     <ul class="list-group">
  162.         {% for category in categories %}
  163.             <li class="list-group-item">
  164.                 <a href="/order?category={{category.id}}" class="text-decoration-none d-flex align-items-center">
  165.                 {% if category.imageName %} 
  166.                     <img src="/uploads/images/categories/{{ category.imageName }}" alt="{{ category.name }}" class="me-2" style="width: 30px; height: 30px; object-fit: cover; border-radius: 50%;">
  167.                 {% endif %}
  168.                 {{ category.name }}
  169.                 </a>
  170.             </li>
  171.         {% endfor %}
  172.         <!-- Agregar acceso a Atención al Cliente -->
  173.         <li class="list-group-item">
  174.             <a href="/customer-service" class="text-decoration-none d-flex align-items-center">
  175.                 <i class="bi bi-headset me-2 fs-4"></i> Atención al Cliente
  176.             </a>
  177.         </li>
  178.     </ul>
  179.   </div>
  180. </div>