{"id":9,"date":"2023-12-27T07:50:54","date_gmt":"2023-12-27T12:50:54","guid":{"rendered":"https:\/\/www.tastepref.com\/?page_id=9"},"modified":"2024-08-08T11:05:45","modified_gmt":"2024-08-08T15:05:45","slug":"home-page","status":"publish","type":"page","link":"https:\/\/www.tastepref.com\/","title":{"rendered":"Home Page"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"9\" class=\"elementor elementor-9\">\n\t\t\t\t<div class=\"elementor-element elementor-element-119f680 e-con-full e-flex e-con e-parent\" data-id=\"119f680\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5dbe8b0 elementor-widget elementor-widget-html\" data-id=\"5dbe8b0\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t<style>\n\t\t.flex-col-center .elementor-widget-container{\n\t\t   display: flex;\n\t\t   flex-direction: column;\n\t\t   align-items: center;\n\t\t}\n\t\t<\/style>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-78aa6e0 e-con-full e-flex e-con e-child\" data-id=\"78aa6e0\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0f8ca83 elementor-widget__width-inherit flex-col-center elementor-widget elementor-widget-html\" data-id=\"0f8ca83\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t<style>\n\t\t#dynamic-input {\n\t\tfont-size: 36px; \/* Font size *\/\n\t\tpadding: 25px; \/* Padding inside the input box *\/\n\t\tborder: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\t}\n\t\t.input-container {\n\t\t\twidth: 90%; \/* Adjust the width as needed *\/\n\t\t\theight: 300px; \/* Adjust the height as needed *\/\n\t\t\tborder: 10px solid #E08080; \/* Border *\/\n\t\t\tborder-radius: 10px; \/* Rounded corners *\/\t\t\n\t\t}\n\t\t\/* Blinking cursor effect *\/\n\t\t@keyframes blink {\n\t\t\t50% { border-color: transparent; }\n\t\t}\n\t\t#dynamic-input:focus {\n\t\t\toutline: none;\n\t\t\tanimation: blink 1s step-end infinite;\n\t\t}\n\t\t\/* Style in textarea cursor to be thicker *\/\n\t\ttextarea {\n\t\t\t\n\t\t}\n\t<\/style>\n\t<div class=\"input-container\">\n\t\t<textarea type=\"text\" id=\"dynamic-input\" placeholder=\"\"><\/textarea>\n\t<\/div>\n\n\t<script>\n\t\t\/\/ focus on the input box on page load\n\t\tdocument.getElementById(\"dynamic-input\").focus();\n\t\tconst phrases = [\n\t\t\t\"best burger for saturday night in Chelsea\",\n\t\t\t\"find good bbq around me\",\n\t\t\t\"I\u2019m in the mood for yellow curry chicken\",\n\t\t\t\"Suggestions for dinner near me? But...I don\u2019t like onions\",\n\t\t];\n\n\t\tconst input = document.getElementById(\"dynamic-input\");\n\t\tlet phraseIndex = 0;\n\t\tlet charIndex = 0;\n    let inputClicked = false;\n\n\t\tfunction typePhrase() {\n\t\t\tif (charIndex < phrases[phraseIndex].length && inputClicked == false) {\n\t\t\t\tinput.placeholder += phrases[phraseIndex].charAt(charIndex);\n\t\t\t\tcharIndex++;\n\t\t\t\tsetTimeout(typePhrase, 80); \/\/ Typing speed in milliseconds\n\t\t\t} else if (inputClicked == false) {\n\t\t\t\tsetTimeout(deletePhrase, 2000); \/\/ Wait time before deleting\n\t\t\t}\n\t\t}\n\n\t\tfunction deletePhrase() {\n\t\t\tif (charIndex > 0 && inputClicked == false) {\n\t\t\t\tinput.placeholder = input.placeholder.substring(0, charIndex - 1);\n\t\t\t\tcharIndex--;\n\t\t\t\tsetTimeout(deletePhrase, 30); \/\/ Deleting speed in milliseconds\n\t\t\t} else if (inputClicked == false) {\n\t\t\t\t\/\/ Move to the next phrase or restart if at the end\n\t\t\t\tphraseIndex = (phraseIndex + 1) % phrases.length;\n\t\t\t\tcharIndex = 0; \/\/ Reset charIndex for the new phrase\n\t\t\t\tsetTimeout(typePhrase, 200); \/\/ Wait time before typing next phrase\n\t\t\t}\n\t\t}\n\n    if(inputClicked == false){\n      setTimeout(typePhrase, 200);  \n    }\n\t\t\n    \n    \/\/ on click, clear the input and stop the typePhrase and deletePhrase functions\n    document.getElementById(\"dynamic-input\").addEventListener(\"click\", function() {\n      input.placeholder = \"\";\n      charIndex = 0;\n      phraseIndex = 0;\n      inputClicked = true;\n    });\n    \n\t<\/script>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5cd8e75 elementor-align-center elementor-widget elementor-widget-button\" data-id=\"5cd8e75\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-xl\" href=\"#\" id=\"btnFindFood\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t<span class=\"elementor-button-icon\">\n\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-map-marked-alt\" viewBox=\"0 0 576 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M288 0c-69.59 0-126 56.41-126 126 0 56.26 82.35 158.8 113.9 196.02 6.39 7.54 17.82 7.54 24.2 0C331.65 284.8 414 182.26 414 126 414 56.41 357.59 0 288 0zm0 168c-23.2 0-42-18.8-42-42s18.8-42 42-42 42 18.8 42 42-18.8 42-42 42zM20.12 215.95A32.006 32.006 0 0 0 0 245.66v250.32c0 11.32 11.43 19.06 21.94 14.86L160 448V214.92c-8.84-15.98-16.07-31.54-21.25-46.42L20.12 215.95zM288 359.67c-14.07 0-27.38-6.18-36.51-16.96-19.66-23.2-40.57-49.62-59.49-76.72v182l192 64V266c-18.92 27.09-39.82 53.52-59.49 76.72-9.13 10.77-22.44 16.95-36.51 16.95zm266.06-198.51L416 224v288l139.88-55.95A31.996 31.996 0 0 0 576 426.34V176.02c0-11.32-11.43-19.06-21.94-14.86z\"><\/path><\/svg>\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Find Food<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d482806 e-con-full e-flex e-con e-child\" data-id=\"d482806\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-44dff82 elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"44dff82\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-location-arrow\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M444.52 3.52L28.74 195.42c-47.97 22.39-31.98 92.75 19.19 92.75h175.91v175.91c0 51.17 70.36 67.17 92.75 19.19l191.9-415.78c15.99-38.39-25.59-79.97-63.97-63.97z\"><\/path><\/svg>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a3d3c97 elementor-widget elementor-widget-text-editor\" data-id=\"a3d3c97\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Be sure to type the location of where you want to eat to your question<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-fbf2851 e-con-full e-flex e-con e-child\" data-id=\"fbf2851\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d58f5c9 elementor-widget elementor-widget-text-editor\" data-id=\"d58f5c9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><strong>Or&#8230;<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d2d3baf elementor-widget elementor-widget-text-editor\" data-id=\"d2d3baf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>accept the browser location feature popup<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8d399cc elementor-widget elementor-widget-image\" data-id=\"8d399cc\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"612\" height=\"280\" src=\"https:\/\/www.tastepref.com\/wp-content\/uploads\/2024\/02\/your-location-screenshot.png\" class=\"attachment-large size-large wp-image-88\" alt=\"\" srcset=\"https:\/\/www.tastepref.com\/wp-content\/uploads\/2024\/02\/your-location-screenshot.png 612w, https:\/\/www.tastepref.com\/wp-content\/uploads\/2024\/02\/your-location-screenshot-300x137.png 300w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-4d84c24 e-con-full e-flex e-con e-child\" data-id=\"4d84c24\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f2127b0 elementor-widget elementor-widget-heading\" data-id=\"f2127b0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What's for<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49bd91f elementor-widget elementor-widget-heading\" data-id=\"49bd91f\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">for<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ea72948 elementor-widget elementor-widget-heading\" data-id=\"ea72948\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Dinner?<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4b74b3b elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"4b74b3b\" data-element_type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b949625 elementor-widget elementor-widget-heading\" data-id=\"b949625\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">find restaurant meals<\/h4>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d13ddf6 e-flex e-con-boxed e-con e-parent\" data-id=\"d13ddf6\" 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-e20c9e0 elementor-widget elementor-widget-html\" data-id=\"e20c9e0\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<script>\n  \/\/ trigger the onPressLocation function when the user clicks a button with the id \"btnFindFood\"\n  document.getElementById(\"btnFindFood\").addEventListener(\"click\", onPressLocation);\n  \n  \/\/ A function to handle the button press event for retrieving the user's location using geolocation in the browser.\n  function onPressLocation() {\n    \/\/ Check if geolocation is available in the browser.\n    if (\"geolocation\" in navigator) {\n      \/\/ Get the user's current location.\n      navigator.geolocation.getCurrentPosition(function(position) {\n        \/\/ The position object contains the user's latitude, longitude, and altitude.\n        console.log(position.coords);\n      });\n    } else {\n      \/\/ Geolocation is not available in the browser.\n      console.log(\"Geolocation is not available in the browser.\");\n      \/\/ TODO: Let the user know they'll need to add location information to their prompt\n    }\n\n    if (document.getElementById(\"dynamic-input\").value.length < 3) {\n      console.log(\"don't submit form. less than three chars\")\n    } else {\n      console.log(\"Disco! Submit form. more than three chars\")\n      alert(\"Disco! Submit form. more than three chars\");\n    }\n    toggleBtnFindFood();\n  }\n\n  \/\/ on keyup, call the toggleBtnFindFood function to enable or disable the btnFindFood button\n  document.getElementById(\"dynamic-input\").addEventListener(\"keyup\", onKeyUp);\n  \n  function onKeyUp() {\n    console.log(\"keyup event\");\n    console.log(\"document.getElementById('dynamic-input').value.length: \", document.getElementById(\"dynamic-input\").value.length);\n    if (document.getElementById(\"dynamic-input\").value.length < 3) {\n      console.log(\"disable button\")\n    } else {\n      console.log('enable button')\n    }\n    toggleBtnFindFood();\n  }\n  \n\t\/\/if their are not at least 3 characters in the #dynamic-input field, disable the btnFindFood button\n  function toggleBtnFindFood() {\n    console.log('toggleBtnFindFood called');\n    if (document.getElementById(\"dynamic-input\").value.length < 3) {\n      \/\/ mimic a disabled button style for an anchor tag\n      document.getElementById(\"btnFindFood\").style = \"cursor: not-allowed; pointer-events: none;\";\n      document.getElementById(\"btnFindFood\").href = \"#\";\n      \/\/ add tooltip on btnFindFood hover to explain why button is disabled\n      document.getElementById(\"btnFindFood\").title = \"Please enter at least 3 characters\";\n      document.getElementById(\"btnFindFood\").innerHTML = \"Please enter at least 3 characters\";\n    \n      console.log(\"Disable button. Input less then 3 characters\")\n    } else {\n      \/\/ mimic an enabled button style for an anchor tag\n      document.getElementById(\"btnFindFood\").style = \"cursor: pointer; pointer-events: auto; background-color: #e31212;\";\n      document.getElementById(\"btnFindFood\").href = \"#\";\n      \n      \/\/ add tooltip on btnFindFood hover to explain why button is disabled\n      document.getElementById(\"btnFindFood\").title = \"Find Food!\";\n      document.getElementById(\"btnFindFood\").innerHTML = \"Find Food!\";\n      \/\/ remove event listener\n      document.getElementById(\"dynamic-input\").removeEventListener(\"keyup\", onKeyUp);\n      console.log(\"remove event keyup listener\")\n      console.log(\"Enable button. more then 3 characters entered\")\n\n    }\n  }\n  \n    \/\/ gather all information about the user available through the browser\n    function gatherBrowserInfo() {\n      var info = {\n          screen_width: screen.width,\n          screen_height: screen.height,\n          screen_colorDepth: screen.colorDepth,\n          window_innerWidth: window.innerWidth,\n          window_innerHeight: window.innerHeight,\n          browser_name: navigator.appName,\n          browser_engine: navigator.product,\n          browser_version1a: navigator.appVersion,\n          browser_version1b: navigator.userAgent,\n          browser_language: navigator.language,\n          browser_online: navigator.onLine,\n          browser_platform: navigator.platform,\n          java_enabled: navigator.javaEnabled(),\n          cookies_enabled: navigator.cookieEnabled,\n          user_agent: navigator.userAgent\n      };\n\n      return info;\n  }\n\n\n  var browserInfo = gatherBrowserInfo();\n  console.log(\"browserInfo: \");\n  console.log(browserInfo);\n<\/script>\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>Find Food Be sure to type the location of where you want to eat to your question Or&#8230; accept the browser location feature popup What&#8217;s for for Dinner? find restaurant meals<\/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":""},"class_list":["post-9","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/pages\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":10,"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/pages\/9\/revisions"}],"predecessor-version":[{"id":168,"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/pages\/9\/revisions\/168"}],"wp:attachment":[{"href":"https:\/\/www.tastepref.com\/index.php\/wp-json\/wp\/v2\/media?parent=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}