Skip to content

Commit

Permalink
Add possibility of defining a header text for the cookie consent popup
Browse files Browse the repository at this point in the history
PR #9 from grebaldi/feature/header
  • Loading branch information
Nikdro authored May 24, 2019
2 parents 02d0058 + 5a4927d commit f163eba
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ KaufmannDigital:
position: 'bottom'
static: false
theme: 'block'
layout: 'basic'
palette:
popup:
background: '#000'
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To configure the policy-link, you have the following two options:
'KaufmannDigital.CookieConsent:PolicyPageMixin': true
...
```

After that, simply select the policy page in your Neos backend.

* Or use this snippet in your `Settings.yaml`:
Expand Down Expand Up @@ -73,6 +73,7 @@ KaufmannDigital:
CookieConsent:
position: 'bottom' # bottom, bottom-left, bottom-right, top, top-left or top-right
theme: 'block' # block, classic, or edgeless
layout: 'basic' # basic, basic-close or basic-header
palette:
popup:
background: '#000' #like in css
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Fusion/Root.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ prototype(Neos.Neos:Page) {
position = ${Configuration.setting('KaufmannDigital.CookieConsent.position')}
static = ${Configuration.setting('KaufmannDigital.CookieConsent.static')}
theme = ${Configuration.setting('KaufmannDigital.CookieConsent.theme')}
layout = ${Configuration.setting('KaufmannDigital.CookieConsent.layout')}
palette = ${Configuration.setting('KaufmannDigital.CookieConsent.palette')}
elements = ${Configuration.setting('KaufmannDigital.CookieConsent.elements')}
compliance = ${Configuration.setting('KaufmannDigital.CookieConsent.compliance')}
cookie = ${Configuration.setting('KaufmannDigital.CookieConsent.cookie')}
content = Neos.Fusion:RawArray {
header = ${Translation.translate('header', null, [], Configuration.setting('KaufmannDigital.CookieConsent.translations.source'), Configuration.setting('KaufmannDigital.CookieConsent.translations.package'))}
message = ${Translation.translate('message', null, [], Configuration.setting('KaufmannDigital.CookieConsent.translations.source'), Configuration.setting('KaufmannDigital.CookieConsent.translations.package'))}
dismiss = ${Translation.translate('dismiss', null, [], Configuration.setting('KaufmannDigital.CookieConsent.translations.source'), Configuration.setting('KaufmannDigital.CookieConsent.translations.package'))}
allow = ${Translation.translate('allow', null, [], Configuration.setting('KaufmannDigital.CookieConsent.translations.source'), Configuration.setting('KaufmannDigital.CookieConsent.translations.package'))}
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Translations/de/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" source-language="de" datatype="plaintext">
<body>
<trans-unit id="header">
<source>Cookie Richtlinien</source>
</trans-unit>
<trans-unit id="message">
<source>Um unsere Webseite für Sie optimal zu gestalten und fortlaufend verbessern zu können, verwenden wir Cookies. Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu. Weitere Informationen zu Cookies erhalten Sie in unserer</source>
</trans-unit>
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" source-language="en" datatype="plaintext">
<body>
<trans-unit id="header">
<source>Cookie Policy</source>
</trans-unit>
<trans-unit id="message">
<source>This website uses cookies to ensure you get the best experience on our website.</source>
</trans-unit>
Expand Down

0 comments on commit f163eba

Please sign in to comment.