Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/collective/volto-cookie-banner
Volto cookie banner integration addon.
https://github.com/collective/volto-cookie-banner
addon cookie plone react volto
Last synced: about 2 months ago
JSON representation
Volto cookie banner integration addon.
- Host: GitHub
- URL: https://github.com/collective/volto-cookie-banner
- Owner: collective
- License: mit
- Created: 2020-03-27T09:00:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-28T11:43:27.000Z (over 2 years ago)
- Last Synced: 2024-11-05T00:34:49.041Z (2 months ago)
- Topics: addon, cookie, plone, react, volto
- Language: JavaScript
- Size: 240 KB
- Stars: 4
- Watchers: 10
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-volto - volto-cookie-banner - Volto cookie banner integration addon. To be used with: `collective.volto.cookieconsent` (Addons)
README
# volto-cookie-banner
Volto cookie banner integration addon.
To be used with: [collective.volto.cookieconsent](https://github.com/collective/collective.volto.cookieconsent)
To be used with mrs-developer, see [Volto docs](https://docs.voltocms.com/customizing/add-ons/) for further usage informations.
## Usage
> If you're using Volto < 12, then use [v1.0.2](https://github.com/collective/volto-cookie-banner/tree/v1.0.2)
Wherever you want to add the component, import and use it like this:
```jsx
import CookieBanner from 'volto-cookie-banner/CookieBannerContainer';const YourAppComponent = () => ;
```A suggested way is to use `appExtras` from settings object:
```jsx
export const settings = {
...defaultSettings,
appExtras: [
...defaultSettings.appExtras,
{
match: '',
component: CookieBanner,
},
],
};
```### Add a widget for the controlpanel
Without any other customization, in the controlpanel you'll find a text area which will accept a json object.
This is the job for [volto-multilingual-widget](https://github.com/collective/volto-multilingual-widget).```js
import { MultilingualWidget } from 'volto-multilingual-widget';export const widgets = {
...defaultWidgets,
id: {
...defaultWidgets.id,
cookie_consent_configuration: MultilingualWidget(),
},
};
```### Styling
If you want to change or adapt styles, you should start adapting [volto-cookie-banner.css](src/volto-cookie-banner.css) and [react-cookie-consent styling docs](https://github.com/Mastermindzh/react-cookie-consent#styling-it).
## Translations
This product has been translated into:
- Italian
- EnglishPlease, contribute to this project adding translations for your language.