-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from avency/feature/moveToGithub
task: move code to github
- Loading branch information
Showing
13 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'Avency.Neos.CookieBot:Content.CookieBot': | ||
superTypes: | ||
'Neos.Neos:Content': true | ||
options: | ||
fusion: | ||
prototypeGenerator: ~ | ||
ui: | ||
group: 'modules-special' | ||
label: i18n | ||
icon: 'icon-question-circle' | ||
position: 3090 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'Avency.Neos.CookieBot:Mixin.CookieBotKey': | ||
abstract: true | ||
properties: | ||
cookieBotKey: | ||
type: string | ||
defaultValue: '' | ||
ui: | ||
label: i18n | ||
inspector: | ||
group: 'document' | ||
position: 'end' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Enter CookieBot key here if you don't use the mixin | ||
# | ||
#Avency: | ||
# Neos: | ||
# CookieBot: | ||
# key: '' | ||
Neos: | ||
Neos: | ||
fusion: | ||
autoInclude: | ||
'Avency.Neos.CookieBot': true | ||
userInterface: | ||
translation: | ||
autoInclude: | ||
'Avency.Neos.CookieBot': | ||
- 'NodeTypes/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 avency GmbH <info@avency.de> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Avency.Neos.CookieBot | ||
|
||
> A package to integrate [Cookiebot](https://www.cookiebot.com/) into Neos. | ||
## Authors & Sponsors | ||
|
||
Benjamin Kentsch - benjamin.kentsch@avency.de | ||
Michael Gerdemann - michael.gerdemann@avency.de | ||
|
||
The development and the public-releases of this package is generously sponsored by our employer https://www.avency.de. | ||
|
||
## Installation | ||
|
||
``` | ||
composer require avency/neos-cookiebot | ||
``` | ||
|
||
## Configuration | ||
|
||
Configure the key in Settings.yaml: | ||
|
||
``` | ||
Avency: | ||
Neos: | ||
CookieBot: | ||
key: '' | ||
``` | ||
|
||
Or add the mixin to your root page: | ||
|
||
``` | ||
superTypes: | ||
'Avency.Neos.CookieBot:Mixin.CookieBotKey': true | ||
``` | ||
## License | ||
|
||
The MIT License (MIT). Please see [License File](./LICENSE.md) for more information. |
9 changes: 9 additions & 0 deletions
9
Resources/Private/Fusion/Component/Atom/CookieBot/CookieBot.fusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
prototype(Avency.Neos.CookieBot:Component.Atom.CookieBot) < prototype(Neos.Fusion:Component) { | ||
// API | ||
scriptTag = '' | ||
|
||
// Rendering | ||
renderer = afx` | ||
{props.scriptTag} | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
prototype(Avency.Neos.CookieBot:Content.CookieBot) < prototype(Neos.Neos:ContentComponent) { | ||
// Rendering | ||
renderer = Avency.Neos.CookieBot:Component.Atom.CookieBot { | ||
key = ${!String.isBlank(q(site).property('cookieBotKey')) ? q(site).property('cookieBotKey') : Configuration.setting('Avency.Neos.CookieBot.key')} | ||
|
||
scriptTag = ${'<script id="CookieDeclaration" src="//consent.cookiebot.com/' + this.key + '/cd.js" type="text/javascript" async></script>'} | ||
scriptTag.@if.enable = ${!String.isBlank(this.key)} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
prototype(Neos.Neos:Page) { | ||
cookieBot = Neos.Fusion:Value { | ||
key = ${!String.isBlank(q(site).property('cookieBotKey')) ? q(site).property('cookieBotKey') : Configuration.setting('Avency.Neos.CookieBot.key')} | ||
value = ${'<script id="Cookiebot" src="//consent.cookiebot.com/uc.js" data-cbid="' + this.key + '" data-blockingmode="auto" type="text/javascript"></script>'} | ||
@if.enable = ${!String.isBlank(this.key)} | ||
@if.notInBackend = ${!site.context.inBackend} | ||
@position = 'before head' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include: **/*.fusion |
11 changes: 11 additions & 0 deletions
11
Resources/Private/Translations/de/NodeTypes/Content/CookieBot.xlf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
<file original="" product-name="Avency.Neos.CookieBot" source-language="en" datatype="plaintext" target-language="de"> | ||
<body> | ||
<trans-unit id="ui.label" xml:space="preserve" approved="yes"> | ||
<source>Cookie declaration</source> | ||
<target xml:lang="de">Cookie-Erklärung</target> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
11 changes: 11 additions & 0 deletions
11
Resources/Private/Translations/de/NodeTypes/Mixin/CookieBotKey.xlf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
<file original="" product-name="Avency.Neos.CookieBot" source-language="en" datatype="plaintext" target-language="de"> | ||
<body> | ||
<trans-unit id="properties.cookieBotKey" xml:space="preserve" approved="yes"> | ||
<source>CookieBot Key</source> | ||
<target xml:lang="de">CookieBot Key</target> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
10 changes: 10 additions & 0 deletions
10
Resources/Private/Translations/en/NodeTypes/Content/CookieBot.xlf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
<file original="" product-name="Avency.Neos.CookieBot" source-language="en" datatype="plaintext"> | ||
<body> | ||
<trans-unit id="ui.label" xml:space="preserve" approved="yes"> | ||
<source>Cookie declaration</source> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
10 changes: 10 additions & 0 deletions
10
Resources/Private/Translations/en/NodeTypes/Mixin/CookieBotKey.xlf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
<file original="" product-name="Avency.Neos.CookieBot" source-language="en" datatype="plaintext"> | ||
<body> | ||
<trans-unit id="properties.cookieBotKey" xml:space="preserve" approved="yes"> | ||
<source>CookieBot Key</source> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |