diff --git a/assets/main-e17a9cc5.js.map b/assets/main-e17a9cc5.js.map deleted file mode 100644 index 132f2e2..0000000 --- a/assets/main-e17a9cc5.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"mappings":"ojDAAA,OAAO,mBAAU,YACjB,OAAO,2BAAkB,YACzB,OAAO,yBAAgB,sHACvBA,EAAA,WAAO,mCAA0B,6GACjC,OAAO,qBAAY,MACnBA,EAAA,WAAO,iCAAwB","names":["__vitePreload"],"sources":["../../src/main.js"],"sourcesContent":["import('./js/api');\nimport('./js/mobile-menu');\nimport('./js/exersises');\nimport('./js/submit-email-footer');\nimport('./js/quote');\nimport('./js/page-after-switch');\n"],"file":"assets/main-e17a9cc5.js"} \ No newline at end of file diff --git a/assets/main-e17a9cc5.js b/assets/main-ea4c2167.js similarity index 88% rename from assets/main-e17a9cc5.js rename to assets/main-ea4c2167.js index 3ff6c75..7cc4e1f 100644 --- a/assets/main-e17a9cc5.js +++ b/assets/main-ea4c2167.js @@ -1,2 +1,2 @@ -(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))c(t);new MutationObserver(t=>{for(const e of t)if(e.type==="childList")for(const r of e.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&c(r)}).observe(document,{childList:!0,subtree:!0});function s(t){const e={};return t.integrity&&(e.integrity=t.integrity),t.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?e.credentials="include":t.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function c(t){if(t.ep)return;t.ep=!0;const e=s(t);fetch(t.href,e)}})();const _="modulepreload",m=function(a){return"/energy_flow/"+a},f={},i=function(n,s,c){if(!s||s.length===0)return n();const t=document.getElementsByTagName("link");return Promise.all(s.map(e=>{if(e=m(e),e in f)return;f[e]=!0;const r=e.endsWith(".css"),d=r?'[rel="stylesheet"]':"";if(!!c)for(let l=t.length-1;l>=0;l--){const u=t[l];if(u.href===e&&(!r||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${d}`))return;const o=document.createElement("link");if(o.rel=r?"stylesheet":_,r||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),r)return new Promise((l,u)=>{o.addEventListener("load",l),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${e}`)))})})).then(()=>n()).catch(e=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=e,window.dispatchEvent(r),!r.defaultPrevented)throw e})};i(()=>import("./api-8d58433a.js"),[]);i(()=>import("./mobile-menu-de32ecd9.js"),[]);i(()=>import("./exersises-1b0775b1.js"),["assets/exersises-1b0775b1.js","assets/vendor-ad859c2f.js","assets/vendor-e5212ee8.css","assets/api-8d58433a.js"]);i(()=>import("./submit-email-footer-2c817fea.js"),["assets/submit-email-footer-2c817fea.js","assets/vendor-ad859c2f.js","assets/vendor-e5212ee8.css"]);i(()=>import("./quote-64dc1c95.js"),[]);i(()=>import("./page-after-switch-c9484ae8.js"),[]); -//# sourceMappingURL=main-e17a9cc5.js.map +(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))c(t);new MutationObserver(t=>{for(const e of t)if(e.type==="childList")for(const r of e.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&c(r)}).observe(document,{childList:!0,subtree:!0});function s(t){const e={};return t.integrity&&(e.integrity=t.integrity),t.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?e.credentials="include":t.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function c(t){if(t.ep)return;t.ep=!0;const e=s(t);fetch(t.href,e)}})();const _="modulepreload",m=function(a){return"/energy_flow/"+a},f={},i=function(n,s,c){if(!s||s.length===0)return n();const t=document.getElementsByTagName("link");return Promise.all(s.map(e=>{if(e=m(e),e in f)return;f[e]=!0;const r=e.endsWith(".css"),d=r?'[rel="stylesheet"]':"";if(!!c)for(let l=t.length-1;l>=0;l--){const u=t[l];if(u.href===e&&(!r||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${d}`))return;const o=document.createElement("link");if(o.rel=r?"stylesheet":_,r||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),r)return new Promise((l,u)=>{o.addEventListener("load",l),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${e}`)))})})).then(()=>n()).catch(e=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=e,window.dispatchEvent(r),!r.defaultPrevented)throw e})};i(()=>import("./api-8d58433a.js"),[]);i(()=>import("./mobile-menu-de32ecd9.js"),[]);i(()=>import("./exersises-1b0775b1.js"),["assets/exersises-1b0775b1.js","assets/vendor-ad859c2f.js","assets/vendor-e5212ee8.css","assets/api-8d58433a.js"]);i(()=>import("./submit-email-footer-37104e1d.js"),[]);i(()=>import("./quote-64dc1c95.js"),[]);i(()=>import("./page-after-switch-c9484ae8.js"),[]); +//# sourceMappingURL=main-ea4c2167.js.map diff --git a/assets/main-ea4c2167.js.map b/assets/main-ea4c2167.js.map new file mode 100644 index 0000000..c579cc8 --- /dev/null +++ b/assets/main-ea4c2167.js.map @@ -0,0 +1 @@ +{"version":3,"mappings":"ojDAAA,OAAO,mBAAU,YACjB,OAAO,2BAAkB,YACzB,OAAO,yBAAgB,sHACvBA,EAAA,WAAO,mCAA0B,YACjC,OAAO,qBAAY,MACnBA,EAAA,WAAO,iCAAwB","names":["__vitePreload"],"sources":["../../src/main.js"],"sourcesContent":["import('./js/api');\nimport('./js/mobile-menu');\nimport('./js/exersises');\nimport('./js/submit-email-footer');\nimport('./js/quote');\nimport('./js/page-after-switch');\n"],"file":"assets/main-ea4c2167.js"} \ No newline at end of file diff --git a/assets/submit-email-footer-2c817fea.js b/assets/submit-email-footer-2c817fea.js deleted file mode 100644 index 76c225b..0000000 --- a/assets/submit-email-footer-2c817fea.js +++ /dev/null @@ -1,2 +0,0 @@ -import{i as c}from"./vendor-ad859c2f.js";const t=document.querySelector(".subs-form"),s="user-email",r=localStorage.getItem(s);r?t.elements.email.value=r:t.elements.email.value="";t.addEventListener("input",i);function i(o){localStorage.setItem(s,o.target.value)}async function l(o){try{const e=await fetch("https://energyflow.b.goit.study/api/subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o})});if(!e.ok)throw console.error("Код помилки:",e.status),new Error("Мережевий запит не був успішним");const n=await e.json();console.log("Дані успішно відправлені",n),c.success({title:"We are excited to have you on board!",message:"Thank you for subscribing to new exercises on Energy Flow. You have just taken a significant step towards improving your fitness and well-being.",position:"center"})}catch(e){console.error("Помилка при відправленні даних",e)}}t.addEventListener("submit",async o=>{o.preventDefault();const e=localStorage.getItem(s);if(e)try{await l(e),localStorage.removeItem(s),t.reset()}catch{console.log("Помилка при відправленні електронної пошти.")}else console.log("Електронна пошта не введена.")});const u=document.querySelector(".footer-close-btn"),a=document.querySelector(".footer-modal-backdrop"),m=document.querySelector(".footer-team-link");m.addEventListener("click",function(){a.classList.add("is-open")});u.addEventListener("click",function(){a.classList.remove("is-open")}); -//# sourceMappingURL=submit-email-footer-2c817fea.js.map diff --git a/assets/submit-email-footer-2c817fea.js.map b/assets/submit-email-footer-2c817fea.js.map deleted file mode 100644 index 6d67393..0000000 --- a/assets/submit-email-footer-2c817fea.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"submit-email-footer-2c817fea.js","sources":["../../src/js/submit-email-footer.js"],"sourcesContent":["import iziToast from 'izitoast';\nimport 'izitoast/dist/css/iziToast.min.css';\n\nconst form = document.querySelector('.subs-form');\nconst localStorageKey = 'user-email';\n\nconst savedEmail = localStorage.getItem(localStorageKey);\n\nif (savedEmail) {\n form.elements.email.value = savedEmail;\n} else {\n form.elements.email.value = '';\n}\n\nform.addEventListener('input', saveToLocalStorage);\n\nfunction saveToLocalStorage(evt) {\n localStorage.setItem(localStorageKey, evt.target.value);\n}\n\nasync function postEmail(userEmail) {\n try {\n const response = await fetch(\n 'https://energyflow.b.goit.study/api/subscription',\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ email: userEmail }),\n }\n );\n if (!response.ok) {\n console.error('Код помилки:', response.status);\n throw new Error('Мережевий запит не був успішним');\n }\n const data = await response.json();\n console.log('Дані успішно відправлені', data);\n\n iziToast.success({\n title: 'We are excited to have you on board!',\n message:\n 'Thank you for subscribing to new exercises on Energy Flow. You have just taken a significant step towards improving your fitness and well-being.',\n position: 'center',\n });\n } catch (error) {\n console.error('Помилка при відправленні даних', error);\n }\n}\n\nform.addEventListener('submit', async e => {\n e.preventDefault();\n const userEmail = localStorage.getItem(localStorageKey);\n if (userEmail) {\n try {\n await postEmail(userEmail);\n localStorage.removeItem(localStorageKey);\n form.reset();\n } catch (error) {\n console.log('Помилка при відправленні електронної пошти.');\n }\n } else {\n console.log('Електронна пошта не введена.');\n }\n});\n\n// MODAL\nconst closeBtnFooter = document.querySelector('.footer-close-btn');\nconst backDropFooter = document.querySelector('.footer-modal-backdrop');\n\nconst openFooterModalBtn = document.querySelector('.footer-team-link');\nopenFooterModalBtn.addEventListener('click', function () {\n backDropFooter.classList.add('is-open');\n});\n\ncloseBtnFooter.addEventListener('click', function () {\n backDropFooter.classList.remove('is-open');\n});\n"],"names":["form","localStorageKey","savedEmail","saveToLocalStorage","evt","postEmail","userEmail","response","data","iziToast","error","e","closeBtnFooter","backDropFooter","openFooterModalBtn"],"mappings":"yCAGA,MAAMA,EAAO,SAAS,cAAc,YAAY,EAC1CC,EAAkB,aAElBC,EAAa,aAAa,QAAQD,CAAe,EAEnDC,EACFF,EAAK,SAAS,MAAM,MAAQE,EAE5BF,EAAK,SAAS,MAAM,MAAQ,GAG9BA,EAAK,iBAAiB,QAASG,CAAkB,EAEjD,SAASA,EAAmBC,EAAK,CAC/B,aAAa,QAAQH,EAAiBG,EAAI,OAAO,KAAK,CACxD,CAEA,eAAeC,EAAUC,EAAW,CAClC,GAAI,CACF,MAAMC,EAAW,MAAM,MACrB,mDACA,CACE,OAAQ,OACR,QAAS,CACP,eAAgB,kBACjB,EACD,KAAM,KAAK,UAAU,CAAE,MAAOD,CAAS,CAAE,CAC1C,CACP,EACI,GAAI,CAACC,EAAS,GACZ,cAAQ,MAAM,eAAgBA,EAAS,MAAM,EACvC,IAAI,MAAM,iCAAiC,EAEnD,MAAMC,EAAO,MAAMD,EAAS,OAC5B,QAAQ,IAAI,2BAA4BC,CAAI,EAE5CC,EAAS,QAAQ,CACf,MAAO,uCACP,QACE,mJACF,SAAU,QAChB,CAAK,CACF,OAAQC,EAAO,CACd,QAAQ,MAAM,iCAAkCA,CAAK,CACtD,CACH,CAEAV,EAAK,iBAAiB,SAAU,MAAMW,GAAK,CACzCA,EAAE,eAAc,EAChB,MAAML,EAAY,aAAa,QAAQL,CAAe,EACtD,GAAIK,EACF,GAAI,CACF,MAAMD,EAAUC,CAAS,EACzB,aAAa,WAAWL,CAAe,EACvCD,EAAK,MAAK,CACX,MAAe,CACd,QAAQ,IAAI,6CAA6C,CAC1D,MAED,QAAQ,IAAI,8BAA8B,CAE9C,CAAC,EAGD,MAAMY,EAAiB,SAAS,cAAc,mBAAmB,EAC3DC,EAAiB,SAAS,cAAc,wBAAwB,EAEhEC,EAAqB,SAAS,cAAc,mBAAmB,EACrEA,EAAmB,iBAAiB,QAAS,UAAY,CACvDD,EAAe,UAAU,IAAI,SAAS,CACxC,CAAC,EAEDD,EAAe,iBAAiB,QAAS,UAAY,CACnDC,EAAe,UAAU,OAAO,SAAS,CAC3C,CAAC"} \ No newline at end of file diff --git a/assets/submit-email-footer-37104e1d.js b/assets/submit-email-footer-37104e1d.js new file mode 100644 index 0000000..15d87d3 --- /dev/null +++ b/assets/submit-email-footer-37104e1d.js @@ -0,0 +1,2 @@ +const t=document.querySelector(".subs-form"),s="user-email",r=localStorage.getItem(s);t.elements.email.value=r||"";t.addEventListener("input",n);function n(o){localStorage.setItem(s,o.target.value)}async function i(o){try{const e=await fetch("https://energyflow.b.goit.study/api/subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o})});if(!e.ok)throw console.error("Код помилки:",e.status),new Error("Мережевий запит не був успішним");const a=await e.json();console.log("Дані успішно відправлені",a)}catch(e){console.error("Помилка при відправленні даних",e)}}t.addEventListener("submit",async o=>{o.preventDefault();const e=localStorage.getItem(s);if(e)try{await i(e),localStorage.removeItem(s),t.reset(),iziToast.success({title:"We are excited to have you on board!",message:"Thank you for subscribing to new exercises on Energy Flow. You have just taken a significant step towards improving your fitness and well-being.",position:"center"})}catch{console.log("Помилка при відправленні електронної пошти.")}else console.log("Електронна пошта не введена.")}); +//# sourceMappingURL=submit-email-footer-37104e1d.js.map diff --git a/assets/submit-email-footer-37104e1d.js.map b/assets/submit-email-footer-37104e1d.js.map new file mode 100644 index 0000000..f5f9981 --- /dev/null +++ b/assets/submit-email-footer-37104e1d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"submit-email-footer-37104e1d.js","sources":["../../src/js/submit-email-footer.js"],"sourcesContent":["const form = document.querySelector('.subs-form');\nconst localStorageKey = 'user-email';\nconst savedEmail = localStorage.getItem(localStorageKey);\nform.elements.email.value = savedEmail ? savedEmail : '';\nform.addEventListener('input', saveToLocalStorage);\nfunction saveToLocalStorage(evt) {\n localStorage.setItem(localStorageKey, evt.target.value);\n}\nasync function postEmail(userEmail) {\n try {\n const response = await fetch(\n 'https://energyflow.b.goit.study/api/subscription',\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ email: userEmail }), // Оновлено поле з emails nа email\n }\n );\n if (!response.ok) {\n console.error('Код помилки:', response.status);\n throw new Error('Мережевий запит не був успішним');\n }\n const data = await response.json();\n console.log('Дані успішно відправлені', data);\n } catch (error) {\n console.error('Помилка при відправленні даних', error);\n }\n}\nform.addEventListener('submit', async e => {\n e.preventDefault();\n const userEmail = localStorage.getItem(localStorageKey);\n if (userEmail) {\n try {\n await postEmail(userEmail);\n localStorage.removeItem(localStorageKey);\n form.reset();\n\n iziToast.success({\n title: 'We are excited to have you on board!',\n message:\n 'Thank you for subscribing to new exercises on Energy Flow. You have just taken a significant step towards improving your fitness and well-being.',\n position: 'center',\n });\n } catch (error) {\n console.log('Помилка при відправленні електронної пошти.');\n }\n } else {\n console.log('Електронна пошта не введена.');\n }\n});\n"],"names":["form","localStorageKey","savedEmail","saveToLocalStorage","evt","postEmail","userEmail","response","data","error","e"],"mappings":"AAAA,MAAMA,EAAO,SAAS,cAAc,YAAY,EAC1CC,EAAkB,aAClBC,EAAa,aAAa,QAAQD,CAAe,EACvDD,EAAK,SAAS,MAAM,MAAQE,GAA0B,GACtDF,EAAK,iBAAiB,QAASG,CAAkB,EACjD,SAASA,EAAmBC,EAAK,CAC/B,aAAa,QAAQH,EAAiBG,EAAI,OAAO,KAAK,CACxD,CACA,eAAeC,EAAUC,EAAW,CAClC,GAAI,CACF,MAAMC,EAAW,MAAM,MACrB,mDACA,CACE,OAAQ,OACR,QAAS,CACP,eAAgB,kBACjB,EACD,KAAM,KAAK,UAAU,CAAE,MAAOD,CAAS,CAAE,CAC1C,CACP,EACI,GAAI,CAACC,EAAS,GACZ,cAAQ,MAAM,eAAgBA,EAAS,MAAM,EACvC,IAAI,MAAM,iCAAiC,EAEnD,MAAMC,EAAO,MAAMD,EAAS,OAC5B,QAAQ,IAAI,2BAA4BC,CAAI,CAC7C,OAAQC,EAAO,CACd,QAAQ,MAAM,iCAAkCA,CAAK,CACtD,CACH,CACAT,EAAK,iBAAiB,SAAU,MAAMU,GAAK,CACzCA,EAAE,eAAc,EAChB,MAAMJ,EAAY,aAAa,QAAQL,CAAe,EACtD,GAAIK,EACF,GAAI,CACF,MAAMD,EAAUC,CAAS,EACzB,aAAa,WAAWL,CAAe,EACvCD,EAAK,MAAK,EAEV,SAAS,QAAQ,CACf,MAAO,uCACP,QACE,mJACF,SAAU,QAClB,CAAO,CACF,MAAe,CACd,QAAQ,IAAI,6CAA6C,CAC1D,MAED,QAAQ,IAAI,8BAA8B,CAE9C,CAAC"} \ No newline at end of file diff --git a/favorites.html b/favorites.html index 4896334..52f8eeb 100644 --- a/favorites.html +++ b/favorites.html @@ -12,7 +12,7 @@ rel="stylesheet" /> - + @@ -663,7 +663,8 @@ Diana Yavchuk - + + + + - diff --git a/index.html b/index.html index 857a69d..87891dc 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ rel="stylesheet" /> - + @@ -571,7 +571,8 @@ Diana Yavchuk - + + + + -