-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
executable file
·81 lines (75 loc) · 2.62 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
# Use @include_once in case plugin is not installed through zip
# see https://getkirby.com/docs/guide/plugins/plugin-setup-composer#support-for-plugin-installation-without-composer
@include_once __DIR__ . '/vendor/autoload.php';
use Kirby\Http\Response;
use Zephir\Cookieconsent\Configuration;
Kirby::plugin('zephir/cookieconsent', [
'snippets' => [
'cookieconsentJs' => __DIR__ . '/snippets/cookieconsent_js.php',
'cookieconsentCss' => __DIR__ . '/snippets/cookieconsent_css.php'
],
'routes' => function ($kirby) {
return [
[
'pattern' => 'cookieconsent.js',
'language' => '*',
'action' => function () {
return new Response(
Configuration::getInitJs(),
'application/javascript',
200,
[
'Cache-Control' => 'public, max-age=3600, must-revalidate'
]
);
}
]
];
},
'options' => [
'cdn' => false,
// CookieConsent options
// Root options
'revision' => 1,
'root' => 'document.body',
'autoClearCookies' => true, // Only works when the categories has an autoClear array
'autoShow' => true,
'hideFromBots' => true,
'disablePageInteraction' => false,
'lazyHtmlGeneration' => true,
// Block options
'guiOptions' => [
'consentModal' => [
'layout' => 'box',
'position' => 'bottom right',
'flipButtons' => false,
'equalWeightButtons' => true
],
'preferencesModal' => [
'layout' => 'box',
// 'position' => 'left',
'flipButtons' => false,
'equalWeightButtons' => true
]
],
'categories' => [
'necessary' => [
'enabled' => true,
'readOnly' => true
],
'measurement' => [],
'functionality' => [],
'experience' => [],
'marketing' => []
],
// Language options
'translations' => [
'de' => require_once(__DIR__ . '/translations/de.php'),
'en' => require_once(__DIR__ . '/translations/en.php'),
'fr' => require_once(__DIR__ . '/translations/fr.php'),
'nl' => require_once(__DIR__ . '/translations/nl.php'),
'pt_PT' => require_once(__DIR__ . '/translations/pt_PT.php')
]
]
]);