Template for EU Cookie law

Hello,

anyone has some ready template snippet to deal with the EU cookie law which is required for web sites here in EU?

I don’t think there’s anything Hugo specific about it. You’re more likely to find something like that on the web rather than here.

Well I meant to say: s/template snippet/template snippet for Hugo/g. :smile:

considering I do not see that feature present in Hugo themes I am exploring…

This may not be what you’re looking for, but Iubenda offers privacy policies and cookie consent banners to websites, and I’ve included support for that in my theme BluestNight (Source). It’s a really nice solution for people who can’t afford a lawyer, though most features require a subscription. The consent banner, for instance, is only to paid users, but includes the ability to block tracking scripts until the user consents - apparently required by certain EU countries.

For just the banner, you should just need a <div> with position: fixed; bottom: 0; and an X in the corner that either runs a small script to remove the <div> from the DOM or checks a hidden checkbox that, when checked, applies CSS to hide the <div>. Even better, use JavaScript to make the banner appear on the page when a cookie isn’t set, then set the cookie when the user consents.