-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
392 additions
and
587 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
import "vanilla-cookieconsent/src/cookieconsent.css" | ||
import "vanilla-cookieconsent/src/cookieconsent.js" | ||
import "vanilla-cookieconsent/dist/cookieconsent.css" | ||
import * as CookieConsent from "vanilla-cookieconsent" | ||
|
||
console.log(CookieConsent) | ||
window.CookieConsent = CookieConsent |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -10,6 +10,6 @@ | |
"parcel": "^2.1.1" | ||
}, | ||
"dependencies": { | ||
"vanilla-cookieconsent": "^2.9.2" | ||
"vanilla-cookieconsent": "^3.0.0" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php if (option('zephir.cookieconsent.cdn')): ?> | ||
<?= css('https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.9.2/dist/cookieconsent.css') ?> | ||
<?= css('https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v3.0.0/dist/cookieconsent.css') ?> | ||
<?php else: ?> | ||
<?= css('/media/plugins/zephir/cookieconsent/index.css') ?> | ||
<?php endif; ?> |
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
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 @@ | ||
<?php | ||
|
||
namespace Zephir\Cookieconsent; | ||
|
||
class Configuration | ||
{ | ||
public static function getInitJs() | ||
{ | ||
return " | ||
CookieConsent.run(" . json_encode(self::get()) . "); | ||
"; | ||
} | ||
|
||
public static function get() | ||
{ | ||
return [ | ||
'categories' => kirby()->option('zephir.cookieconsent.categories'), | ||
'guiOptions' => kirby()->option('zephir.cookieconsent.guiOptions'), | ||
'revision' => kirby()->option('zephir.cookieconsent.revision'), | ||
'root' => kirby()->option('zephir.cookieconsent.root'), | ||
'autoClearCookies' => kirby()->option('zephir.cookieconsent.autoClearCookies'), // Only works when the categories has an autoClear array | ||
'autoShow' => kirby()->option('zephir.cookieconsent.autoShow'), | ||
'hideFromBots' => kirby()->option('zephir.cookieconsent.hideFromBots'), | ||
'disablePageInteraction' => kirby()->option('zephir.cookieconsent.disablePageInteraction'), | ||
'lazyHtmlGeneration' => kirby()->option('zephir.cookieconsent.lazyHtmlGeneration'), | ||
'language' => [ | ||
'default' => 'kirby', | ||
'autoDetect' => false, | ||
'rtl' => kirby()->language()->direction() === 'rtl', | ||
'translations' => [ | ||
'kirby' => Helpers::getTranslations() | ||
] | ||
] | ||
]; | ||
} | ||
|
||
} |
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
Oops, something went wrong.