jquery-cookie-alerter
Why ?
To be in compliance with the "Cookies" CNIL recommendation
Features
- Content is injected with JavaScript for seo-friendly
- Mobile first
- Options for custom text and translations
Preprocessing
- Slim [for html]
- SCSS [for css]
- CoffeeScript [for js]
Tools
- Middleman [static site generator made easy]
- Bower [js package management]
- GitHub Pages [deployment/hosting]
Getting Started
$ bundle
$ middleman server
$ middleman build
Installation
- Use bower :
bower install jquery-cookie-alerter --save
- Download the latest version
Use
AlertLaw.start();
If you want to have a custom message you have some options available :
AlertLaw.start({
cookieUrl: "path/to/info-page.html",
messageTitle: "Cookies",
messageContent: {
fr: "En poursuivant votre navigation sur notre site, vous en acceptez (...) et réaliser des statistiques de visites.",
en: "By continuing your visit to our site, you agree to (...) and make visits statistics."
},
findOutMore: "Find out more",
cookieName: "cookies_law",
});
cookieUrl
, findOutMore
, messageContent
and messageTitle
can be a String or an Object including each translation.
Demo
Want to see the result ? Visit the demo page
License
Licensed under MIT license.