top of page

Cookies Policy

The cookie banner is displayed at the bottom of the page, with a dark background (#333) and white text. It informs the user that the site uses cookies to enhance their browsing experience. The text also includes a golden-yellow link to the "Privacy Policy," where users can find more information about the use of cookies.

 

There are two available buttons:

1. Accept: By clicking the yellow button (with a background color of #ffd700), the user agrees to the use of cookies. The button has the text "Accept."

2. Decline: The red button (#f44336) offers the option to decline the use of cookies. The button has the text "Decline."

 

The layout of the banner is responsive, fixed to the bottom of the page, and spans the entire width of the screen.

 

### acceptCookies() Function:

When the user clicks the "Accept" button, this function is called.

It stores the information that cookies have been accepted using `localStorage.setItem('cookiesAccepted', 'true')`.

Then, the cookie banner is hidden with `document.getElementById('cookie-banner').style.display = 'none'`, which makes the notification disappear from the screen.

 

### decline cookies() Function:

When the user clicks the "Decline" button, this function is called.

It stores the information that cookies have been declined using `localStorage.setItem('cookiesAccepted', 'false')`.

Similar to the previous function, the cookie banner is hidden with `document.getElementById('cookie-banner).style.display = 'none'`, removing the notification from the screen.

 

These functions are used to record the user's choice regarding cookies and hide the banner, as well as store the user's decision locally in the browser so that the choice is remembered on future visits.

 

Loading Cookies After Consent:

**Page Load Event:**

The code is executed as soon as the page content is fully loaded, using the `DOMContentLoaded` event.

 

Cookie Consent Check:

The code checks, using `localStorage.getItem('cookiesAccepted')`, if the user has already responded cookies.

 

- **If the user accepted the cookies** (when the stored value is 'true'):

  In this case, you can enable site functionalities or features that depend on cookies, such as:

  - Loading analytics tools (like Google Analytics).

  - Displaying advertisements.

  These features are only activated after the user’s consent.

 

- **If the user declined the cookies** (when the stored value is 'false'):

  Here, you can disable or limit functionalities that depend on cookies. This means the site will not load features like ads or analytics tools that require cookies.

 

if the user has not responded:

  If consent has not yet been recorded (i.e., there is no response in `localStorage`), the cookie banner will be shown to the user, asking for their choice.

  The banner is displayed using the command `document.getElementById('cookie-banner').style.display = 'block'`.

 

In summary, this code ensures that after the page loads, the behavior of the site (regarding cookies) adapts based on the user's choice, whether they accept, decline, or have not yet decided on the cookies.

 

Read Our Privacy Policy:

This is a link to the page where users can review detailed information on how data is collected, stored, and used by the site, along with other privacy-related aspects. The link appears in a golden color (#ffd700) to stand out.

bottom of page