simple cookie consent code (#799)

* simple cookie consent code
feat-translations
Markos Gogoulos 2023-06-12 16:40:53 +03:00 zatwierdzone przez GitHub
rodzic cd8d0ea49a
commit ad633e6fdf
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 65 dodań i 39 usunięć

Wyświetl plik

@ -17,6 +17,7 @@
- [14. Add Google Analytics](#14-add-google-analytics)
- [15. Debugging email issues](#15-debugging-email-issues)
- [16. Frequently Asked Questions](#16-frequently-asked-questions)
- [17. Cookie consent code](#17-cookie-consent-code)
## 1. Welcome
@ -728,3 +729,9 @@ In [3]: for media in Media.objects.filter(media_type='video', sprites=''):
```
this will re-create the sprites for videos that the task failed.
## 17. Cookie consent code
On file `templates/components/header.html` you can find a simple cookie consent code. It is commented, so you have to remove the `{% comment %}` and `{% endcomment %}` lines in order to enable it. Or you can replace that part with your own code that handles cookie consent banners.
![Simple Cookie Consent](images/cookie_consent.png)

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 580 KiB

Wyświetl plik

@ -1 +1,20 @@
<div id="app-header"></div>
{% comment %}
Uncomment, or replace with your own cookie consent code.
<script src="https://cdn.websitepolicies.io/lib/cookieconsent/cookieconsent.min.js" defer></script>
<script>
window.addEventListener("load", function () {
window.wpcc.init({
border: "normal",
corners: "normal",
colors: { popup: { background: "#222222", text: "#ffffff", border: "#FF8000" }, button: { background: "#FF8000", text: "#000000" } },
position: "top-right",
content: { message: "Hi there, we are using cookies on this website. We don't use tracking or analytics here, just the essentials for the Website to work.\n", button: "Understood! Yum!", link: "Click here to learn more." },
});
});
</script>
{% endcomment %}