diff --git a/src/app.js b/src/app.js index 2aea56c..e69de29 100644 --- a/src/app.js +++ b/src/app.js @@ -1,36 +0,0 @@ - - -const cookieStorage = { - getItem: (item) => { - const cookies = document.cookie - .split(';') - .map(cookie => cookie.split('=')) - .reduce((acc, [key, value]) => ({ ...acc, [key.trim()]: value }), {}); - return cookies[item]; - }, - setItem: (item, value) => { - document.cookie = `${item}=${value};` - } -} - - -window.onload = () => { - const storageType = cookieStorage; - const consentPropertyName = 'jdc_consent'; - const shouldShowPopup = storageType => !storageType.getItem(consentPropertyName); - const saveToStorage = storageType => storageType.setItem(consentPropertyName, true); - const acceptFn = event => { - saveToStorage(storageType); - consentPopup.classList.add('hidden'); - } - const consentPopup = document.getElementById('consent-popup'); - const acceptBtn = document.getElementById('accept'); - acceptBtn.addEventListener('click', acceptFn); - - if (shouldShowPopup(storageType)) { - setTimeout(() => { - consentPopup.classList.remove('hidden'); - }, 2000); - } - -}; \ No newline at end of file diff --git a/src/img/hero.jpg b/src/img/hero.jpg deleted file mode 100644 index 5f343c2..0000000 Binary files a/src/img/hero.jpg and /dev/null differ diff --git a/src/index.html b/src/index.html index a4c059b..de09f77 100644 --- a/src/index.html +++ b/src/index.html @@ -4,41 +4,8 @@
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Vel, impedit! Ea incidunt amet quam nostrum numquam cum magnam! Dolore quis laborum cum neque rerum vero eveniet laudantium excepturi nemo alias?
-By using this site you agree to our Terms and Conditions. - Please Accept these before using the site. -
-