diff --git a/dist/api/blog/blogData.php b/dist/api/blog/blogData.php index cfa375b..d6128fb 100644 --- a/dist/api/blog/blogData.php +++ b/dist/api/blog/blogData.php @@ -673,11 +673,6 @@ EOD; */ public function changeHTMLSrc(string $body, string $to, string $from): string { -// $body = preg_replace_callback('/>([^<]+)', function($matches) { -// // Convert special characters to HTML entities -// return '>' . htmlentities(trim($matches[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8') . '<'; -// }, $body); - $htmlDoc = new DOMDocument(); // Load the raw HTML content into DOMDocument diff --git a/dist/blog/js/index.js b/dist/blog/js/index.js index cf5a174..9f44b29 100644 --- a/dist/blog/js/index.js +++ b/dist/blog/js/index.js @@ -1 +1 @@ -const scrollLimit=150;function goToURL(t){let e=t.split("/");if("accepted"===localStorage.getItem("cookiePopup")&&document.querySelector("#cookiePopup").classList.add("hidden"),"/blog"!==t&&"blog"!==t&&"/blog/"!==t)if("post"!==e[2]){if("category"===e[2])return e[3]?void loadPostsByCategory(e[e.length-1]):void loadAllCategories().catch((t=>console.log(t)));if("search"===e[2]&&e[3])loadSearchResults(e[e.length-1]);else{if("policy"===e[2]){if("privacy"===e[3])return void loadPrivacyPolicy();if("cookie"===e[3])return void loadCookiePolicy()}"unsubscribe"===e[2]&&e[3]?unsubscribe(e[e.length-1]):show404()}}else loadIndividualPost(e[e.length-1]).catch((t=>console.log(t)));else loadHomeContent()}function submitNewsletter(){fetch(`/api/blog/newsletter/${document.querySelector("#email").value}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then((t=>t.json().then((e=>(document.querySelector("#newsletterMessage").classList.remove("hidden"),e.message.includes("exists")?(document.querySelector("#newsletterMessage").classList.add("error"),document.querySelector("#newsletterMessage").classList.remove("success"),void(document.querySelector("#newsletterMessage div").innerHTML='You"ve already signed up you silly goose!')):t.ok?(document.querySelector("#newsletterMessage div").innerHTML=e.message,void document.querySelector("#newsletterMessage").classList.add("success")):(document.querySelector("#newsletterMessage").classList.add("error"),document.querySelector("#newsletterMessage").classList.remove("success"),void(document.querySelector("#newsletterMessage div").innerHTML=e.error)))))))}function unsubscribe(t){fetch(`/api/blog/newsletter/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}).then((t=>t.json().then((t=>{document.querySelector("#main").innerHTML="";let e=document.createElement("section");e.classList.add("unsubscribe"),e.id="unsubscribe";let n=document.createElement("div");n.classList.add("centered"),n.innerHTML=`\n\t\t\t
${t.message}
\n \tSee all blog posts\n\t\t`,e.appendChild(n),document.querySelector("#main").appendChild(e)}))))}function createFormattedDate(t){return new Date(t).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function createLargePost(t){let e=document.createElement("div");e.classList.add("outerContent");let n=document.createElement("img");n.className="banner",n.src=t.headerImg.replaceAll("%2F","/"),n.alt=t.title,e.appendChild(n);let o=document.createElement("div");o.classList.add("content");let a=document.createElement("div");a.classList.add("postContent");let i="";t.categories.split(", ").forEach((e=>{i+=`${e}`,t.categories.split(", ").length>1&&(i+=", ")})),i.endsWith(", ")&&(i=i.substring(0,i.length-2));let s=createFormattedDate(t.dateModified);return a.innerHTML=`\n${t.abstract}
\n See Post\n `,o.appendChild(a),e.appendChild(o),e}function createCardPost(t){let e=document.createElement("div");e.classList.add("cardItem"),e.id="post"+t.ID;let n=document.createElement("img");n.className="cardImg",n.src=t.headerImg.replaceAll("%2F","/"),n.alt=t.title,e.appendChild(n);let o=document.createElement("div");return o.classList.add("content"),o.innerHTML=`\n\t\t\t\t\tLast Updated: Nov 12, 2023
\n\t\t\t\n\t\t\t\tThank you for visiting the Privacy Policy of Rohit Pai"s Blog. This Privacy Policy explains how I, Rohit Pai, collect, use, and share information about you (“you”, “yours” or “user”) when you access or use my website (“Services”). You are responsible for any third-party data you provid\'e or share through the Services and confirm that you have the third partys consent to provide such data to me.\n\t\t\t
\n\t\t\t\n\t\t\t\tI collect information that you directly provide to me, such as when you submit a form or send me a message with your information. I may also receive information about you from my partners, including but not limited to distribution partners, data services, and marketing firms. I may combine this information with other information I collect from or about you. In these cases, my Privacy Policy governs the handling of the combined information. I and my partners may collect the information noted in this privacy policy using cookies, web beacons, pixels, and other similar technologies. These technologies are used for authentication, to store your preferences or progress, for analytics, and for advertising and analytics. Cookies are small text files stored on your computer. You can set your browser to reject cookies altogether, to reject my cookies in particular, or to delete cookies. However, this may cause some or all of my Services not to function on your computer or device.\n\t\t\t
\n\t\t\t\n\t\t\t\tI use information I collect about you to provide, maintain, and improve my Services and other interactions I have with you. For example, I use the information collected to:\n\t\t\t
\n\t\t\t\n\t\t\t\tI may share your Personal Information in the following situations:\n\t\t\t
\n\t\t\t\n\t\t\t\tI use advertising and analytics technologies to better understand your online activity on my Services to provide personalized products and services that may interest you. I may allow third-party companies, including ad networks, to serve advertisements, provide other advertising services, and/or collect certain information when you visit my website. Third-party companies may use pseudonymized personal data (e.g., click stream information, browser type, time and date, subject of advertisements clicked or scrolled over) during your visit to this website in order to provide advertisements about goods and services likely to be of interest to you, on this website and others. To learn more about Interest-Based Advertising or to opt-out of this type of advertising, you can visit AboutAds.info/choices or www.networkadvertising.org/choices. Some third-party companies may also use non-cookie technologies, such as statistical IDs. Please keep in mind that your web browser may not permit you to block the use of these non-cookie technologies, and those browser settings that block cookies may have no effect on such techniques. If the third-party company uses the non-cookie technologies for interest-based advertising, you can opt out at www.networkadvertising.org/choices. Please note the industry opt out only applies to use for interest-based advertising and may not apply to use for analytics or attribution. Some websites have “do not track” features that allow you to tell a website not to track you. These features are not all uniform. I do not currently respond to those signals.\n\t\t\t
\n\t\t\t\n\t\t\t\tI implement commercially reasonable security measures designed to protect your information. Despite my best efforts, however, no security measures are completely impenetrable.\n\t\t\t
\n\t\t\t\n\t\t\t\tI store the information I collect about you for as long as necessary for the purpose(s) for which I collected it or for other legitimate business purposes, including to meet my legal, regulatory, or other compliance obligations.\n\t\t\t
\n\t\t\tIndividuals located in certain countries, including the European Economic Area (EEA) and the United Kingdom, have certain statutory rights under the General Data Protection Regulation (GDPR) in relation to their personal data.
\n\t\t\tTo the extent information I collect is associated with an identified or identifiable natural person and is protected as personal data under GDPR, it is referred to in this Privacy Policy as “Personal Data”.
\n\t\t\t\n\t\t\t\tData Subject Access Requests\n\t\t\t
\n\t\t\t\n\t\t\t\tSubject to any exemptions provided by law, you may have the right to request:\n\t\t\t
\n\t\t\t\n\t\t\t\tTo access your privacy rights, send me an email at rohit@rohitpai.co.uk.\n\t\t\t
\n\t\t\t\n\t\t\t\tI will generally process requests within one month. I may need to request specific information from you to help me confirm your identity and/or the jurisdiction in which you reside. If your request is complicated or if you have made a large number of requests, it may take me longer. I will let you know if I need longer than one month to respond.\n\t\t\t
\n\t\t\t\n\t\t\t\tLegal Bases For Processing Personal Data\n\t\t\t
\n\t\t\t\n\t\t\t\tI may process your Personal Data under applicable data protection law on the following legal grounds:\n\t\t\t
\n\t\t\t\n\t\t\t\tMy Service is intended for adults ages 18 years and above. I do not knowingly collect personally identifiable information from children. If you are a parent or legal guardian and think your child under 13 has given me information, please email or write to me at the address listed at the end of this Privacy Policy. Please mark your inquiries “COPPA Information Request.”\n\t\t\t
\n\t\t\t\n\t\t\t\tRohit Pai may change this Privacy Policy from time to time. I encourage you to visit this page to stay informed. If the changes are material, I may provide you additional notice to your email address or through my Services. Your continued use of the Services indicates your acceptance of the modified Privacy Policy.\n\t\t\t
\n\t\t\t\n\t\t\t\tYou can opt in to receive my marketing emails and/or newsletters by below. I may still send you transactional messages, which include Services-related communications and responses to your questions.\n\t\t\t
\n\t\t\t\n\t\t\t\tInformation I maintain may be stored both within and outside of the United States. If you live outside of the United States, you understand and agree that I may transfer your information to the United States, and that U.S. laws may not afford the same level of protection as those in your country.\n\t\t\t
\n\t\t\t\n\t\t\t\tIf you have questions, comments, or concerns about this Privacy Policy, you may contact me at:\n\t\t\t
\n\t\t\tContact\n\t\t\trohit@rohitpai.co.uk\n\t\t\n\t\t'}function loadCookiePolicy(){document.querySelector("#main").innerHTML='\n\t\tI only use functional cookies for the blog which includes PHP Session ID, disqus. a cookie to disable the cookie popup, and maybe share this. I think that these are functional cookies, if you don\'t, you\'re welcome to exit the site or tell me by emailing me through the email address below, or the contact form on the contact section of my main website.
\n\t\t\t${t.message}
\n \tSee all blog posts\n\t\t`,e.appendChild(n),document.querySelector("#main").appendChild(e)}))))}function createFormattedDate(t){return new Date(t).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function createLargePost(t){let e=document.createElement("div");e.classList.add("outerContent");let n=document.createElement("img");n.className="banner",n.src=t.headerImg.replaceAll("%2F","/"),n.alt=t.title,e.appendChild(n);let o=document.createElement("div");o.classList.add("content");let a=document.createElement("div");a.classList.add("postContent");let i="";t.categories.split(", ").forEach((e=>{i+=`${e}`,t.categories.split(", ").length>1&&(i+=", ")})),i.endsWith(", ")&&(i=i.substring(0,i.length-2));let s=createFormattedDate(t.dateModified);return a.innerHTML=`\n${t.abstract}
\n See Post\n `,o.appendChild(a),e.appendChild(o),e}function createCardPost(t){let e=document.createElement("div");e.classList.add("cardItem"),e.id="post"+t.ID;let n=document.createElement("img");n.className="cardImg",n.src=t.headerImg.replaceAll("%2F","/"),n.alt=t.title,e.appendChild(n);let o=document.createElement("div");return o.classList.add("content"),o.innerHTML=`\n\t\t\t\t\tLast Updated: Nov 12, 2023
\n\t\t\t\n\t\t\t\tThank you for visiting the Privacy Policy of Rohit Pai"s Blog. This Privacy Policy explains how I, Rohit Pai, collect, use, and share information about you (“you”, “yours” or “user”) when you access or use my website (“Services”). You are responsible for any third-party data you provid\'e or share through the Services and confirm that you have the third partys consent to provide such data to me.\n\t\t\t
\n\t\t\t\n\t\t\t\tI collect information that you directly provide to me, such as when you submit a form or send me a message with your information. I may also receive information about you from my partners, including but not limited to distribution partners, data services, and marketing firms. I may combine this information with other information I collect from or about you. In these cases, my Privacy Policy governs the handling of the combined information. I and my partners may collect the information noted in this privacy policy using cookies, web beacons, pixels, and other similar technologies. These technologies are used for authentication, to store your preferences or progress, for analytics, and for advertising and analytics. Cookies are small text files stored on your computer. You can set your browser to reject cookies altogether, to reject my cookies in particular, or to delete cookies. However, this may cause some or all of my Services not to function on your computer or device.\n\t\t\t
\n\t\t\t\n\t\t\t\tI use information I collect about you to provide, maintain, and improve my Services and other interactions I have with you. For example, I use the information collected to:\n\t\t\t
\n\t\t\t\n\t\t\t\tI may share your Personal Information in the following situations:\n\t\t\t
\n\t\t\t\n\t\t\t\tI use advertising and analytics technologies to better understand your online activity on my Services to provide personalized products and services that may interest you. I may allow third-party companies, including ad networks, to serve advertisements, provide other advertising services, and/or collect certain information when you visit my website. Third-party companies may use pseudonymized personal data (e.g., click stream information, browser type, time and date, subject of advertisements clicked or scrolled over) during your visit to this website in order to provide advertisements about goods and services likely to be of interest to you, on this website and others. To learn more about Interest-Based Advertising or to opt-out of this type of advertising, you can visit AboutAds.info/choices or www.networkadvertising.org/choices. Some third-party companies may also use non-cookie technologies, such as statistical IDs. Please keep in mind that your web browser may not permit you to block the use of these non-cookie technologies, and those browser settings that block cookies may have no effect on such techniques. If the third-party company uses the non-cookie technologies for interest-based advertising, you can opt out at www.networkadvertising.org/choices. Please note the industry opt out only applies to use for interest-based advertising and may not apply to use for analytics or attribution. Some websites have “do not track” features that allow you to tell a website not to track you. These features are not all uniform. I do not currently respond to those signals.\n\t\t\t
\n\t\t\t\n\t\t\t\tI implement commercially reasonable security measures designed to protect your information. Despite my best efforts, however, no security measures are completely impenetrable.\n\t\t\t
\n\t\t\t\n\t\t\t\tI store the information I collect about you for as long as necessary for the purpose(s) for which I collected it or for other legitimate business purposes, including to meet my legal, regulatory, or other compliance obligations.\n\t\t\t
\n\t\t\tIndividuals located in certain countries, including the European Economic Area (EEA) and the United Kingdom, have certain statutory rights under the General Data Protection Regulation (GDPR) in relation to their personal data.
\n\t\t\tTo the extent information I collect is associated with an identified or identifiable natural person and is protected as personal data under GDPR, it is referred to in this Privacy Policy as “Personal Data”.
\n\t\t\t\n\t\t\t\tData Subject Access Requests\n\t\t\t
\n\t\t\t\n\t\t\t\tSubject to any exemptions provided by law, you may have the right to request:\n\t\t\t
\n\t\t\t\n\t\t\t\tTo access your privacy rights, send me an email at rohit@rohitpai.co.uk.\n\t\t\t
\n\t\t\t\n\t\t\t\tI will generally process requests within one month. I may need to request specific information from you to help me confirm your identity and/or the jurisdiction in which you reside. If your request is complicated or if you have made a large number of requests, it may take me longer. I will let you know if I need longer than one month to respond.\n\t\t\t
\n\t\t\t\n\t\t\t\tLegal Bases For Processing Personal Data\n\t\t\t
\n\t\t\t\n\t\t\t\tI may process your Personal Data under applicable data protection law on the following legal grounds:\n\t\t\t
\n\t\t\t\n\t\t\t\tMy Service is intended for adults ages 18 years and above. I do not knowingly collect personally identifiable information from children. If you are a parent or legal guardian and think your child under 13 has given me information, please email or write to me at the address listed at the end of this Privacy Policy. Please mark your inquiries “COPPA Information Request.”\n\t\t\t
\n\t\t\t\n\t\t\t\tRohit Pai may change this Privacy Policy from time to time. I encourage you to visit this page to stay informed. If the changes are material, I may provide you additional notice to your email address or through my Services. Your continued use of the Services indicates your acceptance of the modified Privacy Policy.\n\t\t\t
\n\t\t\t\n\t\t\t\tYou can opt in to receive my marketing emails and/or newsletters by below. I may still send you transactional messages, which include Services-related communications and responses to your questions.\n\t\t\t
\n\t\t\t\n\t\t\t\tInformation I maintain may be stored both within and outside of the United States. If you live outside of the United States, you understand and agree that I may transfer your information to the United States, and that U.S. laws may not afford the same level of protection as those in your country.\n\t\t\t
\n\t\t\t\n\t\t\t\tIf you have questions, comments, or concerns about this Privacy Policy, you may contact me at:\n\t\t\t
\n\t\t\tContact\n\t\t\trohit@rohitpai.co.uk\n\t\t\n\t\t'}function loadCookiePolicy(){document.querySelector("#main").innerHTML='\n\t\tI only use functional cookies for the blog which includes PHP Session ID, disqus. a cookie to disable the cookie popup, and maybe share this. I think that these are functional cookies, if you don\'t, you\'re welcome to exit the site or tell me by emailing me through the email address below, or the contact form on the contact section of my main website.
\n\t\t\t