Skip to content

Commit 7810bd5

Browse files
committed
feat: Initial Commit
Initial Commit
0 parents  commit 7810bd5

16 files changed

Lines changed: 205 additions & 0 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
**/*Zone.Identifier

Configuration/Settings.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
NextBox:
2+
Neos:
3+
CCM19:
4+
apiKey: ''
5+
domainKey: ''
6+
ccmScriptUrl: https://cloud.ccm19.de
7+
8+
Neos:
9+
Neos:
10+
fusion:
11+
autoInclude:
12+
'NextBox.Neos.CCM19': true
13+
userInterface:
14+
translation:
15+
autoInclude:
16+
'NextBox.Neos.CCM19':
17+
- 'NodeTypes/*'

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Enes Erk
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
prototype(NextBox.Neos.CCM19:Content.CookieTable) < prototype(Neos.Neos:ContentComponent) {
2+
// Rendering
3+
renderer = NextBox.Neos.CCM19:Component.Atom.CookieTable
4+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'NextBox.Neos.CCM19:Content.CookieTable':
2+
superTypes:
3+
'Neos.Neos:Content': true
4+
ui:
5+
label: i18n
6+
icon: fas fa-cookie
7+
position: end

NodeTypes/Mixin/CCM19Key.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'NextBox.Neos.CCM19:Mixin.CCM19Key':
2+
abstract: true
3+
ui:
4+
inspector:
5+
groups:
6+
ccm19:
7+
label: i18n
8+
icon: fas fa-cookie
9+
position: 'end'
10+
properties:
11+
ccm19ApiKey:
12+
type: string
13+
defaultValue: ''
14+
ui:
15+
label: i18n
16+
inspector:
17+
group: ccm19
18+
position: 10
19+
ccm19DomainKey:
20+
type: string
21+
defaultValue: ''
22+
ui:
23+
label: i18n
24+
inspector:
25+
group: ccm19
26+
position: 20

ReadMe.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# NextBox.Neos.CCM19
2+
3+
> A package to integrate [CCM19](https://www.ccm19.de/) into Neos.
4+
5+
## Authors & Sponsors
6+
7+
Enes Erk - enes.erk@nextbox.dev
8+
9+
## Installation
10+
11+
```
12+
composer require nextbox/neos-ccm19
13+
```
14+
15+
## Configuration
16+
17+
Configure the api-key and domain-key in Settings.yaml:
18+
19+
```yaml
20+
NextBox:
21+
Neos:
22+
CCM19:
23+
apiKey: ''
24+
domainKey: ''
25+
```
26+
27+
Or add the mixin to your root page:
28+
29+
```yaml
30+
'Foo.Bar:RootPage':
31+
superTypes:
32+
'NextBox.Neos.CCM19:Mixin.CCM19Key': true
33+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
prototype(NextBox.Neos.CCM19:Component.Atom.CookieTable) < prototype(Neos.Fusion:Component) {
2+
// Renderer
3+
renderer = afx`
4+
<div class="ccm-cookie-declaration">
5+
Please enable JavaScript to see the list of all cookies and similar technologies declared.
6+
</div>
7+
`
8+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
prototype(Neos.Neos:Page) {
2+
cookieBot = Neos.Fusion:Value {
3+
apiKey = ${!String.isBlank(q(site).property('ccm19ApiKey')) ? q(site).property('ccm19ApiKey') : Configuration.setting('NextBox.Neos.CCM19.apiKey')}
4+
domainKey = ${!String.isBlank(q(site).property('ccm19DomainKey')) ? q(site).property('ccm19DomainKey') : Configuration.setting('NextBox.Neos.CCM19.domainKey')}
5+
ccmScriptUrl = ${Configuration.setting('NextBox.Neos.CCM19.ccmScriptUrl')}
6+
7+
value = ${'<script src="' + this.ccmScriptUrl + '/app.js?apiKey=' + this.apiKey + '&domain=' + this.domainKey + '&lang=de_DE" referrerpolicy="origin"></script>'}
8+
9+
@if.enable = ${!String.isBlank(this.apiKey) && !String.isBlank(this.domainKey) && !String.isBlank(this.ccmScriptUrl)}
10+
@if.notInBackend = ${!site.context.inBackend}
11+
@position = 'before head'
12+
}
13+
}

0 commit comments

Comments
 (0)