Skip to content

A plugin for Kirby 2 CMS that shows an cookie approval banner to use in your templates.

License

Notifications You must be signed in to change notification settings

schnti/kirby-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookie Approval Plugin

A plugin for Kirby 2 CMS that shows an cookie approval banner to use in your templates.

Cookie Approval Plugin Example

Installation

Copy or link the cookie directory to site/plugins/ or use the Kirby CLI:

kirby plugin:install schnti/kirby-cookie

CSS (SCSS)

$ka-cookie-bg: #222 !default;
$ka-cookie-color: #fff !default;
$ka-cookie-link-color: #31a8f0 !default;
$ka-cookie-link-color-hover: #b2f7ff !default;
$ka-cookie-btn-bg: #f1d600 !default;
$ka-cookie-btn-color: #222 !default;
$ka-cookie-position: bottom-right !default; // top-left, top-right, bottom-left, bottom-right
@import "../website/site/plugins/cookie/cookie.scss";

Config Variables

  • ka.cookie.link: String (default: 'datenschutzerklaerung')
c::set('ka.cookie.link', 'datenschutz');

How to use it

use this right before closing </body> tag

<?= cookie(); ?>