schnti / kirby-cookie

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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(); ?>

About

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

License:MIT License


Languages

Language:CSS 55.9%Language:PHP 38.8%Language:JavaScript 5.4%