{"id":2695,"date":"2016-09-04T09:33:12","date_gmt":"2016-09-04T12:33:12","guid":{"rendered":"http:\/\/www.lugarvazio.com.br\/blog\/?page_id=2695"},"modified":"2022-06-06T22:46:49","modified_gmt":"2022-06-07T01:46:49","slug":"frasedodia","status":"publish","type":"page","link":"https:\/\/www.lugarvazio.com.br\/blog\/frasedodia\/","title":{"rendered":"Descubra Sua Frase do Dia"},"content":{"rendered":"<div id=\"pl-2695\"  class=\"panel-layout\" ><div id=\"pg-2695-0\"  class=\"panel-grid panel-no-style\" ><div id=\"pgc-2695-0-0\"  class=\"panel-grid-cell\" ><div id=\"panel-2695-0-0-0\" class=\"so-panel widget_sow-editor panel-first-child\" data-index=\"0\" ><div\n\t\t\t\n\t\t\tclass=\"so-widget-sow-editor so-widget-sow-editor-base\"\n\t\t\t\n\t\t>\n<div class=\"siteorigin-widget-tinymce textwidget\">\n\t<p>Conhe\u00e7a\u00a0a sua frase motivacional\u00a0para\u00a0hoje. A cada dia uma nova frase para voc\u00ea.<\/p>\n<\/div>\n<\/div><\/div><div id=\"panel-2695-0-0-1\" class=\"widget_text so-panel widget_custom_html panel-last-child\" data-index=\"1\" ><div class=\"textwidget custom-html-widget\"><script src=\"https:\/\/code.jquery.com\/jquery-1.12.4.min.js\"><\/script>\n<script src=\"https:\/\/www.lugarvazio.com.br\/blog\/js\/html2canvas.js\"><\/script>\n<script>\n\/\/ Load the SDK asynchronously\n(function(d, s, id) {\n  var js, fjs = d.getElementsByTagName(s)[0];\n  if (d.getElementById(id)) return;\n  js = d.createElement(s); js.id = id;\n  js.src = \"https:\/\/connect.facebook.net\/en_US\/sdk.js\";\n  fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));\n<\/script>\n<div id=\"status\"><br><\/div>\n<br>\n<div id=\"loginFB\">\n<div class=\"fb-login-button\" data-max-rows=\"1\" data-size=\"large\" data-show-faces=\"false\" data-auto-logout-link=\"true\" data-scope=\"public_profile,email\" onlogin=\"checkLoginState();\"><\/div>\n<\/div>\n<br>\n<div id=\"collage\" style=\"width: 640px;height: 320px;display: none\">\n    <div id=\"pic_head\" style=\"width: 640px;height: 80px;background-color: #eeee22;float: left;text-align: center;\">Frase do Dia<\/div>\n    <div id=\"pic_fb\" style=\"width: 160px;height: 160px;float: left;\"><\/div>\n    <div id=\"pic_l\" style=\"width: 470px;max-height: 160px;float: right;background-color: #e8b745;padding: 35px 5px;max-width: 480px;height: 90px;\">\n      <p id=\"pic_lat\" style=\"text-align: center;height: 56px;\">Try not. Do or do not. There is not try<\/p><\/div>\n    <div id=\"pic_foot\" style=\"width: 640px;height: 50px;padding-top: 30px;max-height: 80px;float: left;text-align:center;\">x<\/div>\n<\/div>\n<br>\n<div id=\"shareFB\" style=\"padding-left: 300px;display: none\">\n<img src=https:\/\/www.lugarvazio.com.br\/blog\/img\/compartilhar.png style=\"height: 28px\">\n<\/div>\n<br>\n<script>\nvar idFB = undefined;\nvar agora = new Date();\nvar file = undefined;\nvar controle = false;\nvar collageDIV = '<div id=\"pic_head\" style=\"width: 640px;height: 80px;background-color: #eeee22;float: left;text-align: center;\">Frase do Dia<\/div><div id=\"pic_fb\" style=\"width: 160px;height: 160px;float: left;\"><\/div><div id=\"pic_l\" style=\"width: 470px;max-height: 160px;float: right;background-color: #e8b745;padding: 35px 5px;max-width: 480px;height: 90px;\"><p id=\"pic_lat\" style=\"text-align: center;height: 56px;\">Try not. Do or do not. There is not try<\/p><\/div><div id=\"pic_foot\" style=\"width: 640px;height: 50px;padding-top: 30px;max-height: 80px;float: left;text-align:center;\">x<\/div>';\n\/\/ This is called with the results from from FB.getLoginStatus().\nfunction statusChangeCallback(response) {\n    console.log('statusChangeCallback');\n    console.log(response);\n    \/\/ The response object is returned with a status field \n    if (response.status === 'connected') {\n      \/\/ Logged into your app and Facebook.\n      document.getElementById('status').innerHTML = '';\n      document.getElementById(\"loginFB\").style.display = \"none\";\n      testAPI();\n      frase();\n    } else if (response.status === 'not_authorized') {\n      \/\/ The person is logged into Facebook, but not your app.\n      document.getElementById('status').innerHTML = '<h4>Fazer LogIn abaixo no Facebook ' +\n        'para ver sua frase do dia.<\/h4>';\n      document.getElementById(\"loginFB\").style.display = \"block\";\n      document.getElementById(\"collage\").style.display = \"none\";\n      document.getElementById(\"collage\").innerHTML = collageDIV;\n      document.getElementById(\"shareFB\").innerHTML = \"\";\n    } else {\n      \/\/ The person is not logged into Facebook, so we're not sure if\n      \/\/ they are logged into this app or not.\n      document.getElementById('status').innerHTML = '<h4>Fazer login abaixo no Facebook ' +\n      'para ver sua frase do dia.<\/h4>';\n      document.getElementById(\"loginFB\").style.display = \"block\";\n      document.getElementById(\"collage\").style.display = \"none\";\n      document.getElementById(\"collage\").innerHTML = collageDIV;\n      document.getElementById(\"shareFB\").innerHTML = \"\";\n    }\n}\nfunction checkLoginState() {\n    FB.getLoginStatus(function(response) {\n      statusChangeCallback(response);\n    });\n}\nwindow.fbAsyncInit = function() {\n  FB.init({\n    appId      : '1771303643137455',\n    cookie     : true,  \/\/ enable cookies to allow the server to access \n                        \/\/ the session\n    xfbml      : true,  \/\/ parse social plugins on this page\n    version    : 'v14.0' \/\/ use graph api version 2.5\n  });\n  FB.getLoginStatus(function(response) {\n    statusChangeCallback(response);\n  });\n};\n\nfunction testAPI() {\n    console.log('Welcome!  Fetching your information.... ');\n    FB.api('\/me?fields=id,first_name,email,gender,link,devices', function(response) {\n      if (!response || response.error) {\n    \t  console.log('Error occured');\n      } else {\n      console.log('Successful login for: ' + response.first_name);\n      console.log(response);\n      idFB = response.id;\n      if (response.gender == \"male\") {\n    \t  document.getElementById(\"pic_head\").innerHTML = '<img src= https:\/\/www.lugarvazio.com.br\/blog\/img\/header_m.png>';\n    \t  document.getElementById(\"pic_l\").style.backgroundImage = \"url('https:\/\/www.lugarvazio.com.br\/blog\/img\/lateral_m.png')\";\n    \t  document.getElementById(\"pic_foot\").style.backgroundImage = \"url('https:\/\/www.lugarvazio.com.br\/blog\/img\/foot_m.png')\";\n      }else {\n          document.getElementById(\"pic_head\").innerHTML = '<img src= https:\/\/www.lugarvazio.com.br\/blog\/img\/header_f.png>';\n          document.getElementById(\"pic_l\").style.backgroundImage = \"url('https:\/\/www.lugarvazio.com.br\/blog\/img\/lateral_f.png')\";\n          document.getElementById(\"pic_foot\").style.backgroundImage = \"url('https:\/\/www.lugarvazio.com.br\/blog\/img\/foot_f.png')\";\n      }\n      if (response.devices != undefined) {aparelho = \"<br>Usa \"+ response.devices[0].hardware}else {aparelho = \"\"};\n      \/\/document.getElementById('pic_lat').innerHTML ='Try not. Do or do not. There is not try';\n      document.getElementById('pic_foot').innerHTML = response.first_name;\n      FB.api('\/me\/picture?type=square&width=160&height=160', function (response) {\n          if (!response || response.error) {\n        \t  console.log('Error occured');\n          } else {\n              console.log('picture: ');\n              console.log(response);\n              document.getElementById(\"pic_fb\").innerHTML = '<img src=' + response.data.url + '>';\n\t\t\t\t\t}\n          if (controle) {\n        \t   capture();\n        \t} else {\n        \t   controle = true;\n        \t}\n        });\n      }\n    });\n} \nfunction capture() {\n\/\/capture button is clicked\n\/\/he will take the screen shot of the div and save it as image.\nfile = idFB + agora.getMonth() + agora.getDate();\nurl = 'https:\/\/www.lugarvazio.com.br\/blog\/cont\/' + file + '.jpg';\nif (urlExists(url)) {\n\treplimg();\n\tdocument.getElementById(\"collage\").style.display = \"block\";\n} else {\ndocument.getElementById(\"collage\").style.display = \"block\";\ndiv_content = document.querySelector(\"#collage\")\nhtml2canvas(div_content, {\n   onrendered: function (canvas) {\n   \/\/change the canvas to jpeg image\n   data = canvas.toDataURL('image\/jpeg');\n   \/\/then call a super hero php to save the image\n   save_img(data);\n   }, useCORS: true\n});\t\n}\n}\nfunction save_img(data) {\n   \/\/ajax method.\n   $.post('https:\/\/www.lugarvazio.com.br\/blog\/save_jpg_lv.php', {data: data, file: file}, function(res){\n      if(res != ''){\n    \t  replimg();\n      }else{alert('something wrong');}\n   });\n}\nfunction replimg() {\n\tfileurl = 'https:\/\/www.lugarvazio.com.br\/blog\/frasedodia.php?file=' + file;\n    document.getElementById(\"collage\").innerHTML = '<img src=https:\/\/www.lugarvazio.com.br\/blog\/cont\/' + file + '.jpg>';\n    fileenc = encodeURIComponent(fileurl);\n    \/\/-document.getElementById(\"shareFB\").innerHTML = '<iframe loading=\"lazy\" src=\"https:\/\/www.facebook.com\/plugins\/share_button.php?href=https%3A%2F%2Fwww.lugarvazio.com.br%2Fblog%2Ffrasedodia.php%3Ffile%3D' + file + '&layout=button&size=large&mobile_iframe=true&appId=1771303643137455&width=113&height=28\" width=\"113\" height=\"28\" style=\"border:none;overflow:hidden\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\"><\/iframe>';\n    \/\/sharediv = '<div class=\"fb-share-button\" data-href=\"' + fileurl + '\" data-layout=\"button\" data-size=\"large\" data-mobile-iframe=\"true\"><a class=\"fb-xfbml-parse-ignore\" target=\"_blank\" href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwww.lugarvazio.com.br%2Fblog%2Ffrasedodia.php%3Ffile%3D' + file + '&amp;src=sdkpreparse\"><img src=https:\/\/www.lugarvazio.com.br\/blog\/img\/compartilhar.png style=\"height: 28px\"><\/a><\/div>';\n    \/\/-sharespan = '<span style=\"vertical-align: bottom; width: 73px; height: 28px;\"><iframe loading=\"lazy\" name=\"f1264ec6639767c\" width=\"1000px\" height=\"1000px\" frameborder=\"0\" allowtransparency=\"true\" allowfullscreen=\"true\" scrolling=\"no\" title=\"fb:share_button Facebook Social Plugin\" src=\"https:\/\/www.facebook.com\/v2.7\/plugins\/share_button.php?app_id=1771303643137455&amp;channel=http%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2FuN4_cXtJDGb.js%3Fversion%3D42%23cb%3Df1ff74f1cd2e78%26domain%3Dwww.lugarvazio.com.br%26origin%3Dhttps%253A%252F%252Fwww.lugarvazio.com.br%252Ff3df58597c3e3c%26relation%3Dparent.parent&amp;container_width=883&amp;href=https%3A%2F%2Fwww.lugarvazio.com.br%2Fblog%2Ffrasedodia.php%3Ffile%3D' + file+ '&amp;layout=button&amp;locale=en_US&amp;mobile_iframe=true&amp;sdk=joey&amp;size=large\" style=\"border: none; visibility: visible; width: 73px; height: 28px;\" class=\"\"><\/iframe><\/span><\/a><\/div>';\n    sharediv = '<img src=https:\/\/www.lugarvazio.com.br\/blog\/img\/compartilhar.png style=\"height: 28px\">';\n    document.getElementById(\"shareFB\").innerHTML = sharediv;\n    document.getElementById('shareFB').onclick = function() {\n\t  FB.ui({\n\t    display: 'popup',\n\t    method: 'share',\n\t    href: fileurl,\n\t  }, function(response){});\n\t}\n    document.getElementById(\"shareFB\").style.display = \"block\";\n}\nfunction frase() {\n\tid = 0;\n\t$.post('https:\/\/www.lugarvazio.com.br\/blog\/fraseout-lv.php', {id: id}, function(res){\n\t      if(res != ''){\n\t         document.getElementById(\"pic_lat\").innerHTML = res;\n\t      }else{document.getElementById(\"pic_lat\").innerHTML = \"A vida \u00e9 uma caixinha de surpresas.\";}\n\t      if (controle) {\n\t    \t  capture();\n\t    \t  } else {\n\t    \t\t  controle = true;\n\t    \t  }\n\t   });\n}\nfunction urlExists(url)\n{\n    var http = new XMLHttpRequest();\n    http.open('HEAD', url, false);\n    http.send();\n    return http.status!=404;\n}\n<\/script><\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Conhe\u00e7a\u00a0a sua frase motivacional\u00a0para\u00a0hoje. A cada dia uma nova frase para voc\u00ea.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-2695","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/pages\/2695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/comments?post=2695"}],"version-history":[{"count":0,"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/pages\/2695\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lugarvazio.com.br\/blog\/wp-json\/wp\/v2\/media?parent=2695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}