{"id":6288,"date":"2024-06-21T19:31:34","date_gmt":"2024-06-21T19:31:34","guid":{"rendered":"https:\/\/play.exploragame.com.ar\/?page_id=6288"},"modified":"2024-06-21T19:32:04","modified_gmt":"2024-06-21T19:32:04","slug":"base-para-posta","status":"publish","type":"page","link":"https:\/\/play.exploragame.com.ar\/index.php\/base-para-posta\/","title":{"rendered":"Base para posta"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"6288\" class=\"elementor elementor-6288\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-df743d9 e-flex e-con-boxed e-con e-parent\" data-id=\"df743d9\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0822b29 elementor-widget elementor-widget-html\" data-id=\"0822b29\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Posta: Cancha de Boca<\/title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            text-align: center;\n            position: relative;\n            height: 100vh;\n            margin: 0;\n            display: flex;\n            flex-direction: column;\n            justify-content: center;\n        }\n        .container {\n            width: 90%;\n            max-width: 400px;\n            margin: 0 auto;\n            position: relative; \/* A\u00f1adido para posicionar correctamente los mensajes *\/\n        }\n        input[type=\"text\"], button {\n            width: 100%;\n            border-radius: 10px;\n            padding: 10px 20px;\n            margin: 10px 0;\n            box-sizing: border-box;\n        }\n        input[type=\"text\"] {\n            border: 1px solid #ccc;\n        }\n        button {\n            background-color: #FF5100;\n            color: white;\n            border: none;\n            cursor: pointer;\n            margin-top: 10px; \/* Espacio entre el bot\u00f3n y los mensajes *\/\n        }\n        .mensaje {\n            color: red;\n            visibility: hidden;\n            position: absolute;\n            top: calc(100% + 10px); \/* Posicionar debajo del bot\u00f3n *\/\n            left: 50%;\n            transform: translateX(-50%);\n            margin: 0;\n        }\n        .mensaje-pista {\n            font-size: 16px;\n        }\n        .animacion-correcta, .animacion-incorrecta {\n            position: fixed;\n            top: 50%;\n            left: 50%;\n            transform: translate(-50%, -50%);\n            visibility: hidden;\n        }\n    <\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n    <input type=\"text\" id=\"respuesta\" placeholder=\"Escriba aqu\u00ed su respuesta\">\n    <button onclick=\"verificarRespuesta()\">Responder<\/button>\n\n    <p id=\"mensajePista\" class=\"mensaje mensaje-pista\">Miren debajo del \u00e1rbol.<\/p>\n    <p id=\"mensajeAyuda\" class=\"mensaje\">\u00bfNecesitan ayuda?<\/p>\n<\/div>\n\n<img decoding=\"async\" id=\"animacionCorrecta\" class=\"animacion-correcta\" src=\"https:\/\/prueba.exploragame.com.ar\/wp-content\/uploads\/2024\/06\/Titulo-4.gif\" alt=\"Respuesta correcta\">\n<img decoding=\"async\" id=\"animacionIncorrecta\" class=\"animacion-incorrecta\" src=\"https:\/\/prueba.exploragame.com.ar\/wp-content\/uploads\/2024\/06\/Titulo.gif\" alt=\"Respuesta incorrecta\">\n\n<audio id=\"correctoAudio\" src=\"https:\/\/prueba.exploragame.com.ar\/wp-content\/uploads\/2024\/06\/Correct-Answer-Sound-Effect-DeeChannel-mp3cut.net_.mp3\"><\/audio>\n<audio id=\"incorrectoAudio\" src=\"https:\/\/prueba.exploragame.com.ar\/wp-content\/uploads\/2024\/06\/INCORRECT-mp3cut.net_.mp3\"><\/audio>\n\n<script>\nvar respuestasCorrectas = [\"azul\", \"celeste\"]; \/\/ Puedes agregar varias respuestas correctas cambiando los valores aqu\u00ed\nvar intentos = 0;\n\nfunction verificarRespuesta() {\n    var respuestaUsuario = normalizarRespuesta(document.getElementById(\"respuesta\").value.trim());\n    \n    \n    \n    \/\/ ID de la posta NO OLVIDAR CAMBIAR\n    \n    var postaId = \"vicentewalter\"; \n    \n    \n\n    if (respuestasCorrectas.includes(respuestaUsuario)) {\n        reproducirSonido(\"correctoAudio\");\n        mostrarAnimacionCorrecta();\n\n        \/\/ Informar al mapa que la posta est\u00e1 completada\n        informarMapa(postaId);\n\n       \n       \n       \n        \/\/ Redirigir a la URL especificada despu\u00e9s de 2 segundos\n        setTimeout(function() {\n            window.location.href = \"https:\/\/prueba.exploragame.com.ar\/index.php\/mapa-prueba-animacion\/\";\n        }, 2000); \/\/ Redirigir despu\u00e9s de 2 segundos\n        \n        \n        \n    } else {\n        reproducirSonido(\"incorrectoAudio\");\n        mostrarAnimacionIncorrecta();\n        intentos++;\n\n        if (intentos === 1) {\n            mostrarPista();\n        } else if (intentos === 2) {\n            mostrarMensajeAyuda();\n            ocultarPista();\n        }\n    }\n\n    \/\/ Limpiar el campo de respuesta\n    document.getElementById(\"respuesta\").value = \"\";\n}\n\nfunction reproducirSonido(idAudio) {\n    var audio = document.getElementById(idAudio);\n    audio.play();\n}\n\nfunction mostrarAnimacionCorrecta() {\n    var animacion = document.getElementById(\"animacionCorrecta\");\n    animacion.style.visibility = \"visible\";\n    setTimeout(function() {\n        animacion.style.visibility = \"hidden\";\n    }, 3000); \/\/ Mostrar la animaci\u00f3n durante 3 segundos\n}\n\nfunction mostrarAnimacionIncorrecta() {\n    var animacion = document.getElementById(\"animacionIncorrecta\");\n    animacion.style.visibility = \"visible\";\n    setTimeout(function() {\n        animacion.style.visibility = \"hidden\";\n    }, 2000); \/\/ Mostrar la animaci\u00f3n durante 2 segundos\n}\n\nfunction mostrarPista() {\n    var pista = document.getElementById(\"mensajePista\");\n    pista.style.visibility = \"visible\";\n}\n\nfunction ocultarPista() {\n    var pista = document.getElementById(\"mensajePista\");\n    pista.style.visibility = \"hidden\";\n}\n\nfunction mostrarMensajeAyuda() {\n    var mensaje = document.getElementById(\"mensajeAyuda\");\n    mensaje.style.visibility = \"visible\";\n}\n\nfunction normalizarRespuesta(respuesta) {\n    return respuesta.toLowerCase()\n                    .normalize(\"NFD\").replace(\/[\\u0300-\\u036f]\/g, \"\"); \/\/ Normaliza y elimina acentos\n}\n\nfunction informarMapa(postaId) {\n    var parentWindow = window.opener;\n\n    if (parentWindow) {\n        parentWindow.postMessage({ postaId: postaId }, '*');\n    } else {\n        console.error('No se puede encontrar la ventana principal (mapa).');\n    }\n}\n<\/script>\n\n<\/body>\n<\/html>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Posta: Cancha de Boca Responder Miren debajo del \u00e1rbol. \u00bfNecesitan ayuda?<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"wf_page_folders":[12],"class_list":["post-6288","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/pages\/6288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/comments?post=6288"}],"version-history":[{"count":3,"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/pages\/6288\/revisions"}],"predecessor-version":[{"id":6291,"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/pages\/6288\/revisions\/6291"}],"wp:attachment":[{"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/media?parent=6288"}],"wp:term":[{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/play.exploragame.com.ar\/index.php\/wp-json\/wp\/v2\/wf_page_folders?post=6288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}