Skip to content

Commit

Permalink
📄 docs: info about cookie bar
Browse files Browse the repository at this point in the history
  • Loading branch information
anoff committed Feb 20, 2019
1 parent 51dfe9a commit 2f27b65
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,16 @@
"contributions": [
"translation"
]
},
{
"login": "anoff",
"name": "Andreas Offenhaeuser",
"avatar_url": "https://avatars3.githubusercontent.com/u/7142618?v=4",
"profile": "https://github.com/anoff",
"contributions": [
"code",
"doc
]
}
]
}
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,33 @@ This theme supports hot-swappable CSS and JavaScript extentions. Modules can be

Modules are imported in the order they appear in the list, and immediately after the default Bilberry CSS and JS files are imported.

### Adding a Cookie disclaimer
Depending on the type of website you are running with this theme you may also want to add a cookie consent information. The popuplar solution [cookie consent](https://cookieconsent.insites.com/) can be integrated into the theme by loading the resources as external CSS and JS modules.

Use the configurator on the [cookie consent website](https://cookieconsent.insites.com/) to generate the required initialization code and add it to a local `static/init-cookieconsent.js` file e.g.

```javascript
// https://cookieconsent.insites.com/download/#
window.addEventListener('load', function () {
window.cookieconsent.initialise({
'palette': {
'popup': {
'background': '#cc0033'
},
'button': {
'background': '#fff'
}
}
})
})
```

Then you only need to modify your `config.toml` to load the local init script and the external libraries

```toml
css_modules = ["..", "//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css"]
js_modules = ["..", "//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js", "init-cookieconsent.js"]
```

## Translations
This theme has support for multi-language sites and therefore translations for 10+ languages.
Expand Down

0 comments on commit 2f27b65

Please sign in to comment.