{"id":55,"date":"2023-05-18T18:38:09","date_gmt":"2023-05-18T18:38:09","guid":{"rendered":"http:\/\/localhost\/tomateros\/?page_id=55"},"modified":"2023-11-09T11:18:06","modified_gmt":"2023-11-09T18:18:06","slug":"offseason","status":"publish","type":"page","link":"https:\/\/web.tomateros.online\/","title":{"rendered":"OffSeason"},"content":{"rendered":"\n<!-- section starts  -->\n   <section id=\"hero\">\n    <div class=\"container-fluid\">\n        <div class=\"row mt-0 gy-4\">\n            <!-- Imagen banner tienda y radio offsesion  -->\n            <div class=\"col-lg-12\">\n                <div class=\"row\">\n                    <div class=\"col-12 col-md-12 col-lg-8\">\n                        <div class=\"row\">\n                             <!-- Noticas off season  -->\n                            <div class=\"col-12\">\n                                <div class=\"shadow-lg p-3 bg-body rounded h-100\">\n                                    <div class=\"row\">\n                                        <div class=\"col-12\">\n                                            <div class=\"widget-header\">\n                                                <h5 class=\"widget-header px-2 color-title\">NOTICIAS<\/h5>\n                                            <\/div>\n                                            <div id=\"carouselExampleControls\" class=\"carousel slide\" data-ride=\"carousel\">\n                                                <div id=\"sliderNews\" class=\"carousel-inner\"><\/div>\n                                            <\/div>\n                                        <\/div>\n                                        <div class=\"col-sm-12 mt-2\">\n                                            <div id=\"news\" class=\"contenedor-slider text-center\">\n                                                <div class=\"column\">\n                                                    <div class=\"thumb rounded\">\n                                                        <button class=\"p-2 border-0 bg-white\" id=\"slider1\"><\/button>\n                                                    <\/div>\n                                                    <div id=\"newInfo1\" class=\"details clearfix\"><\/div>\n                                                <\/div>\n                                                <div class=\"column\">\n                                                    <div class=\"thumb rounded\">\n                                                        <button class=\"p-2 border-0 bg-white\" id=\"slider2\"><\/button>\n                                                    <\/div>\n                                                    <div id=\"newInfo2\" class=\"details clearfix\"><\/div>\n                                                <\/div>\n                                                <div class=\"column\">\n                                                    <div class=\"thumb rounded\">\n                                                        <button class=\"p-2 border-0 bg-white\" id=\"slider3\"><\/button>\n                                                    <\/div>\n                                                    <div id=\"newInfo3\" class=\"details clearfix\"><\/div>\n                                                <\/div>\n                                                <div class=\"column\">\n                                                    <div class=\"thumb rounded\">\n                                                        <button class=\"p-2 border-0 bg-white\" id=\"slider4\"><\/button>\n                                                    <\/div>\n                                                    <div id=\"newInfo4\" class=\"details clearfix\"><\/div>\n                                                <\/div>\n                                                <div class=\"column\">\n                                                    <div class=\"thumb rounded\">\n                                                        <button class=\"p-2 border-0 bg-white\" id=\"slider5\"><\/button>\n                                                    <\/div>\n                                                    <div id=\"newInfo5\" class=\"details clearfix\"><\/div>\n                                                <\/div>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <div class=\"col-12 gy-4\">\n                                 <div id=\"bannerPromo\" class=\"shadow-lg bg-body rounded \">\n                                    <a href=\"https:\/\/beisshoptomateros.com.mx\/\">\n                                        <img decoding=\"async\" src=\"\/wp-content\/uploads\/2023\/07\/Banner-Beisshop.png\" class=\"img-fluid rounded\"\n                                            alt=\"Banner-Beisshop\">\n                                    <\/a>\n                                <\/div><\/div>\n                        <\/div>\n                    <\/div>\n                    <div class=\"col-12 col-md-12 col-lg-4\">\n                        <div class=\"row h-100\">\n                            <div class=\"col-12 col-md-12 col-lg-12 gy-4 gy-md-4 gy-lg-0\">\n                                <div class=\"shadow-lg p-3 bg-body rounded\">\n                                    <div class=\"widget-header text-center\">\n                                        <h5 class=\"widget-header color-title\">PATROCINADORES<\/h5>\n                                    <\/div>\n                                    <!-- Slider -->\n                                    <div class=\" slider card-effect\">\n                                        <div id=\"carouselExampleInterval\" class=\"carousel slide\" data-bs-ride=\"carousel\">\n                                            <div id=\"marcas\" class=\"carousel-inner py-3\"><\/div>\n                                            <button class=\"carousel-control-prev\" type=\"button\"\n                                                data-bs-target=\"#carouselExampleInterval\" data-bs-slide=\"prev\">\n                                                <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"><\/span>\n                                                <span class=\"visually-hidden\">Previous<\/span>\n                                            <\/button>\n                                            <button class=\"carousel-control-next\" type=\"button\"\n                                                data-bs-target=\"#carouselExampleInterval\" data-bs-slide=\"next\">\n                                                <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"><\/span>\n                                                <span class=\"visually-hidden\">Next<\/span>\n                                            <\/button>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                            <div class=\"col-12 gy-4 gy-md-4 gy-lg-2\">\n                                <div id=\"guinda\" class=\"shadow-lg p-3 bg-body rounded h-100 text-center\">    \n                                <\/div>\n                            <\/div>\n                            <div class=\"col-12 gy-4\">\n                                <div class=\"shadow-lg p-3 bg-body rounded h-100\">\n                                    <div class=\" d-flex align-items-center p-3 justify-content-center\">\n                                        <img decoding=\"async\" class=\"img-fluid\" src=\"\/wp-content\/uploads\/2023\/07\/LOGO-RADIO-TOMATEROS-01.jpg\"\n                                            alt=\"logo-radio\">\n                                    <\/div>\n                                    <div class=\"card-body d-flex align-items-center justify-content-center\">\n                                        <audio controls=\"controls\">\n                                            <source src=\"https:\/\/stream-43.zeno.fm\/vuxatecahgbtv?zs=ATnd4FogScy2bf-z-jLgCQ\"\n                                                type=\"audio\/ogg\" \/>\n                                        <\/audio>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/section>\n\n\n\n<!-- Section de youtube y twitter -->\n    <section id=\"hero\">\n        <div class=\"container-fluid py-4\">\n            <div class=\"row h-100 d-flex\">\n                <div class=\"col-lg-8\">\n                    <div class=\"shadow-lg p-3 bg-body rounded\">\n                        <div class=\"widget-header\">\n                            <h5 class=\"widget-header px-2 color-title\">YOUTUBE<\/h5>\n                        <\/div>\n                        <div class=\"row gy-5\">\n                            <div class=\"col-12 col-lg-7 col-lg-7\">\n                                <!-- youtube  -->\n                                <div id=\"youtubeHome\" class=\"post\"><\/div>\n                            <\/div>\n                            <div id=\"youtubeList\" class=\"col-12 col-md-5 col-lg-5 flex-fill\"><\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n                <div class=\"col-12 col-lg-4 pt-4 pt-md-4 pt-lg-0\">\n                    <div class=\"shadow-lg p-3 bg-body rounded h-100\">\n                        <div class=\"widget-header px-2\">\n                            <h5 class=\"widget-title color-title\">TWITTER<\/h5>\n                        <\/div>\n                        <a class=\"twitter-timeline\" data-width=\"auto\" data-height=\"450\"\n                            href=\"https:\/\/twitter.com\/clubtomateros?ref_src=twsrc%5Etfw\">Tweets by clubtomateros<\/a>\n                        <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/section>\n\n\n\n<!--Section de iconos footer-->\n    <section id=\"hero\">\n        <div class=\"container-fluid\">\n            <div class=\"row align-items-center justify-content-center text-center\">\n                <div class=\"col-12 text-center\">\n                    <h4>S\u00cdGUENOS EN NUESTRAS REDES SOCIALES Y EN LA APP OFICIAL DE TOMATEROS<\/h4>\n                <\/div>\n                <div class=\"col-12 col-md-10 col-lg-10\">\n                    <div class=\"row align-items-center justify-content-center\">\n                        <div class=\"col-3 col-md-1 col-lg-1\"><a href=\"https:\/\/www.facebook.com\/clubtomateros\/?locale=es_LA\"><img decoding=\"async\"\n                                    src=\"\/wp-content\/uploads\/2023\/07\/Icono-Facebook.png\" alt=\"\" srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3 col-md-1 col-lg-1\"><a href=\"https:\/\/www.instagram.com\/clubtomaterosoficial\/\"><img decoding=\"async\"\n                                    src=\"\/wp-content\/uploads\/2023\/07\/Icono-Instagram.png\" alt=\"\" srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3 col-md-1 col-lg-1\"><a href=\"https:\/\/twitter.com\/clubtomateros\"><img decoding=\"async\"\n                                    src=\"\/wp-content\/uploads\/2023\/07\/Icono-Twitter.png\" alt=\"\" srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3 col-md-1 col-lg-1\"><a href=\"https:\/\/www.tiktok.com\/@clubtomaterosoficial\"><img decoding=\"async\"\n                                    src=\"\/wp-content\/uploads\/2023\/07\/Icono-Tiktok.png\" alt=\"\" srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3 col-md-1 col-lg-1\"><a href=\"https:\/\/www.youtube.com\/channel\/UC0UMNVXueJn5MREwU6Vvwcw\"><img decoding=\"async\"\n                                    src=\"\/wp-content\/uploads\/2023\/07\/Icono-Youtube.png\" alt=\"\" srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3 col-md-1 col-lg-1\"><a href=\"https:\/\/www.pinterest.com.mx\/TomaterosBeisShop\/\"><img decoding=\"async\"\n                                    src=\"\/wp-content\/uploads\/2023\/07\/Icono-Pinterest.png\" alt=\"\" srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3\"><a href=\"#\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2023\/07\/Icono-Google-Play.png\" alt=\"\"\n                                    srcset=\"\"><\/a><\/div>\n                        <div class=\"col-3\"><a href=\"#\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2023\/07\/Icono-Apple-Store.png\" alt=\"\"\n                                    srcset=\"\"><\/a><\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/section>\n\n\n\n<script type=\"text\/javascript\">\nconst appYoutube =\n  \"https:\/\/www.googleapis.com\/youtube\/v3\/playlistItems?part=snippet&key=AIzaSyAnYPAjx1GoW3E6TVh7vdPXW-1yxxAANYE&playlistId=PLP317Ax98SXlRcD5tw_yMxJcT3ZA4T0AQ&maxResults=10\";\n\nfetch(appYoutube)\n  .then((response) => response.json())\n  .then((data) => mostrarVideos(data.items))\n  .catch((error) => console.log(error));\n\nconst mostrarVideos = (data) => {\n  console.log(data[0]);\n\n  let youtubeHome = \"\";\n  let youtubeList = \"\";\n  for (let i = 0; i < data.length; i++) {\n    if (i == 0) {\n      youtubeHome += `\n            <div class=\"thumb rounded\">\n                                        <a href=\"https:\/\/www.youtube.com\/watch?v=${data[i].snippet.resourceId.videoId}\">\n                                            <div class=\"inner\">\n                                                <img decoding=\"async\" class=\"img-fluid\" src=\"${data[i].snippet.thumbnails.standard ? data[i].snippet.thumbnails.standard.url : data[i].snippet.thumbnails.default.url}\" alt=\"\">\n                                            <\/div>\n                                        <\/a>\n                                    <\/div>\n                                    \n                                    <h5 class=\"post-title mb-3 mt-3\">\n                                        <a href=\"https:\/\/www.youtube.com\/watch?v=${data[i].snippet.resourceId.videoId}\">${data[i].snippet.title}<\/a>\n                                    <\/h5>\n                                  \n                                    <a href=\"https:\/\/www.youtube.com\/@TomaterosdeCuliacanOficial\" type=\"button\" class=\"btn btn-secondary\">Suscribirme\n                <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-youtube\" viewBox=\"0 0 16 16\">\n   <path d=\"M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z\"><\/path>\n<\/svg>\n              <\/a>\n            \n            `;\n    } else {\n      let dateString = data[i].snippet.publishedAt;\n\n      let date = new Date(dateString);\n\n      let options = { day: \"numeric\", month: \"long\", year: \"numeric\" };\n\n      let formattedDate = date.toLocaleDateString(\"es-ES\", options);\n\n      youtubeList += `\n        <div class=\"post post-list-sm square\">\n                                    <div class=\"thumb rounded\">\n                                        <a href=\"https:\/\/www.youtube.com\/watch?v=${data[i].snippet.resourceId.videoId}\">\n                                            <div class=\"inner\">\n                                                <img decoding=\"async\" class=\"img-fluid\" src=\"${data[i].snippet.thumbnails.standard ? data[i].snippet.thumbnails.standard.url : data[i].snippet.thumbnails.default.url}\" alt=\"\">\n                                            <\/div>\n                                        <\/a>\n                                    <\/div>\n                                    <div class=\"details clearfix\">\n                                        <p class=\"post-title my-0\" style=\"\n    overflow: hidden;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n\">\n                                            <a href=\"https:\/\/www.youtube.com\/watch?v=${data[i].snippet.resourceId.videoId}\">\n                                            ${data[i].snippet.title}\n                                            <\/a>\n                                        <\/p>\n                                        <ul class=\"meta list-inline p-0 mt-1 mb-0\">\n                                            <li class=\"list-inline-item\">${formattedDate}<\/li>\n                                        <\/ul>\n                                    <\/div>\n                                <\/div>\n            `;\n    }\n  }\n  document.getElementById(\"youtubeHome\").innerHTML = youtubeHome;\n  document.getElementById(\"youtubeList\").innerHTML = youtubeList;\n};\n\n\n<\/script>\n\n\n\n<script type=\"text\/javascript\">\nconst marcas = `https:\/\/consola.tomateros.online\/api_marcas_tomateros\/`;\n\nfetch(marcas)\n  .then((response) => response.json())\n  .then((data) => marcasShow(data))\n  .catch((error) => console.log(error));\n\nconst marcasShow = (data) => {\n \n  let body = \"\";\n  for (let i = 0; i < data.length; i++) {\n    if (i == 0) {\n      body += `\n            <div class=\"carousel-item active  slider-img \" data-bs-interval=\"3000\">\n                <a href=\"${data[i].liga}\"><img decoding=\"async\" src=\"${data[i].foto}\" class=\"img-fluid d-block\" alt=\"${data[i].marca}\"><\/a>\n            <\/div>         \n            `;\n    } else {\n      body += `\n            <div class=\"carousel-item  slider-img \" data-bs-interval=\"3000\">\n                <a href=\"${data[i].liga}\"><img decoding=\"async\" src=\"${data[i].foto}\" class=\"img-fluid d-block\" alt=\"${data[i].marca}\"><\/a>\n            <\/div>         \n            `;\n    }\n  }\n  document.getElementById(\"marcas\").innerHTML = body;\n};\n\n<\/script>\n\n\n\n<script type=\"text\/javascript\">\nconst appNoticias = \"https:\/\/web.tomateros.online\/wp-json\/recent-posts\/v1\/list\";\n\nfetch(appNoticias)\n  .then((response) => response.json())\n  .then((data) => {\n    sliderNews(data);\n    sliderNoti(data);\n  })\n  .catch((error) => console.log(error));\n\nconst sliderNews = (data) => {\n  \n  let body = \"\";\n\n  for (let i = 0; i < data.length; i++) {\n\n    \/\/Primer imagen de slider\n    if(i == 0){\n      body += `\n      <div id=\"${\"image\"+(i+1)}\" class=\"carousel-item new active\" data-bs-interval=\"9000\">\n      <a href=\"${data[i].permalink}\"><img decoding=\"async\" class=\"d-block w-100 h-100 img-fluid rounded notiSliderImg\" src=\"${data[i].image}\" alt=\"${data[i].title}\"><\/a>\n        <div class=\"carousel-caption rounded\">\n          <a href=\"${data[i].permalink}\"><h2>${data[i].title}<\/h2><\/a>\n        <\/div>\n      <\/div>\n            `;\n      \/\/Botones de slider\n      body += `\n      <button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#carouselExampleControls\" data-bs-slide=\"prev\">\n        <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"><\/span>\n        <span class=\"visually-hidden\">Previous<\/span>\n      <\/button>\n      <button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#carouselExampleControls\" data-bs-slide=\"next\">\n        <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"><\/span>\n        <span class=\"visually-hidden\">Next<\/span>\n      <\/button>`;\n      \n    }else{\n      body += `\n      <div id=\"${\"image\"+(i+1)}\" class=\"carousel-item new\" data-bs-interval=\"9000\">\n      <a href=\"${data[i].permalink}\"><img decoding=\"async\" class=\"d-block w-100 h-100 img-fluid rounded notiSliderImg\" src=\"${data[i].image}\" alt=\"${data[i].title}\"><\/a>\n        <div class=\"carousel-caption rounded\">\n          <a href=\"${data[i].permalink}\"><h2>${data[i].title}<\/h2><\/a>\n        <\/div>\n      <\/div>\n            `;\n\n    }  \n  }\n  document.getElementById(\"sliderNews\").innerHTML = body;\n\n};\n\n\nconst sliderNoti = (data) => {\n  \n  \/\/console.log(data);\n\n    for (let i = 0; i < data.length; i++  ){\n      let image = '';\n      let body= '';\n\n      \/\/console.log(data[i]);\n            \/\/Imagen de la noticia\n            image += \n            `\n              <div class=\"inner\">\n                <img decoding=\"async\" class=\"img-fluid rounded notiImgBtn\" src=\"${data[i].image}\" alt=\"${data[i].title}\">\n              <\/div>                        \n            `;\n\n            body += \n            `\n            <p class=\"post-title limit-p my-0\">\n              <a href=\"${data[i].permalink}\">\n              ${data[i].title}\n              <\/a>\n            <\/p>                    \n            `;\n            document.getElementById(`slider${i+1}`).innerHTML = image;\n            document.getElementById(`newInfo${i+1}`).innerHTML = body;\n    }    \n}\n\n\n\/\/Logica para poder activar las imagenes del slider\n\nconst boton1 = document.getElementById(\"slider1\");\nconst boton2 = document.getElementById(\"slider2\");\nconst boton3 = document.getElementById(\"slider3\");\nconst boton4 = document.getElementById(\"slider4\");\nconst boton5 = document.getElementById(\"slider5\");\n\nboton1.addEventListener(\"click\", () => {\n  let elemento = document.getElementById(\"image1\");\n\n  \/\/ Verificar si el elemento ya tiene la clase \"active\"\n\n  if (!elemento.classList.contains(\"active\")) {\n    \/\/ Eliminar la clase \"active\" de todos los elementos con la clase \"carousel-item\"\n    const elementosCarousel =\n      document.getElementsByClassName(\"carousel-item new\");\n    for (let i = 0; i < elementosCarousel.length; i++) {\n      elementosCarousel[i].classList.remove(\"active\");\n    }\n    \/\/ Agregar la clase \"active\" al elemento seleccionado\n    elemento.classList.add(\"active\");\n    \/\/console.log(\"No tiene active\");\n  } else {\n    \/\/console.log(\"Tiene active\");\n  }\n});\n\nboton2.addEventListener(\"click\", () => {\n  let elemento = document.getElementById(\"image2\");\n\n  \/\/ Verificar si el elemento ya tiene la clase \"active\"\n\n  if (!elemento.classList.contains(\"active\")) {\n    \/\/ Eliminar la clase \"active\" de todos los elementos con la clase \"carousel-item\"\n    const elementosCarousel =\n      document.getElementsByClassName(\"carousel-item new\");\n    for (let i = 0; i < elementosCarousel.length; i++) {\n      elementosCarousel[i].classList.remove(\"active\");\n    }\n    \/\/ Agregar la clase \"active\" al elemento seleccionado\n    elemento.classList.add(\"active\");\n    \/\/console.log(\"No tiene active\");\n  } else {\n    \/\/console.log(\"Tiene active\");\n  }\n});\n\nboton3.addEventListener(\"click\", () => {\n  let elemento = document.getElementById(\"image3\");\n\n  \/\/ Verificar si el elemento ya tiene la clase \"active\"\n\n  if (!elemento.classList.contains(\"active\")) {\n    \/\/ Eliminar la clase \"active\" de todos los elementos con la clase \"carousel-item\"\n    const elementosCarousel =\n      document.getElementsByClassName(\"carousel-item new\");\n    for (let i = 0; i < elementosCarousel.length; i++) {\n      elementosCarousel[i].classList.remove(\"active\");\n    }\n    \/\/ Agregar la clase \"active\" al elemento seleccionado\n    elemento.classList.add(\"active\");\n    \/\/console.log(\"No tiene active\");\n  } else {\n    \/\/console.log(\"Tiene active\");\n  }\n});\n\nboton4.addEventListener(\"click\", () => {\n  let elemento = document.getElementById(\"image4\");\n\n  \/\/ Verificar si el elemento ya tiene la clase \"active\"\n\n  if (!elemento.classList.contains(\"active\")) {\n    \/\/ Eliminar la clase \"active\" de todos los elementos con la clase \"carousel-item\"\n    const elementosCarousel =\n      document.getElementsByClassName(\"carousel-item new\");\n    for (let i = 0; i < elementosCarousel.length; i++) {\n      elementosCarousel[i].classList.remove(\"active\");\n    }\n    \/\/ Agregar la clase \"active\" al elemento seleccionado\n    elemento.classList.add(\"active\");\n    \/\/console.log(\"No tiene active\");\n  } else {\n    \/\/console.log(\"Tiene active\");\n  }\n});\n\nboton5.addEventListener(\"click\", () => {\n  let elemento = document.getElementById(\"image5\");\n\n  \/\/ Verificar si el elemento ya tiene la clase \"active\"\n\n  if (!elemento.classList.contains(\"active\")) {\n    \/\/ Eliminar la clase \"active\" de todos los elementos con la clase \"carousel-item\"\n    const elementosCarousel =\n      document.getElementsByClassName(\"carousel-item new\");\n    for (let i = 0; i < elementosCarousel.length; i++) {\n      elementosCarousel[i].classList.remove(\"active\");\n    }\n    \/\/ Agregar la clase \"active\" al elemento seleccionado\n    elemento.classList.add(\"active\");\n    \/\/console.log(\"No tiene active\");\n  } else {\n    \/\/console.log(\"Tiene active\");\n  }\n});\n\n\n<\/script>\n\n\n\n<script type=\"text\/javascript\">\nconst diretivos = 'https:\/\/consola.tomateros.online\/api_tomateros_guinda\/api_tomateros_guinda.php?id=1';\n\nfetch(diretivos)\n  .then(response => response.json())\n  .then(data => {\n    mostrarGuinda(data);\n  }\n    )\n  .catch(error => console.log(error));\n\n\n  const mostrarGuinda = (info) => {\n    \/\/console.log(info.response);\n    let styleImg = [\n        265,\n        225,\n        200,\n        165,\n        140\n    ];\n\n    let contadorImg  = 0;\n    let data = info.response;\n    \n    let body = '';\n    \n    for (let i = 2; i < data.length; i++ ){\n        switch (i) {\n            case 2:\n                contadorImg += data[i].texto1 == \"\" ? 0 : 1;\n                break;\n            case 3:\n                contadorImg += data[i].texto2 == \"\" ? 0 : 1;   \n                break;\n            case 4:\n                contadorImg += data[i].texto3 == \"\" ? 0 : 1;                     \n                break;\n            case 5:\n                contadorImg += data[i].texto4 == \"\" ? 0 : 1;    \n                break;\n            case 6:\n                contadorImg += data[i].texto5 == \"\" ? 0 : 1;  \n                break;\n            default:\n                console.log('Error');\n            }\n    }\n    let estilo = styleImg[(contadorImg - 1)];\n    for (let i = 0; i < data.length; i++ ){\n\n        switch (i) {\n        case 0:\n            body += \n            `\n            <div class=\"widget-header\">\n                <h5 class=\"widget-header color-title mb-0\">${data[i].titulo !== \"\" ? data[i].titulo : \"Guinda de Verano\"}<\/h5>\n            <\/div>\n            `;\n            break;\n        case 1:\n                body += \n            `\n            <div class=\"card-body d-flex align-items-center justify-content-center p-0\">\n                <img decoding=\"async\" class=\"img-fluid\" src=\"${data[i].imagen}\" style=\"width: ${estilo}px;\" alt=\"logo-guinda\">\n            <\/div>\n            `;\n            break;\n        case 2:\n            if(data[i].texto1 !== \"\"){\n                body +=  ` \n                <div class=\"widget-header\">\n                    <h6 id=\"my-heading\" class=\"widget-header\">${data[i].texto1}<\/h6>\n                <\/div> \n                `;\n\n            }\n            break;\n        case 3:\n            if(data[i].texto2 !==\"\"){\n                body +=  ` \n                <div class=\"widget-header\">\n                    <h6 id=\"my-heading\"  class=\"widget-header\">${data[i].texto2}<\/h6>\n                <\/div> \n                `;\n            }\n            break;\n        case 4:\n            if(data[i].texto3 !== \"\"){\n                body +=  ` \n                <div class=\"widget-header\">\n                    <h6 id=\"my-heading\" class=\"widget-header\">${data[i].texto3}<\/h6>\n                <\/div> \n                `;\n            }\n            break;\n        case 5:\n            if(data[i].texto4){\n                body +=  ` \n                <div class=\"widget-header\">\n                    <h6 id=\"my-heading\" class=\"widget-header\">${data[i].texto4}<\/h6>\n                <\/div> \n                `;\n\n            }\n            break;\n        case 6:\n            if(data[i].texto5 !== \"\"){\n                body +=  ` \n                <div class=\"widget-header\">\n                    <h6 id=\"my-heading\"  class=\"widget-header\">${data[i].texto5}<\/h6>\n                <\/div> \n                `;\n\n            }\n            break;\n        default:\n            console.log('Error');\n        }\n    }\n    document.getElementById('guinda').innerHTML = body;\n  }\n\n<\/script>\n\n\n\n<script type=\"text\/javascript\">\nconst banneerPromo =\n  \"https:\/\/consola.tomateros.online\/api_banner_web\/api_banner_web.php\";\n\nfetch(banneerPromo)\n  .then((response) => response.json())\n  .then((data) => {\n    bannerPromo(data);\n  })\n  .catch((error) => console.log(error));\n\nconst bannerPromo = (data) => {\n    \/\/console.log(data)\n  let body = \"\";\n\n  body += `\n            <a  href=\"https:\/\/beisshoptomateros.com.mx\/\"><img decoding=\"async\" src=\"${data[0].banner.foto}\" class=\"img-fluid rounded\" alt=\"Banner-Beisshop\"><\/a>\n            \n            `;\n\n  document.getElementById(\"bannerPromo\").innerHTML = body;\n};\n\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>NOTICIAS PATROCINADORES Previous Next YOUTUBE TWITTER Tweets by clubtomateros S\u00cdGUENOS EN NUESTRAS REDES SOCIALES Y EN LA APP OFICIAL DE TOMATEROS<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-55","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":17,"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages\/55\/revisions"}],"predecessor-version":[{"id":16627,"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages\/55\/revisions\/16627"}],"wp:attachment":[{"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/media?parent=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}