{"id":47,"date":"2023-05-18T18:37:11","date_gmt":"2023-05-18T18:37:11","guid":{"rendered":"http:\/\/localhost\/tomateros\/?page_id=47"},"modified":"2023-08-18T15:26:15","modified_gmt":"2023-08-18T21:26:15","slug":"directorio","status":"publish","type":"page","link":"https:\/\/web.tomateros.online\/index.php\/directorio\/","title":{"rendered":"Directorio"},"content":{"rendered":"\n<style>\n.card-hover{\n    transition-duration: 0.4s;\n    background-color: white;\n}\n\n\n.card-hover:hover{\n    background-color: #612246;\n    color: white;\n    box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);\n}\n\n.card-hover:hover h5{\n    color: white;\n    \n}\n@media (max-width: 780px) {\n    .cardDirectivo{\n        height: 270px ;\n    }\n}\n\n<\/style>\n\n\n\n<!-- section starts  -->\n         <section>\n            <div class=\"jumbotron jumbotronPage text-center\">\n                <h1 class=\"mt-0\">Directorio<\/h1>\n            <\/div>\n            <div class=\"container-fluid\">\n                <div class=\"row\">\n                    <!-- Director\n                    <div  class=\"col-12 px-5 pb-5 d-flex justify-content-center align-content-center\">\n                        <div id=\"director\" class=\"row\">\n                        <\/div>\n                    <\/div> -->\n                    <!--Secundarios-->\n                    <div class=\"col-12\">\n                        <div id=\"secundarios\" class=\"row\">\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/section>\n\n\n\n<script>\nconst diretivos = 'https:\/\/consola.tomateros.online\/api_directorio_tomateros\/';\n\nfetch(diretivos)\n  .then(response => response.json())\n  .then(data => {\n    \/\/mostrarDirectivo(data);\n    mostrarSecundarios(data);\n  }\n    )\n  .catch(error => console.log(error));\n\n  \/*const mostrarDirectivo = (data) => {\n    \n    let body = '';\n    for (let i = 0; i <= 0; i++ ){\n            body += \n            `\n            <div class=\"p-1\">\n                <!-- Card-->\n                    <div class=\"card card-hover shadow-lg p-3 rounded\">\n                        <div class=\"row g-0\">\n                            <div class=\"col-12\">\n                                <div class=\"text-center d-flex justify-content-center align-items-center\">\n                                    <div class=\"card-body\">\n                                        <div class=\"row\">\n                                            <div class=\"col-12 py-1\"> \n                                                <h5 class=\"mb-0\">${data[i].puesto}<\/h5>\n                                            <\/div>\n                                            <div class=\"col-12 py-1\">\n                                                <span class=\"small text-uppercase text-muted\">${data[i].nombre}<\/span>\n                                            <\/div>\n                                            <div class=\"col-6 py-1\">\n                                                <a class=\"btn text-white shadow-lg\" style=\"background-color: #6c757d; box-shadow: 0 0 0 4px #fff;\" href=\"#!\" role=\"button\">\n                                                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-envelope-fill\" viewBox=\"0 0 16 16\">\n                                                        <path d=\"M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z\"\/>\n                                                    <\/svg>\n                                                <\/a>\n                                            <\/div>\n                                            <div class=\"col-6 py-1\">\n                                                <a class=\"btn text-white shadow-lg\" style=\"background-color: #6c757d; box-shadow: 0 0 0 4px #fff;\" href=\"#!\" role=\"button\">\n                                                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-telephone-fill\" viewBox=\"0 0 16 16\">\n                                                        <path fill-rule=\"evenodd\" d=\"M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z\"\/>\n                                                    <\/svg>\n                                                <\/a>\n                                            <\/div>\n                                            <div class=\"col-12 py-1\">\n                                                <p>Club Tomateros de Culiac\u00e1n<\/p>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <!-- Card-->\n            <\/div>\n            `;\n        \n    }\n    document.getElementById('director').innerHTML = body;\n  }*\/\n\n\n  const mostrarSecundarios = (data) => {\n    \/\/console.log(data);\n    let body = '';\n    for (let i = 0; i < data.length; i++ ){\n\n        \/\/console.log(data[i].correo);\n        \n            body += \n            `\n            <div  class=\"col-6 col-lg-4 p-1\">\n                <!-- Card-->\n                    <div class=\"card card-hover shadow-lg p-3 rounded\">\n                        <div class=\"row g-0\">\n                            <div class=\"col-12\">\n                                    <div class=\"text-center d-flex justify-content-center align-items-center cardDirectivo\">\n                                        <div class=\"card-body\">\n                                            <div class=\"row\">\n                                                <div class=\"col-12 py-1\"> \n                                                    <h5 class=\"mb-0\">${data[i].puesto}<\/h5>\n                                                <\/div>\n                                                <div class=\"col-12 py-1\">\n                                                    <span class=\"small text-uppercase text-muted\">${data[i].nombre}<\/span>\n                                                <\/div>\n                                                <div class=\"col-12 py-1\">\n                                                    <a class=\"btn text-white shadow-lg\" style=\"background-color: #6c757d; box-shadow: 0 0 0 4px #fff;\" href=\"${data[i].correo ? `#!`: \"#!\"}\" role=\"button\">\n                                                        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-envelope-fill\" viewBox=\"0 0 16 16\">\n                                                            <path d=\"M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z\"\/>\n                                                        <\/svg>\n                                                    <\/a>\n                                                    ${data[i].correo}\n                                                <\/div>\n                                                <\/span>\n                                                <div class=\"col-12 py-1\">\n                                                    <a class=\"btn text-white shadow-lg\" style=\"background-color: #6c757d; box-shadow: 0 0 0 4px #fff;\" href=\"${data[i].telefono ? `#!`: \"#!\"}\" role=\"button\">\n                                                        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-telephone-fill\" viewBox=\"0 0 16 16\">\n                                                            <path fill-rule=\"evenodd\" d=\"M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z\"\/>\n                                                        <\/svg>\n                                                    <\/a>\n                                                    ${data[i].telefono}\n                                                <\/div>\n                                                <div class=\"col-12 pt-2\">\n                                                    <p>Club Tomateros de Culiac\u00e1n<\/p>\n                                                <\/div>\n                                            <\/div>\n                                        <\/div>\n                                    <\/div>\n                                <\/div>\n                        <\/div>\n                    <\/div>\n                <!-- Card-->\n            <\/div>\n            `;\n\n    }\n\n    document.getElementById('secundarios').innerHTML = body;\n  }<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Directorio<\/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-47","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages\/47","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=47"}],"version-history":[{"count":3,"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages\/47\/revisions"}],"predecessor-version":[{"id":16584,"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/pages\/47\/revisions\/16584"}],"wp:attachment":[{"href":"https:\/\/web.tomateros.online\/index.php\/wp-json\/wp\/v2\/media?parent=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}