- banner in the footer in case the website does not use cookies or use only technical cookies

- buttons with uniform color to respect GDPR rules
This commit is contained in:
Massimo Maggioni 2022-01-28 20:40:54 +01:00
parent 2d724f5fb4
commit 1bda9df28e
6 changed files with 19 additions and 6 deletions

View File

@ -31,6 +31,7 @@ params:
GDPRbanner:
enabled: true
onlytechnical: false
footer:
since: 2020

View File

@ -64,7 +64,9 @@ search:
footer:
GDPRsettings:
other: Manage GDPR settings
modify: Manage GDPR settings
technical: This website use only technical cookies
nocookie: This website doesn't use any cookie and doesn't collect any personal data
builtWith:
other: Built with {{ .Generator }}

View File

@ -64,6 +64,8 @@ search:
footer:
GDPRsettings:
other: Gestisci il consenso GDPR
technical: Questo sito web utilizza solo cookie tecnici
nocookie: Questo sito web non usa cookie e non raccoglie dati personali
builtWith:
other: Realizzato con {{ .Generator }}

View File

@ -1,3 +1,5 @@
{{ if .Site.Params.GDPRbanner.enabled }}
{{ if not .Site.Params.GDPRbanner.onlytechnical }}
{{ partial "helper/consent.html" . }}
{{ end }}
{{ end }}

View File

@ -2,7 +2,13 @@
<footer class="site-footer">
{{ if .Site.Params.GDPRbanner.enabled }}
<a class="manage-consent" href="#manage-consent">{{ T "footer.GDPRsettings" }}</a>
{{ if not .Site.Params.GDPRbanner.onlytechnical }}
<a class="manage-consent" href="#manage-consent">{{ T "footer.GDPRsettings.modify" }}</a>
{{ else }}
{{ T "footer.GDPRsettings.technical" }}
{{ end }}
{{ else }}
{{ T "footer.GDPRsettings.nocookie" }}
{{ end }}
<section class="copyright">

View File

@ -5,8 +5,8 @@
#consent-notice span a {color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.5);}
#consent-notice button.btn {margin-left: 0.5rem;}
#consent-notice button.btn.manage-consent {background: rgba(255,255,255,1); font-weight: normal;}
#consent-notice button.btn.deny-consent {background: rgba(255,0,0,1); font-weight: normal;}
#consent-notice button.btn.approve-consent {background: rgba(0,255,0,1); font-weight: normal;}
#consent-notice button.btn.deny-consent {background: rgba(255,255,255,1); font-weight: normal;}
#consent-notice button.btn.approve-consent {background: rgba(255,255,255,1); font-weight: normal;}
#consent-overlay {position: fixed; left: 0; top: 0; width: 100%; height: 100vh; display: none; background: rgba(0,0,0,0.75); z-index: 999999; overflow: auto; cursor: pointer;}
#consent-overlay.active {display: flex;}
@ -18,7 +18,7 @@
#consent-overlay label {display: block;}
#consent-overlay .btn {margin-right: 0.5rem;}
#consent-overlay button.btn.save-consent {background: rgba(255,255,255,0.6); font-weight: normal;}
#consent-overlay button.btn.approve-consent {background: rgba(0,255,0,1); font-weight: normal;}
#consent-overlay button.btn.approve-consent {background: rgba(255,255,255,1); font-weight: normal;}
@media (max-width: 767px) {
#consent-overlay > div {padding: 1.75rem 1rem;}